From fee5d2340486fdc88f5795deda4e1719411aad6f Mon Sep 17 00:00:00 2001 From: Stepan Dyatkovskiy Date: Thu, 27 Mar 2014 08:38:18 +0000 Subject: [PATCH] Rejected r204899 and r204900 due to remaining test failures on cmake-llvm-x86_64-linux buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204901 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../ARM/MCTargetDesc/ARMMCCodeEmitter.cpp | 18 +----------------- test/MC/ARM/cmp-immediate-fixup.s | 9 --------- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 test/MC/ARM/cmp-immediate-fixup.s diff --git a/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp b/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp index 6f8b699d4c5..3b2ca73aecd 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp @@ -271,23 +271,7 @@ public: unsigned getSOImmOpValue(const MCInst &MI, unsigned Op, SmallVectorImpl &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 index 41cdb6dc09c..00000000000 --- a/test/MC/ARM/cmp-immediate-fixup.s +++ /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: