Quick compiler: improve ClobberSReg comments
Issue 6501474
Improve the comments describing the usage of ClobberSReg(). Also, desk-checked all current
uses of ClobberSReg() to make sure they are appropriate.
No code changes - only comments.
Change-Id: Ife8419a7e2c2e51b258df7709a7d903d1fd93a44
diff --git a/src/compiler/codegen/arm/fp_arm.cc b/src/compiler/codegen/arm/fp_arm.cc
index 5e0e73d..57c55cc 100644
--- a/src/compiler/codegen/arm/fp_arm.cc
+++ b/src/compiler/codegen/arm/fp_arm.cc
@@ -259,6 +259,7 @@
if (is_double) {
rl_src1 = LoadValueWide(cu, rl_src1, kFPReg);
rl_src2 = LoadValueWide(cu, rl_src2, kFPReg);
+ // In case result vreg is also a src vreg, break association to avoid useless copy by EvalLoc()
ClobberSReg(cu, rl_dest.s_reg_low);
rl_result = EvalLoc(cu, rl_dest, kCoreReg, true);
LoadConstant(cu, rl_result.low_reg, default_result);
@@ -267,6 +268,7 @@
} else {
rl_src1 = LoadValue(cu, rl_src1, kFPReg);
rl_src2 = LoadValue(cu, rl_src2, kFPReg);
+ // In case result vreg is also a srcvreg, break association to avoid useless copy by EvalLoc()
ClobberSReg(cu, rl_dest.s_reg_low);
rl_result = EvalLoc(cu, rl_dest, kCoreReg, true);
LoadConstant(cu, rl_result.low_reg, default_result);