From 5539ad0fe3ac455ac3f8b051f3b4502729f0ba53 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Mon, 2 Apr 2012 14:36:55 +0800 Subject: Fix SHL, SHR, USHR implementation bug. Change-Id: I506469f69087759b4ae30fad084f9fe3c559c2d6 --- src/compiler_llvm/method_compiler.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/compiler_llvm/method_compiler.h') diff --git a/src/compiler_llvm/method_compiler.h b/src/compiler_llvm/method_compiler.h index 31274474ef..7e5604605a 100644 --- a/src/compiler_llvm/method_compiler.h +++ b/src/compiler_llvm/method_compiler.h @@ -112,6 +112,9 @@ class MethodCompiler { kIntArithm_And, kIntArithm_Or, kIntArithm_Xor, + }; + + enum IntShiftArithmKind { kIntArithm_Shl, kIntArithm_Shr, kIntArithm_UShr, @@ -222,6 +225,12 @@ class MethodCompiler { void EmitInsn_IntArithmImmediate(GEN_INSN_ARGS, IntArithmKind arithm); + void EmitInsn_IntShiftArithm(GEN_INSN_ARGS, IntShiftArithmKind arithm, + JType op_jty, bool is_2addr); + + void EmitInsn_IntShiftArithmImmediate(GEN_INSN_ARGS, + IntShiftArithmKind arithm); + void EmitInsn_RSubImmediate(GEN_INSN_ARGS); @@ -275,6 +284,12 @@ class MethodCompiler { IntArithmKind arithm, JType op_jty); + llvm::Value* EmitIntShiftArithmResultComputation(uint32_t dex_pc, + llvm::Value* lhs, + llvm::Value* rhs, + IntShiftArithmKind arithm, + JType op_jty); + llvm::Value* EmitFPArithmResultComputation(uint32_t dex_pc, llvm::Value* lhs, llvm::Value* rhs, -- cgit v1.2.3-59-g8ed1b