summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorMark Mendell <mark.p.mendell@intel.com>2014-10-21 17:44:32 -0400
committerMark Mendell <mark.p.mendell@intel.com>2014-10-22 09:20:32 -0400
commita65c1dbb8d3511da6c0804f8063c453f744629c2 (patch)
treebf8d22524d37c9150dcb66049d029d6ec8223310 /compiler
parent6207b2b0c299798fd5213bb3d6c05e5b978747e8 (diff)
downloadart-a65c1dbb8d3511da6c0804f8063c453f744629c2.zip
art-a65c1dbb8d3511da6c0804f8063c453f744629c2.tar.gz
art-a65c1dbb8d3511da6c0804f8063c453f744629c2.tar.bz2
X86 Long Min/Max: Avoid calling SRegToVReg with -1
It is possible that the result of a call to min/max can't be combined with the following move. In that case, the destination will use the default long return value (EAX/EDX), with a s_reg_low value of -1. A debug compiler will assert fail in that case. Fix: A result with no s_reg_low must be unused. Just return with no code generated, like X86 GenInlinedAbsFloat(). Seen compiling GmsCore.apk on the host with a debug backend. Change-Id: I8006e822e8dcb2112d86e4047bb2e3037ba6fece Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/dex/quick/x86/int_x86.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/dex/quick/x86/int_x86.cc b/compiler/dex/quick/x86/int_x86.cc
index 07034cb..acf5599 100755
--- a/compiler/dex/quick/x86/int_x86.cc
+++ b/compiler/dex/quick/x86/int_x86.cc
@@ -858,6 +858,11 @@ bool X86Mir2Lir::GenInlinedMinMax(CallInfo* info, bool is_min, bool is_long) {
RegLocation rl_dest = InlineTargetWide(info);
int res_vreg, src1_vreg, src2_vreg;
+ if (rl_dest.s_reg_low == INVALID_SREG) {
+ // Result is unused, the code is dead. Inlining successful, no code generated.
+ return true;
+ }
+
/*
* If the result register is the same as the second element, then we
* need to be careful. The reason is that the first copy will