aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMInstrThumb2.td
diff options
context:
space:
mode:
authorAmaury de la Vieuville <amaury.dlv@gmail.com>2013-06-18 08:13:05 +0000
committerAmaury de la Vieuville <amaury.dlv@gmail.com>2013-06-18 08:13:05 +0000
commitbeb920fce6ccc89b4735f280f94cb8c227f4ef5e (patch)
treeb05f8b29168dcdff8045ea3d5b0f859beab8b8a0 /lib/Target/ARM/ARMInstrThumb2.td
parentf8b60d6f30a8f25c84a71d36ff3a86fe1f52f671 (diff)
downloadexternal_llvm-beb920fce6ccc89b4735f280f94cb8c227f4ef5e.zip
external_llvm-beb920fce6ccc89b4735f280f94cb8c227f4ef5e.tar.gz
external_llvm-beb920fce6ccc89b4735f280f94cb8c227f4ef5e.tar.bz2
ARM: fix literal load with positive offset encoding
When using a positive offset, literal loads where encoded as if it was negative, because: - The sign bit was not assigned to an operand - The addrmode_imm12 operand was not encoding the sign bit correctly This patch also makes the assembler look at the .w/.n specifier for loads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrThumb2.td')
-rw-r--r--lib/Target/ARM/ARMInstrThumb2.td6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td
index 8e19d32..2693f32 100644
--- a/lib/Target/ARM/ARMInstrThumb2.td
+++ b/lib/Target/ARM/ARMInstrThumb2.td
@@ -1024,16 +1024,16 @@ multiclass T2I_ld<bit signed, bits<2> opcod, string opc,
def pci : T2Ipc <(outs target:$Rt), (ins t2ldrlabel:$addr), iii,
opc, ".w\t$Rt, $addr",
[(set target:$Rt, (opnode (ARMWrapper tconstpool:$addr)))]> {
+ bits<4> Rt;
+ bits<13> addr;
let isReMaterializable = 1;
let Inst{31-27} = 0b11111;
let Inst{26-25} = 0b00;
let Inst{24} = signed;
- let Inst{23} = ?; // add = (U == '1')
+ let Inst{23} = addr{12}; // add = (U == '1')
let Inst{22-21} = opcod;
let Inst{20} = 1; // load
let Inst{19-16} = 0b1111; // Rn
- bits<4> Rt;
- bits<12> addr;
let Inst{15-12} = Rt{3-0};
let Inst{11-0} = addr{11-0};