Def/Use mask fix for vldm/vstm
We're using a few new Thumb instructions now (floating point load and
store multiple), and the calculation of the use/def masks was incorrect.
Change-Id: I3eb17ebf6dc3bc2e6e8a4da48228cad6ff7c5cfb
diff --git a/src/compiler/codegen/arm/CodegenCommon.cc b/src/compiler/codegen/arm/CodegenCommon.cc
index 208eecf..4b9b592 100644
--- a/src/compiler/codegen/arm/CodegenCommon.cc
+++ b/src/compiler/codegen/arm/CodegenCommon.cc
@@ -165,6 +165,12 @@
lir->defMask |= ENCODE_REG_FPCS_LIST(lir->operands[0]);
}
+ if (flags & REG_DEF_FPCS_LIST2) {
+ for (int i = 0; i < lir->operands[2]; i++) {
+ setupRegMask(&lir->defMask, lir->operands[1] + i);
+ }
+ }
+
if (flags & SETS_CCODES) {
lir->defMask |= ENCODE_CCODE;
}
@@ -205,7 +211,9 @@
}
if (flags & REG_USE_FPCS_LIST2) {
- lir->useMask |= ENCODE_REG_FPCS_LIST(lir->operands[2] >> 16);
+ for (int i = 0; i < lir->operands[2]; i++) {
+ setupRegMask(&lir->useMask, lir->operands[1] + i);
+ }
}
if (flags & USES_CCODES) {