Changes in directory llvm/lib/Target/ARM:

ARMConstantIslandPass.cpp updated: 1.33 -> 1.34
---
Log message:

fix off by 1 error in displacement computation


---
Diffs of the changes:  (+5 -0)

 ARMConstantIslandPass.cpp |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
diff -u llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.33 
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.34
--- llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.33  Thu Mar  1 02:26:31 2007
+++ llvm/lib/Target/ARM/ARMConstantIslandPass.cpp       Mon Apr  2 15:31:06 2007
@@ -593,6 +593,11 @@
        Water->begin()->getOpcode() != ARM::CONSTPOOL_ENTRY))
     CPEOffset += 2;
 
+  // If the CPE is to be inserted before the instruction, that will raise
+  // the offset of the instruction.
+  if (CPEOffset < UserOffset)
+    UserOffset += isThumb ? 2 : 4;
+
   return OffsetIsInRange (UserOffset, CPEOffset, MaxDisp, !isThumb);
 }
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to