JIT: Fix inconsistent handling of sub-word instance git/put
The portable interpreter and fast interpreter use 32-bit accesses
for all sub-word scalars. The JIT generated code to tailor the access
to the data size. It doesn't matter which approach is taken, but all
interpreters & JIT must be consistent. Changing the JIT to use 32-bit
accesses for all sub-word instance scalars.
Fix for Issue 2973137
Change-Id: I6108ccc98c1b43974373764913d5f8d0d8723cd4
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index d0ef808..e298f3d 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -2321,24 +2321,20 @@
// NOTE: intentional fallthrough
case OP_IGET:
case OP_IGET_OBJECT:
- genIGet(cUnit, mir, kWord, fieldOffset, isVolatile);
- break;
case OP_IGET_BOOLEAN:
- genIGet(cUnit, mir, kUnsignedByte, fieldOffset, isVolatile);
- break;
case OP_IGET_BYTE:
- genIGet(cUnit, mir, kSignedByte, fieldOffset, isVolatile);
- break;
case OP_IGET_CHAR:
- genIGet(cUnit, mir, kUnsignedHalf, fieldOffset, isVolatile);
- break;
case OP_IGET_SHORT:
- genIGet(cUnit, mir, kSignedHalf, fieldOffset, isVolatile);
+ genIGet(cUnit, mir, kWord, fieldOffset, isVolatile);
break;
case OP_IPUT_WIDE:
genIPutWide(cUnit, mir, fieldOffset);
break;
case OP_IPUT:
+ case OP_IPUT_SHORT:
+ case OP_IPUT_CHAR:
+ case OP_IPUT_BYTE:
+ case OP_IPUT_BOOLEAN:
genIPut(cUnit, mir, kWord, fieldOffset, false, isVolatile);
break;
case OP_IPUT_VOLATILE:
@@ -2348,16 +2344,6 @@
case OP_IPUT_OBJECT:
genIPut(cUnit, mir, kWord, fieldOffset, true, isVolatile);
break;
- case OP_IPUT_SHORT:
- case OP_IPUT_CHAR:
- genIPut(cUnit, mir, kUnsignedHalf, fieldOffset, false, isVolatile);
- break;
- case OP_IPUT_BYTE:
- genIPut(cUnit, mir, kSignedByte, fieldOffset, false, isVolatile);
- break;
- case OP_IPUT_BOOLEAN:
- genIPut(cUnit, mir, kUnsignedByte, fieldOffset, false, isVolatile);
- break;
case OP_IGET_WIDE_VOLATILE:
case OP_IPUT_WIDE_VOLATILE:
genInterpSingleStep(cUnit, mir);