From 366f8ae038c4f6a3852deed1cff322ba54689808 Mon Sep 17 00:00:00 2001 From: Serguei Katkov Date: Tue, 15 Apr 2014 16:55:26 +0700 Subject: [PATCH] GenArithOpInt should ensure that reg is in core GenArithOpInt in two-addr case of add-int where destination is in register should ensure that it is a core reg. Change-Id: I5b5ca126773a2bb45f9b23ad892102b034d694b4 Signed-off-by: Serguei Katkov --- compiler/dex/quick/x86/int_x86.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/dex/quick/x86/int_x86.cc b/compiler/dex/quick/x86/int_x86.cc index e45e7a870..46dbdf1db 100644 --- a/compiler/dex/quick/x86/int_x86.cc +++ b/compiler/dex/quick/x86/int_x86.cc @@ -2126,6 +2126,8 @@ void X86Mir2Lir::GenArithOpInt(Instruction::Code opcode, RegLocation rl_dest, // Can we do this directly into memory? rl_result = UpdateLoc(rl_dest); if (rl_result.location == kLocPhysReg) { + // Ensure res is in a core reg + rl_result = EvalLoc(rl_dest, kCoreReg, true); // Can we do this from memory directly? rl_rhs = UpdateLoc(rl_rhs); if (rl_rhs.location != kLocPhysReg) { -- 2.11.0