Add dependency for operations with x86 FPU stack
Load Hoisting optimization can re-order operations with
FPU stack due to no dependency set.
Patch adds resource dependency between these operations.
Change-Id: Iccce98c8f3c565903667c03803884d9de1281ea8
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc
index 7b2be0e..9994927 100644
--- a/compiler/dex/quick/x86/target_x86.cc
+++ b/compiler/dex/quick/x86/target_x86.cc
@@ -191,6 +191,11 @@
SetupRegMask(&lir->u.m.use_mask, rDI);
SetupRegMask(&lir->u.m.def_mask, rDI);
}
+
+ if (flags & USE_FP_STACK) {
+ lir->u.m.use_mask |= ENCODE_X86_FP_STACK;
+ lir->u.m.def_mask |= ENCODE_X86_FP_STACK;
+ }
}
/* For dumping instructions */