Add opcodes for volatile field accesses
This adds instructions for {i,s}{get,put}{,-object}-volatile, for a
total of eight new instructions.
On SMP systems, these instructions will be substituted in for existing
field access instructions, either by dexopt or during just-in-time
verification. Unlike the wide-volatile instructions, these will not be
used at all when the VM is not built for SMP.
(Ideally we'd omit the volatile instruction implementations entirely on
non-SMP builds, but that requires a little work in gen-mterp.py.)
The change defines and implements the opcodes and support methods, but
does not cause them to be used.
Also, changed dvmQuasiAtomicRead64's argument to be const.
Change-Id: I9e44fe881e87f27aa41f6c6e898ec4402cb5493e
diff --git a/vm/compiler/Dataflow.c b/vm/compiler/Dataflow.c
index fe04c67..1084201 100644
--- a/vm/compiler/Dataflow.c
+++ b/vm/compiler/Dataflow.c
@@ -710,19 +710,19 @@
// E2 OP_USHR_INT_LIT8 vAA, vBB, #+CC
DF_DA | DF_UB,
- // E3 OP_UNUSED_E3
+ // E3 OP_IGET_VOLATILE
DF_NOP,
- // E4 OP_UNUSED_E4
+ // E4 OP_IPUT_VOLATILE
DF_NOP,
- // E5 OP_UNUSED_E5
+ // E5 OP_SGET_VOLATILE
DF_NOP,
- // E6 OP_UNUSED_E6
+ // E6 OP_SPUT_VOLATILE
DF_NOP,
- // E7 OP_UNUSED_E7
+ // E7 OP_IGET_OBJECT_VOLATILE
DF_NOP,
// E8 OP_IGET_WIDE_VOLATILE
@@ -785,13 +785,13 @@
// FB OP_INVOKE_SUPER_QUICK_RANGE
DF_FORMAT_3RC,
- // FC OP_UNUSED_FC
+ // FC OP_IPUT_OBJECT_VOLATILE
DF_NOP,
- // FD OP_UNUSED_FD
+ // FD OP_SGET_OBJECT_VOLATILE
DF_NOP,
- // FE OP_UNUSED_FE
+ // FE OP_SPUT_OBJECT_VOLATILE
DF_NOP,
// FF OP_UNUSED_FF