implement more sun.misc.Unsafe methods

This commit is contained in:
Joel Dice 2011-05-26 17:41:15 -06:00
parent 24f7b42d45
commit 05f26983d0

View File

@ -2627,6 +2627,16 @@ Avian_sun_misc_Unsafe_putByte__JB
*reinterpret_cast<int8_t*>(p) = v; *reinterpret_cast<int8_t*>(p) = v;
} }
extern "C" JNIEXPORT void JNICALL
Avian_sun_misc_Unsafe_putShort__JS
(Thread*, object, uintptr_t* arguments)
{
int64_t p; memcpy(&p, arguments + 1, 8);
int16_t v = arguments[3];
*reinterpret_cast<int16_t*>(p) = v;
}
extern "C" JNIEXPORT void JNICALL extern "C" JNIEXPORT void JNICALL
Avian_sun_misc_Unsafe_putLong__JJ Avian_sun_misc_Unsafe_putLong__JJ
(Thread*, object, uintptr_t* arguments) (Thread*, object, uintptr_t* arguments)
@ -2665,6 +2675,15 @@ Avian_sun_misc_Unsafe_getInt__J
return *reinterpret_cast<int32_t*>(p); return *reinterpret_cast<int32_t*>(p);
} }
extern "C" JNIEXPORT int64_t JNICALL
Avian_sun_misc_Unsafe_getLong__J
(Thread*, object, uintptr_t* arguments)
{
int64_t p; memcpy(&p, arguments + 1, 8);
return *reinterpret_cast<int64_t*>(p);
}
extern "C" JNIEXPORT int64_t JNICALL extern "C" JNIEXPORT int64_t JNICALL
Avian_sun_misc_Unsafe_getFloat__J Avian_sun_misc_Unsafe_getFloat__J
(Thread*, object, uintptr_t* arguments) (Thread*, object, uintptr_t* arguments)