[Bug gas/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index
https://sourceware.org/bugzilla/show_bug.cgi?id=14480 James Patrick Conlon changed: What|Removed |Added CC||cptjustice at gmail dot com --- Comment #3 from James Patrick Conlon --- Created attachment 11146 --> https://sourceware.org/bugzilla/attachment.cgi?id=11146&action=edit Modified Assembly Program illustrating the problem Added a line to show that the current behavior does produce output matching something it shouldn't match. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index
https://sourceware.org/bugzilla/show_bug.cgi?id=14480 --- Comment #4 from James Patrick Conlon --- Created attachment 11147 --> https://sourceware.org/bugzilla/attachment.cgi?id=11147&action=edit Patch which solves this specific problem -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index
https://sourceware.org/bugzilla/show_bug.cgi?id=14480 --- Comment #5 from James Patrick Conlon --- Confirming that this bug still exists in as 2.31.51.20180719. Attached is a slightly modified version of Jordi's dic.s called dic-mod.s. The output of pdp11-aout-as -a dic-mod.s is: GAS LISTING /home/cptnapalm/Downloads/dic-mod.s page 1 1 C0151200 start:mov$ind,r0 2 0004 C809 jsr pc,(r0) 3 0006 C809 jsr pc,@(r0) 4 0008 F809 jsr pc,@0(r0) 5 000c F8090200 jsr pc,@2(r0) 6 0010 halt 7 8 9 0012 1600 ind:.WORDdest 10 0014 1800 .WORDdest2 11 12 0016 8700 dest:rtspc 13 14 0018 8700 dest2:rtspc 15 16 .END GAS LISTING /home/cptnapalm/Downloads/dic-mod.s page 2 DEFINED SYMBOLS /home/cptnapalm/Downloads/dic-mod.s:1 .text: start /home/cptnapalm/Downloads/dic-mod.s:9 .text:0012 ind /home/cptnapalm/Downloads/dic-mod.s:12 .text:0016 dest /home/cptnapalm/Downloads/dic-mod.s:14 .text:0018 dest2 NO UNDEFINED SYMBOLS As can be seen, jsr pc,@(r0) assembles the same as jsr pc,(r0), which it shouldn't do. I created a patch, which is attached, that solves this problem. As adding a '0' would create a new string and since it already knows that it's deferred, I just replace the '@' with a '0' before sending it along. The new output: GAS LISTING /home/cptnapalm/Downloads/dic-mod.s page 1 1 C0151400 start: mov $ind,r0 2 0004 C809 jsr pc,(r0) 3 0006 F809 jsr pc,@(r0) 4 000a F809 jsr pc,@0(r0) 5 000e F8090200 jsr pc,@2(r0) 6 0012 halt 7 8 9 0014 1800 ind:.WORD dest 10 0016 1A00 .WORD dest2 11 12 0018 8700 dest: rts pc 13 14 001a 8700 dest2: rts pc 15 16.END GAS LISTING /home/cptnapalm/Downloads/dic-mod.s page 2 DEFINED SYMBOLS /home/cptnapalm/Downloads/dic-mod.s:1 .text: start /home/cptnapalm/Downloads/dic-mod.s:9 .text:0014 ind /home/cptnapalm/Downloads/dic-mod.s:12 .text:0018 dest /home/cptnapalm/Downloads/dic-mod.s:14 .text:001a dest2 NO UNDEFINED SYMBOLS It now does the right thing in this case. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index
https://sourceware.org/bugzilla/show_bug.cgi?id=14480 --- Comment #6 from James Patrick Conlon --- Hold off on the 2018-07-19 patch. There are some additional fixes necessary. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index
https://sourceware.org/bugzilla/show_bug.cgi?id=14480 James Patrick Conlon changed: What|Removed |Added Attachment #11147|0 |1 is obsolete|| -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index
https://sourceware.org/bugzilla/show_bug.cgi?id=14480 --- Comment #7 from James Patrick Conlon --- Created attachment 11156 --> https://sourceware.org/bugzilla/attachment.cgi?id=11156&action=edit Fixes implicit index deferred @(Rn) now changes to @0(Rn) as it should. @(Rn)+ is explicitly tested for and remains unchanged. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/23481] New: pdp11-aout: @Rn and (Rn) should both be Register Deferred
https://sourceware.org/bugzilla/show_bug.cgi?id=23481 Bug ID: 23481 Summary: pdp11-aout: @Rn and (Rn) should both be Register Deferred Product: binutils Version: 2.31 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: cptjustice at gmail dot com Target Milestone: --- Target: pdp11-aout Created attachment 11159 --> https://sourceware.org/bugzilla/attachment.cgi?id=11159&action=edit Fixes incorrect output for @Rn and eliminates unnecessary return statements Currently, @Rn produces relative address deferred instead of register deferred according to a number of PDP-11 handbooks. <.text>: 0: 1009mov r0, (r1) 2: 103f fffa mov r0, *$0x0 The include patch fixes this issue. It also eliminates a couple of unnecessary early return statements in the parse_reg function. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/23481] pdp11-aout: @Rn and (Rn) should both be Register Deferred
https://sourceware.org/bugzilla/show_bug.cgi?id=23481 --- Comment #1 from James Patrick Conlon --- Created attachment 11165 --> https://sourceware.org/bugzilla/attachment.cgi?id=11165&action=edit Assembly for the test suite This is some assembly for the test suite. Output of current gas: Disassembly of section .text: 6 7 : 80: 2009cmp r0, (r1) 92: 203f fffa cmp r0, *$0 106: 2240cmp (r1), r0 118: 2fc0 fff4 cmp *$0 , r0 12c: 227f fff0 cmp (r1), *$0 13 ... Output with patch: Disassembly of section .text: 6 7 : 80: 2009cmp r0, (r1) 92: 2009cmp r0, (r1) 104: 2240cmp (r1), r0 116: 2240cmp (r1), r0 128: 2249cmp (r1), (r1) 13 ... I would make a .d file for the assembly, but for the life of me, I can't figure out how. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/22859] gas seems to misassemble cmp r, $label+offset on PDP-11 with reproducer
https://sourceware.org/bugzilla/show_bug.cgi?id=22859 James Patrick Conlon changed: What|Removed |Added CC||cptjustice at gmail dot com --- Comment #3 from James Patrick Conlon --- Which version of ancient binutils? I can try to find what changed. At least going by my PDP-11 textbook, the $label+number would resolve the label as a literal number then add as there are no precedence rules. So $boing = $4 and $boing+1 = $5. So far as I know. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/20694] PDP11 TARGET_PAGE_SIZE is incorrect
https://sourceware.org/bugzilla/show_bug.cgi?id=20694 James Patrick Conlon changed: What|Removed |Added CC||cptjustice at gmail dot com --- Comment #1 from James Patrick Conlon --- 8192 is the correct page size for the PDP-11. There are two spots where it will need to be changed. The linker and the bfd both are at 256. Once I can test an actual executable on 2.11BSD and UNIX v7, I'll submit a patch. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils