@@ -462,7 +462,9 @@ VM_MHInterpreter::dispatchLoop(j9object_t methodHandle)
462
462
nextAction = THROW_NPE;
463
463
goto done;
464
464
}
465
- _objectAccessBarrier->inlineMixedObjectStoreU32 (_currentThread, objectref, fieldOffset, *(U_32*)_currentThread->sp , isVolatile);
465
+ U_32 value = *(U_32*)_currentThread->sp ;
466
+ narrow32BitValue (fieldClass, value);
467
+ _objectAccessBarrier->inlineMixedObjectStoreU32 (_currentThread, objectref, fieldOffset, value, isVolatile);
466
468
_currentThread->sp += 2 ;
467
469
}
468
470
} else {
@@ -522,19 +524,19 @@ VM_MHInterpreter::dispatchLoop(j9object_t methodHandle)
522
524
J9Class *fieldClass = J9VM_J9CLASS_FROM_HEAPCLASS (_currentThread, fieldClassObject);
523
525
U_32 modifiers = getPrimitiveHandleModifiers (methodHandle);
524
526
bool isVolatile = (J9StaticFieldRefVolatile == (modifiers & J9StaticFieldRefVolatile));
525
- {
526
- if (J9ROMCLASS_IS_PRIMITIVE_TYPE (fieldClass->romClass )) {
527
- if (8 == ((J9ROMReflectClass *)(fieldClass->romClass ))->elementSize ) {
528
- _objectAccessBarrier->inlineStaticStoreU64 (_currentThread, defc, (U_64*)srcAddress, *(U_64*)_currentThread->sp , isVolatile);
529
- _currentThread->sp += 3 ;
530
- } else {
531
- _objectAccessBarrier->inlineStaticStoreU32 (_currentThread, defc, (U_32*)srcAddress, *(U_32*)_currentThread->sp , isVolatile);
532
- _currentThread->sp += 2 ;
533
- }
527
+ if (J9ROMCLASS_IS_PRIMITIVE_TYPE (fieldClass->romClass )) {
528
+ if (8 == ((J9ROMReflectClass *)(fieldClass->romClass ))->elementSize ) {
529
+ _objectAccessBarrier->inlineStaticStoreU64 (_currentThread, defc, (U_64*)srcAddress, *(U_64*)_currentThread->sp , isVolatile);
530
+ _currentThread->sp += 3 ;
534
531
} else {
535
- _objectAccessBarrier->inlineStaticStoreObject (_currentThread, defc, (j9object_t *)srcAddress, *(j9object_t *)_currentThread->sp , isVolatile);
532
+ U_32 value = *(U_32*)_currentThread->sp ;
533
+ narrow32BitValue (fieldClass, value);
534
+ _objectAccessBarrier->inlineStaticStoreU32 (_currentThread, defc, (U_32*)srcAddress, value, isVolatile);
536
535
_currentThread->sp += 2 ;
537
536
}
537
+ } else {
538
+ _objectAccessBarrier->inlineStaticStoreObject (_currentThread, defc, (j9object_t *)srcAddress, *(j9object_t *)_currentThread->sp , isVolatile);
539
+ _currentThread->sp += 2 ;
538
540
}
539
541
goto returnFromSend;
540
542
}
0 commit comments