Support 32-bit volatiles.
Change-Id: If40ead8e13986d589ac1d1637034e25fc4108189
diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc
index 7e09ccc..8070e8d 100644
--- a/src/compiler/codegen/arm/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc
@@ -304,7 +304,7 @@
rlDest = oatGetDestWide(cUnit, mir, 0, 1);
RegLocation rlResult = oatEvalLoc(cUnit, rlDest, kAnyReg, true);
#if ANDROID_SMP != 0
- if (isVolatile) {
+ if (field->IsVolatile()) {
oatGenMemBarrier(cUnit, kSY);
}
#endif
@@ -367,7 +367,7 @@
rlDest = oatGetDest(cUnit, mir, 0);
rlResult = oatEvalLoc(cUnit, rlDest, kAnyReg, true);
#if ANDROID_SMP != 0
- if (isVolatile) {
+ if (field->IsVolatile()) {
oatGenMemBarrier(cUnit, kSY);
}
#endif
diff --git a/src/compiler/codegen/arm/Thumb2/Gen.cc b/src/compiler/codegen/arm/Thumb2/Gen.cc
index db4dd09..a763d6e 100644
--- a/src/compiler/codegen/arm/Thumb2/Gen.cc
+++ b/src/compiler/codegen/arm/Thumb2/Gen.cc
@@ -468,7 +468,7 @@
storeValue(cUnit, rlDest, rlResult);
} else {
#if ANDROID_SMP != 0
- bool isVolatile = dvmIsVolatileField(fieldPtr);
+ bool isVolatile = fieldPtr->IsVolatile();
#else
bool isVolatile = false;
#endif
@@ -501,7 +501,7 @@
storeBaseIndexed(cUnit, rlObj.lowReg, r0, rlSrc.lowReg, 0, size);
} else {
#if ANDROID_SMP != 0
- bool isVolatile = dvmIsVolatileField(fieldPtr);
+ bool isVolatile = fieldPtr->IsVolatile();
#else
bool isVolatile = false;
#endif
@@ -539,7 +539,7 @@
storeValue(cUnit, rlDest, rlResult);
} else {
#if ANDROID_SMP != 0
- bool isVolatile = dvmIsVolatileField(fieldPtr);
+ bool isVolatile = fieldPtr->IsVolatile();
#else
bool isVolatile = false;
#endif
@@ -580,7 +580,7 @@
storePair(cUnit, r0, rlSrc.lowReg, rlSrc.highReg);
} else {
#if ANDROID_SMP != 0
- bool isVolatile = dvmIsVolatileField(fieldPtr);
+ bool isVolatile = fieldPtr->IsVolatile();
#else
bool isVolatile = false;
#endif