summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJiangning Liu <jiangning.liu@arm.com>2014-03-21 02:51:01 +0000
committerJiangning Liu <jiangning.liu@arm.com>2014-03-21 02:51:01 +0000
commitdb55b02e1ce9e192f22ac43df6d1b52c536d0eaf (patch)
tree42fd155a5129a42197cb823e0d9f1c64bf494fb3 /llvm/lib
parent531a5be4d07328b9a1b61a4ddf1b1750b1e22a68 (diff)
downloadbcm5719-llvm-db55b02e1ce9e192f22ac43df6d1b52c536d0eaf.tar.gz
bcm5719-llvm-db55b02e1ce9e192f22ac43df6d1b52c536d0eaf.zip
This reverts commit r203762, "ARM: support emission of complex SO expressions".
The commit r203762 introduced silent failure for complext SO expression, and it's even worse than compiler crash. llvm-svn: 204427
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
index a12b8d4b771..3b2ca73aecd 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
@@ -271,20 +271,8 @@ public:
unsigned getSOImmOpValue(const MCInst &MI, unsigned Op,
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const {
- int SoImmVal = -1;
-
- const MCOperand &MO = MI.getOperand(Op);
- if (MO.isImm()) {
- SoImmVal = ARM_AM::getSOImmVal(MO.getImm());
- } else if (MO.isExpr()) {
- int64_t Value;
- bool Invalid = MO.getExpr()->EvaluateAsAbsolute(Value);
- (void) Invalid;
- assert(!Invalid && "non-constant expression is not a valid SOImm operand");
- assert((Value >= INT32_MIN && Value <= INT32_MAX) &&
- "expression must be representable in 32 bits");
- SoImmVal = Value;
- }
+ unsigned SoImm = MI.getOperand(Op).getImm();
+ int SoImmVal = ARM_AM::getSOImmVal(SoImm);
assert(SoImmVal != -1 && "Not a valid so_imm value!");
// Encode rotate_imm.
OpenPOWER on IntegriCloud