OSDN Git Service

Slow path for iget should expect return in core reg
authorSerguei Katkov <serguei.i.katkov@intel.com>
Mon, 7 Jul 2014 17:45:45 +0000 (00:45 +0700)
committerSerguei Katkov <serguei.i.katkov@intel.com>
Thu, 10 Jul 2014 07:01:21 +0000 (14:01 +0700)
Slow path for iget invokes the C implementation.
In all cases the C function returns the result in core reg.
So implementation should expect the result in core reg
independent on whether it is fp or not.

Change-Id: I57fb0e684c38af22316398d8071f087bd4bd253c
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
compiler/dex/quick/gen_common.cc

index b31e9a2..6dc019a 100644 (file)
@@ -820,11 +820,12 @@ void Mir2Lir::GenIGet(MIR* mir, int opt_flags, OpSize size,
     } else {
       GenIgetCall<4>(this, is_long_or_double, is_object, &field_info, rl_obj);
     }
+    // FIXME: pGetXXInstance always return an int or int64 regardless of rl_dest.fp.
     if (is_long_or_double) {
-      RegLocation rl_result = GetReturnWide(LocToRegClass(rl_dest));
+      RegLocation rl_result = GetReturnWide(kCoreReg);
       StoreValueWide(rl_dest, rl_result);
     } else {
-      RegLocation rl_result = GetReturn(LocToRegClass(rl_dest));
+      RegLocation rl_result = GetReturn(rl_dest.ref ? kRefReg : kCoreReg);
       StoreValue(rl_dest, rl_result);
     }
   }