diff options
| author | 2012-08-03 14:05:41 -0700 | |
|---|---|---|
| committer | 2012-08-03 14:05:41 -0700 | |
| commit | 63ebbb68631caaf1de0588ece186af4018c33cfd (patch) | |
| tree | 5898dceb78e4753e2d2bb411204b5f3c7f47173d /src/compiler/codegen | |
| parent | 8b503db0432981c6b0b2271723f9bcf9448a554a (diff) | |
Quick compiler: fix NOT_LONG codegen
The llvm ir-builder converts Not operands into xor w/ -1. Detect
and restore original operation on the GBC to LIR path.
Change-Id: I219bcdc6b2e3ee8bb6cfea4c0b159deb10207359
Diffstat (limited to 'src/compiler/codegen')
| -rw-r--r-- | src/compiler/codegen/MethodBitcode.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/codegen/MethodBitcode.cc b/src/compiler/codegen/MethodBitcode.cc index b38ba7759c..8e9f15fa76 100644 --- a/src/compiler/codegen/MethodBitcode.cc +++ b/src/compiler/codegen/MethodBitcode.cc @@ -2363,7 +2363,10 @@ void cvtBinOp(CompilationUnit* cUnit, OpKind op, llvm::Instruction* inst) Instruction::Code dalvikOp = getDalvikOpcode(op, false, rlDest.wide); RegLocation rlSrc2; if (constRhs != NULL) { - DCHECK_EQ(dalvikOp, Instruction::NOT_LONG); + // ir_builder converts NOT_LONG to xor src, -1. Restore + DCHECK_EQ(dalvikOp, Instruction::XOR_LONG); + DCHECK_EQ(-1L, constRhs->getSExtValue()); + dalvikOp = Instruction::NOT_LONG; rlSrc2 = rlSrc1; } else { rlSrc2 = getLoc(cUnit, rhs); |