diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index 92013ceab3..9174039511 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -2699,6 +2699,16 @@ Avian_sun_misc_Unsafe_getShort__Ljava_lang_Object_2J return fieldAtOffset(o, offset); } +extern "C" JNIEXPORT int64_t JNICALL +Avian_sun_misc_Unsafe_getChar__Ljava_lang_Object_2J +(Thread*, object, uintptr_t* arguments) +{ + object o = reinterpret_cast(arguments[1]); + int64_t offset; memcpy(&offset, arguments + 2, 8); + + return fieldAtOffset(o, offset); +} + extern "C" JNIEXPORT int64_t JNICALL Avian_sun_misc_Unsafe_getInt__Ljava_lang_Object_2J (Thread*, object, uintptr_t* arguments) @@ -2805,6 +2815,17 @@ Avian_sun_misc_Unsafe_putShort__Ljava_lang_Object_2JS fieldAtOffset(o, offset) = value; } +extern "C" JNIEXPORT void JNICALL +Avian_sun_misc_Unsafe_putChar__Ljava_lang_Object_2JC +(Thread*, object, uintptr_t* arguments) +{ + object o = reinterpret_cast(arguments[1]); + int64_t offset; memcpy(&offset, arguments + 2, 8); + uint16_t value = arguments[4]; + + fieldAtOffset(o, offset) = value; +} + extern "C" JNIEXPORT void JNICALL Avian_sun_misc_Unsafe_putInt__Ljava_lang_Object_2JI (Thread*, object, uintptr_t* arguments)