summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/gen_loadstore.cc
diff options
context:
space:
mode:
authorAlexei Zavjalov <alexei.zavjalov@intel.com>2014-02-26 10:38:23 +0700
committerAlexei Zavjalov <alexei.zavjalov@intel.com>2014-02-26 16:46:13 +0700
commitc17ebe866beb50eb6da1e6a47555cb4731467f3b (patch)
tree704a456285312482394cb15e02dbfaa23e386f0f /compiler/dex/quick/gen_loadstore.cc
parentef2cc5a9c6e508a3e8b24d04ca35f7422f27e112 (diff)
downloadart-c17ebe866beb50eb6da1e6a47555cb4731467f3b.zip
art-c17ebe866beb50eb6da1e6a47555cb4731467f3b.tar.gz
art-c17ebe866beb50eb6da1e6a47555cb4731467f3b.tar.bz2
Incorrect result of the "mul-long by 1" operation
ART handles "mul-long by 1" as a special case and try to alloc a new pair of regs through the EvalLocWide method and then put there the multiplicand through the StoreValueWide method. But in case when both multiplicand and multiplier are constants, it will not place correct values in a new reg pair and result of calculations will be incorrect. The new solution uses the only StoreValueWide method. Change-Id: I3d6947737c92c5a12f2840003b17a427e31d288f Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
Diffstat (limited to 'compiler/dex/quick/gen_loadstore.cc')
-rw-r--r--compiler/dex/quick/gen_loadstore.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/dex/quick/gen_loadstore.cc b/compiler/dex/quick/gen_loadstore.cc
index f7c2821..7aef93e 100644
--- a/compiler/dex/quick/gen_loadstore.cc
+++ b/compiler/dex/quick/gen_loadstore.cc
@@ -240,6 +240,8 @@ void Mir2Lir::StoreValueWide(RegLocation rl_dest, RegLocation rl_src) {
DCHECK_EQ(IsFpReg(rl_src.low_reg), IsFpReg(rl_src.high_reg));
DCHECK(rl_dest.wide);
DCHECK(rl_src.wide);
+ rl_src = UpdateLocWide(rl_src);
+ rl_dest = UpdateLocWide(rl_dest);
if (rl_src.location == kLocPhysReg) {
if (IsLive(rl_src.low_reg) ||
IsLive(rl_src.high_reg) ||