summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-01 03:04:49 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-01 03:04:49 +0000
commit06736d0f88283d4c3ed857f40a6a85465815c148 (patch)
tree82ebf87c90ff59cde094e64173d5e1deced726fc /llvm/lib
parent0df1536173a6709ef144ecb478ec0985c6654fcf (diff)
downloadbcm5719-llvm-06736d0f88283d4c3ed857f40a6a85465815c148.tar.gz
bcm5719-llvm-06736d0f88283d4c3ed857f40a6a85465815c148.zip
.set pc relative displacement bug: label should be moved down one instruction
to just before the add r1, pc: Before: .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4)) LPCRELL0: mov r1, #PCRELV0 add r1, pc Now: .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4)) mov r1, #PCRELV0 LPCRELL0: add r1, pc llvm-svn: 33744
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMInstrThumb.td12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrThumb.td b/llvm/lib/Target/ARM/ARMInstrThumb.td
index 416d4305037..b0e531cdc84 100644
--- a/llvm/lib/Target/ARM/ARMInstrThumb.td
+++ b/llvm/lib/Target/ARM/ARMInstrThumb.td
@@ -480,17 +480,17 @@ let usesCustomDAGSchedInserter = 1 in // Expanded by the scheduler.
// assembler.
def tLEApcrel : TIx2<(ops GPR:$dst, i32imm:$label),
!strconcat(!strconcat(".set PCRELV${:uid}, ($label-(",
- "${:private}PCRELL${:uid}+4))\n"),
- !strconcat("${:private}PCRELL${:uid}:\n\t",
- "mov $dst, #PCRELV${:uid}\n\tadd $dst, pc")),
+ "${:private}PCRELL${:uid}+6))\n"),
+ !strconcat("\tmov $dst, #PCRELV${:uid}\n",
+ "${:private}PCRELL${:uid}:\n\tadd $dst, pc")),
[]>;
def tLEApcrelJT : TIx2<(ops GPR:$dst, i32imm:$label, i32imm:$id),
!strconcat(!strconcat(".set PCRELV${:uid}, (${label}_${id:no_hash}-(",
"${:private}PCRELL${:uid}+4))\n"),
- !strconcat("${:private}PCRELL${:uid}:\n\t",
- "mov $dst, #PCRELV${:uid}\n\tadd $dst, pc")),
- []>;
+ !strconcat("\tmov $dst, #PCRELV${:uid}\n",
+ "${:private}PCRELL${:uid}:\n\tadd $dst, pc")),
+ []>;
//===----------------------------------------------------------------------===//
// Non-Instruction Patterns
OpenPOWER on IntegriCloud