[llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrThumb.td
Evan Cheng
evan.cheng at apple.com
Wed Jan 31 19:05:04 PST 2007
Changes in directory llvm/lib/Target/ARM:
ARMInstrThumb.td updated: 1.12 -> 1.13
---
Log message:
.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
---
Diffs of the changes: (+6 -6)
ARMInstrThumb.td | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm/lib/Target/ARM/ARMInstrThumb.td
diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.12 llvm/lib/Target/ARM/ARMInstrThumb.td:1.13
--- llvm/lib/Target/ARM/ARMInstrThumb.td:1.12 Wed Jan 31 19:49:46 2007
+++ llvm/lib/Target/ARM/ARMInstrThumb.td Wed Jan 31 21:04:49 2007
@@ -480,17 +480,17 @@
// 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
More information about the llvm-commits
mailing list