This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Incorrect opcode for Thumb ldrbt
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Mon, 20 Mar 2006 22:13:28 +0000
- Subject: [patch] Incorrect opcode for Thumb ldrbt
The patch below fixes a bug in the encoding of the Thumb-2 ldrbt and strbt
instructions.
Tested with cross to arm-none-eabi.
Ok?
Paul
2006-03-20 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-arm.c (insns): Correct opcodes for ldrbt and strbt.
gas/testsuite/
* gas/arm/thumb32.d: Correct expected output.
Index: gas/config/tc-arm.c
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/config/tc-arm.c,v
retrieving revision 1.250
diff -u -p -r1.250 tc-arm.c
--- gas/config/tc-arm.c 20 Mar 2006 15:38:02 -0000 1.250
+++ gas/config/tc-arm.c 20 Mar 2006 18:41:52 -0000
@@ -9034,9 +9034,9 @@ static const struct asm_opcode insns[] =
CL(teqp, 130f000, 2, (RR, SH), cmp),
TC3(ldrt, 4300000, f8500e00, 2, (RR, ADDR), ldstt, t_ldstt),
- TC3(ldrbt, 4700000, f8300e00, 2, (RR, ADDR), ldstt, t_ldstt),
+ TC3(ldrbt, 4700000, f8100e00, 2, (RR, ADDR), ldstt, t_ldstt),
TC3(strt, 4200000, f8400e00, 2, (RR, ADDR), ldstt, t_ldstt),
- TC3(strbt, 4600000, f8200e00, 2, (RR, ADDR), ldstt, t_ldstt),
+ TC3(strbt, 4600000, f8000e00, 2, (RR, ADDR), ldstt, t_ldstt),
TC3(stmdb, 9000000, e9000000, 2, (RRw, REGLST), ldmstm, t_ldmstm),
TC3(stmfd, 9000000, e9000000, 2, (RRw, REGLST), ldmstm, t_ldmstm),
Index: gas/testsuite/gas/arm/thumb32.d
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/testsuite/gas/arm/thumb32.d,v
retrieving revision 1.16
diff -u -p -r1.16 thumb32.d
--- gas/testsuite/gas/arm/thumb32.d 17 Mar 2006 14:03:36 -0000 1.16
+++ gas/testsuite/gas/arm/thumb32.d 20 Mar 2006 21:23:56 -0000
@@ -523,8 +523,8 @@ Disassembly of section .text:
0[0-9a-f]+ <[^>]+> e9c5 2300 strd r2, r3, \[r5\]
0[0-9a-f]+ <[^>]+> e9c5 230c strd r2, r3, \[r5, #48\]
0[0-9a-f]+ <[^>]+> e945 230c strd r2, r3, \[r5, #-48\]
-0[0-9a-f]+ <[^>]+> f835 1e00 ldrht r1, \[r5\]
-0[0-9a-f]+ <[^>]+> f835 1e30 ldrht r1, \[r5, #48\]
+0[0-9a-f]+ <[^>]+> f815 1e00 ldrbt r1, \[r5\]
+0[0-9a-f]+ <[^>]+> f815 1e30 ldrbt r1, \[r5, #48\]
0[0-9a-f]+ <[^>]+> f915 1e00 ldrsbt r1, \[r5\]
0[0-9a-f]+ <[^>]+> f915 1e30 ldrsbt r1, \[r5, #48\]
0[0-9a-f]+ <[^>]+> f835 1e00 ldrht r1, \[r5\]