Rejected r204899 and r204900 due to remaining test failures on cmake-llvm-x86_64...
authorStepan Dyatkovskiy <stpworld@narod.ru>
Thu, 27 Mar 2014 08:38:18 +0000 (08:38 +0000)
committerStepan Dyatkovskiy <stpworld@narod.ru>
Thu, 27 Mar 2014 08:38:18 +0000 (08:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204901 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
test/MC/ARM/cmp-immediate-fixup.s [deleted file]

index 6f8b699d4c5e55982f6520eb4582e8204abd8cf9..3b2ca73aecd1d7677a9c8d68eaf46d524edf7329 100644 (file)
@@ -271,23 +271,7 @@ public:
   unsigned getSOImmOpValue(const MCInst &MI, unsigned Op,
                            SmallVectorImpl<MCFixup> &Fixups,
                            const MCSubtargetInfo &STI) const {
-
-    const MCOperand &MO = MI.getOperand(Op);
-
-    // We expect MO to be an immediate or an expression,
-    // if it is an immediate - that's fine, just encode the value.
-    // Otherwise - create a Fixup.
-    if (MO.isExpr()) {
-      const MCExpr *Expr = MO.getExpr();
-      // In instruction code this value always encoded as lowest 12 bits,
-      // so we don't have to perform any specific adjustments and
-      // can use just 2-bytes fixup.
-      MCFixupKind Kind = MCFixupKind(FK_Data_2);
-      Fixups.push_back(MCFixup::Create(0, Expr, Kind, MI.getLoc()));
-      return 0;
-    }
-
-    unsigned SoImm = MO.getImm();
+    unsigned SoImm = MI.getOperand(Op).getImm();
     int SoImmVal = ARM_AM::getSOImmVal(SoImm);
     assert(SoImmVal != -1 && "Not a valid so_imm value!");
 
diff --git a/test/MC/ARM/cmp-immediate-fixup.s b/test/MC/ARM/cmp-immediate-fixup.s
deleted file mode 100644 (file)
index 41cdb6d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// PR18931
-// RUN: llvm-mc %s -triple=arm-linux-gnueabi -filetype=obj -o %t
-// RUN: llvm-objdump --disassemble -arch=arm %t | FileCheck %s
-
-    .text
-// CHECK: cmp r2, #1
-    cmp r2, #(l2 - l1 + 4) >> 2
-l1:
-l2: