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
That should be "The ARM Thumb2 pseudo-instruction PKHTB<c> <Rd>,<Rn>,<Rm> ..."
Created attachment 4034 [details] Fix opcode generation and testsuite
Subject: Bug 10168 CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 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
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.