[Bug gas/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index

2018-08-01 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=14480

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution|--- |FIXED

--- Comment #9 from Nick Clifton  ---
Hi James,

  Thanks for the patch.  I have applied it, along with an addition to the
  PDP11 assembler testsuite, to the mainline sources.

  I did make one addition to the patch.  Just a small paranoia check to 
  make sure that the bytes between str[1] and str[5] are not NUL.

Cheers
  Nick

-- 
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

2018-08-01 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=14480

--- Comment #8 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3cf2b6691cef024f7cdb48aaec5fab5189e1cffa

commit 3cf2b6691cef024f7cdb48aaec5fab5189e1cffa
Author: James Patrick Conlon 
Date:   Wed Aug 1 15:14:46 2018 +0100

Fix bug in PDP11 assembler when handling a JSr instruction with deferred
auto increment.

PR 14480
* config/tc-pdp11.c (parse_op_noreg): Check for and handle auto
increment deferred.
* testsuite/gas/pdp11/pr14480.d: New test driver file.
* testsuite/gas/pdp11/pr14480.s: New test source file file.
* testsuite/gas/pdp11/pdp11.exp: Run the new test.

-- 
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

2018-07-27 Thread cptjustice at gmail dot com
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/14480] PDP11 gas generates invalid code for deferred indirect JSR with 0 index

2018-07-27 Thread cptjustice at gmail dot com
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

2018-07-25 Thread cptjustice at gmail dot com
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

2018-07-19 Thread cptjustice at gmail dot com
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

2018-07-19 Thread cptjustice at gmail dot com
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

2018-07-19 Thread cptjustice at gmail dot com
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

2012-08-22 Thread jguillaumes at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14480

--- Comment #2 from Jordi Guillaumes Pons  
2012-08-22 12:41:22 UTC ---
Additional information: the gcc compiler generates a JSR PC,@(Rx) to implement
an indirect call thru a function pointer table, so this bug causes gcc
generating invalid code.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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

2012-08-21 Thread baker at usgs dot gov
http://sourceware.org/bugzilla/show_bug.cgi?id=14480

Larry Baker  changed:

   What|Removed |Added

 CC||baker at usgs dot gov

--- Comment #1 from Larry Baker  2012-08-22 00:39:29 UTC 
---
See the NOTE at the bottom of page 5-5 in Section 5.8, INDEX DEFERRED MODE, in
the PDP-11 MACRO-11 Language Reference Manual on the BitSavers web site
(http://www.bitsavers.org/pdf/dec/pdp11/rsx11/RSX11M_V4.1_Apr83/4_ProgramDevelopment/AA-V027A-TC_macro11_Mar83.pdf):

   The expression @(ER) may be used, but it
   will be assembled as if it were written
   @0(ER), and a word will be used to store
   the 0.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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

2012-08-16 Thread jguillaumes at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14480

Jordi Guillaumes Pons  changed:

   What|Removed |Added

 CC||jguillaumes at gmail dot
   ||com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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

2012-08-16 Thread jguillaumes at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14480

Jordi Guillaumes Pons  changed:

   What|Removed |Added

 Target||pdp11-aout

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- 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