Fix encoding of Thumb BLX register instructions. Patch by Koan-Sin Tan.

llvm-svn: 131189
This commit is contained in:
Owen Anderson 2011-05-11 17:00:48 +00:00
parent 783243b3ca
commit b745623b71
2 changed files with 10 additions and 4 deletions

View File

@ -457,7 +457,11 @@ let isCall = 1,
"blx\t$func",
[(ARMtcall GPR:$func)]>,
Requires<[IsThumb, HasV5T, IsNotDarwin]>,
T1Special<{1,1,1,?}>; // A6.2.3 & A8.6.24;
T1Special<{1,1,1,?}> { // A6.2.3 & A8.6.24;
bits<4> func;
let Inst{6-3} = func;
let Inst{2-0} = 0b000;
}
// ARMv4T
// FIXME: Should be a pseudo.

View File

@ -12,6 +12,8 @@
@ CHECK: blx r9 @ encoding: [0xc8,0x47]
blx r9
@ CHECK: blx r10 @ encoding: [0xd0,0x47]
blx r10
@ CHECK: rev r2, r3 @ encoding: [0x1a,0xba]
@ CHECK: rev16 r3, r4 @ encoding: [0x63,0xba]