This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix Thumb-2 RBIT encoding


The patch below fixes the encoding of the Thumb-2 RBIT instruction. The rm 
field is present in the instruction twice.

Tested on arm-none-eabi
Applied to cvs head.

Paul

2008-06-03  Paul Brook  <paul@codesourcery.com>

	gas/
	* config/tc-arm.c (do_t_rbit): Populate both rm fields.
	gas/testsuite/
	* gas/arm/thumb32.d: Update expected output.

Index: gas/testsuite/gas/arm/thumb32.d
===================================================================
--- gas/testsuite/gas/arm/thumb32.d	(revision 210370)
+++ gas/testsuite/gas/arm/thumb32.d	(working copy)
@@ -739,9 +739,9 @@ Disassembly of section .text:
 0[0-9a-f]+ <[^>]+> fa90 f9b0 	revsh\.w	r9, r0
 0[0-9a-f]+ <[^>]+> fa90 f0a0 	rbit	r0, r0
 0[0-9a-f]+ <[^>]+> fa90 f0a0 	rbit	r0, r0
-0[0-9a-f]+ <[^>]+> fa95 f0a0 	rbit	r0, r5
+0[0-9a-f]+ <[^>]+> fa95 f0a5 	rbit	r0, r5
 0[0-9a-f]+ <[^>]+> fa90 f5a0 	rbit	r5, r0
-0[0-9a-f]+ <[^>]+> fa99 f0a0 	rbit	r0, r9
+0[0-9a-f]+ <[^>]+> fa99 f0a9 	rbit	r0, r9
 0[0-9a-f]+ <[^>]+> fa90 f9a0 	rbit	r9, r0
 0[0-9a-f]+ <[^>]+> 0440      	lsls	r0, r0, #17
 0[0-9a-f]+ <[^>]+> 0380      	lsls	r0, r0, #14
Index: gas/config/tc-arm.c
===================================================================
--- gas/config/tc-arm.c	(revision 210370)
+++ gas/config/tc-arm.c	(working copy)
@@ -10050,6 +10050,7 @@ do_t_rbit (void)
 {
   inst.instruction |= inst.operands[0].reg << 8;
   inst.instruction |= inst.operands[1].reg << 16;
+  inst.instruction |= inst.operands[1].reg;
 }
 
 static void


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]