[Bug gas/10168] New: Wrong machine code for Thumb2 instruction PKHTB

View: New views
5 Messages — Rating Filter:   Alert me  

[Bug gas/10168] New: Wrong machine code for Thumb2 instruction PKHTB

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The ARM Thumb2 pseudo-instruction

PKHTB<c> <Rd>,<Rm>,<Rn>

should be assembled through

PKHBT<c> <Rd>,<Rm>,<Rn>

but is instead assembled through

PKHBT<c> <Rd>,<Rn>,<Rm>

For example:

$ echo ".code 16 pkhtb r1,r2,r3" | arm-elf-as -aln -EB -o /dev/null
   1 0000 EAC20103      .code 16 pkhtb r1,r2,r3

$ echo ".code 16 pkhbt r1,r2,r3" | arm-elf-as -aln -EB -o /dev/null
   1 0000 EAC20103      .code 16 pkhbt r1,r2,r3

--
           Summary: Wrong machine code for Thumb2 instruction PKHTB
           Product: binutils
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P3
         Component: gas
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: anthony dot fox at cl dot cam dot ac dot uk
                CC: bug-binutils at gnu dot org
  GCC host triplet: i386-redhat-linux
GCC target triplet: arm-elf


http://sourceware.org/bugzilla/show_bug.cgi?id=10168

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/10168] Wrong machine code for Thumb2 instruction PKHTB

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From anthony dot fox at cl dot cam dot ac dot uk  2009-05-18 13:09 -------
That should be

"The ARM Thumb2 pseudo-instruction

PKHTB<c> <Rd>,<Rn>,<Rm>

..."

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10168

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/10168] Wrong machine code for Thumb2 instruction PKHTB

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From nickc at redhat dot com  2009-07-01 16:33 -------
Created an attachment (id=4034)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4034&action=view)
Fix opcode generation and testsuite


--


http://sourceware.org/bugzilla/show_bug.cgi?id=10168

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/10168] Wrong machine code for Thumb2 instruction PKHTB

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-07-01 16:36 -------
Subject: Bug 10168

CVSROOT: /cvs/src
Module name: src
Changes by: nickc@... 2009-07-01 16:36:29

Modified files:
        gas            : ChangeLog
        gas/config     : tc-arm.c
        gas/doc        : as.texinfo
        gas/testsuite  : ChangeLog
        gas/testsuite/gas/arm: thumb32.d

Log message:
        PR 10168
        * config/tc-arm.c (do_t_pkhtb): Swap Rm and Rn when encoding as
        PKHBT.
        * gas/arm/thumb32.d: Fix expected disassembly of PKHTB insn.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.3837&r2=1.3838
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?cvsroot=src&r1=1.390&r2=1.391
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/doc/as.texinfo.diff?cvsroot=src&r1=1.204&r2=1.205
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1499&r2=1.1500
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/arm/thumb32.d.diff?cvsroot=src&r1=1.32&r2=1.33



--


http://sourceware.org/bugzilla/show_bug.cgi?id=10168

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/10168] Wrong machine code for Thumb2 instruction PKHTB

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From nickc at redhat dot com  2009-07-01 16:37 -------
Hi Anthony,

  Thanks for reporting this bug.  I have checked in the uploaded patch to fix
the problem and adjust the gas testsuite to take the change into account.

Cheers
  Nick

gas/ChangeLog
        PR 10168
        * config/tc-arm.c (do_t_pkhtb): Swap Rm and Rn when encoding as
        PKHBT.

gas/testsuite/ChangeLog
        PR 10168
        * gas/arm/thumb32.d: Fix expected disassembly of PKHTB insn.


--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10168

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils