Lines Matching refs:jlong
76 inline void* addr_from_java(jlong addr) {
84 inline jlong addr_to_java(void* p) {
100 inline jlong field_offset_to_byte_offset(jlong field_offset) {
104 inline jlong field_offset_from_byte_offset(jlong byte_offset) {
116 inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) {
117 jlong byte_offset = field_offset_to_byte_offset(field_offset);
122 assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset");
128 jlong p_size = HeapWordSize * (jlong)(p->size());
140 jlong Unsafe_field_offset_to_byte_offset(jlong field_offset) {
143 jlong Unsafe_field_offset_from_byte_offset(jlong byte_offset) {
247 UNSAFE_ENTRY(jobject, Unsafe_GetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset))
278 UNSAFE_ENTRY(void, Unsafe_SetObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h))
289 UNSAFE_ENTRY(jobject, Unsafe_GetObjectVolatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset))
304 UNSAFE_ENTRY(void, Unsafe_SetObjectVolatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h))
319 // Sparc and X86 have atomic jlong (8 bytes) instructions
322 // Keep old code for platforms which may not have atomic jlong (8 bytes) instructions
327 UNSAFE_ENTRY(jlong, Unsafe_GetLongVolatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset))
331 GET_FIELD_VOLATILE(obj, offset, jlong, v);
336 jlong* addr = (jlong*)(index_oop_from_field_offset_long(p(), offset));
338 jlong value = *addr;
344 UNSAFE_ENTRY(void, Unsafe_SetLongVolatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong x))
348 SET_FIELD_VOLATILE(obj, offset, jlong, x);
352 jlong* addr = (jlong*)(index_oop_from_field_offset_long(p(), offset));
376 UNSAFE_ENTRY(jboolean, Unsafe_Get##Boolean(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) \
382 UNSAFE_ENTRY(void, Unsafe_Set##Boolean(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jboolean x)) \
394 DEFINE_GETSETOOP(jlong, Long);
402 UNSAFE_ENTRY(jboolean, Unsafe_Get##Boolean##Volatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset)) \
408 UNSAFE_ENTRY(void, Unsafe_Set##Boolean##Volatile(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jboolean x)) \
424 // Sparc and X86 have atomic jlong (8 bytes) instructions
425 DEFINE_GETSETOOP_VOLATILE(jlong, Long);
432 UNSAFE_ENTRY(void, Unsafe_SetOrderedInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint x))
437 UNSAFE_ENTRY(void, Unsafe_SetOrderedObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject x_h))
451 UNSAFE_ENTRY(void, Unsafe_SetOrderedLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong x))
454 // Sparc and X86 have atomic jlong (8 bytes) instructions
455 SET_FIELD_VOLATILE(obj, offset, jlong, x);
460 SET_FIELD_VOLATILE(obj, offset, jlong, x);
464 jlong* addr = (jlong*)(index_oop_from_field_offset_long(p(), offset));
479 UNSAFE_ENTRY(java_type, Unsafe_GetNative##Type(JNIEnv *env, jobject unsafe, jlong addr)) \
489 UNSAFE_ENTRY(void, Unsafe_SetNative##Type(JNIEnv *env, jobject unsafe, jlong addr, java_type x)) \
510 UNSAFE_ENTRY(jlong, Unsafe_GetNativeLong(JNIEnv *env, jobject unsafe, jlong addr))
514 // bit loads, as jlong in heap could be not 64-bit aligned, and on
518 jlong x;
520 // jlong is aligned, do a volatile access
521 x = *(volatile jlong*)p;
532 UNSAFE_ENTRY(void, Unsafe_SetNativeLong(JNIEnv *env, jobject unsafe, jlong addr, jlong x))
539 // jlong is aligned, do a volatile access
540 *(volatile jlong*)p = x;
551 UNSAFE_ENTRY(jlong, Unsafe_GetNativeAddress(JNIEnv *env, jobject unsafe, jlong addr))
557 UNSAFE_ENTRY(void, Unsafe_SetNativeAddress(JNIEnv *env, jobject unsafe, jlong addr, jlong x))
574 UNSAFE_ENTRY(jlong, Unsafe_AllocateMemory(JNIEnv *env, jobject unsafe, jlong size))
592 UNSAFE_ENTRY(jlong, Unsafe_ReallocateMemory(JNIEnv *env, jobject unsafe, jlong addr, jlong size))
611 UNSAFE_ENTRY(void, Unsafe_FreeMemory(JNIEnv *env, jobject unsafe, jlong addr))
620 UNSAFE_ENTRY(void, Unsafe_SetMemory(JNIEnv *env, jobject unsafe, jlong addr, jlong size, jbyte value))
630 UNSAFE_ENTRY(void, Unsafe_SetMemory2(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong size, jbyte value))
641 UNSAFE_ENTRY(void, Unsafe_CopyMemory(JNIEnv *env, jobject unsafe, jlong srcAddr, jlong dstAddr, jlong size))
655 UNSAFE_ENTRY(void, Unsafe_CopyMemory2(JNIEnv *env, jobject unsafe, jobject srcObj, jlong srcOffset, jobject dstObj, jlong dstOffset, jlong size))
716 UNSAFE_ENTRY(jlong, Unsafe_ObjectFieldOffset(JNIEnv *env, jobject unsafe, jobject field))
721 UNSAFE_ENTRY(jlong, Unsafe_StaticFieldOffset(JNIEnv *env, jobject unsafe, jobject field))
753 jlong offset = find_field_offset(field, -1, THREAD);
1156 UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapObject(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jobject e_h, jobject x_h))
1174 UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x))
1181 UNSAFE_ENTRY(jboolean, Unsafe_CompareAndSwapLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x))
1184 jlong* addr = (jlong*)(index_oop_from_field_offset_long(p(), offset));
1186 return (jlong)(Atomic::cmpxchg(x, addr, e)) == e;
1195 UNSAFE_ENTRY(void, Unsafe_Park(JNIEnv *env, jobject unsafe, jboolean isAbsolute, jlong time))
1227 jlong lp = java_lang_Thread::park_event(java_thread);
1229 // This cast is OK even though the jlong might have been read
1288 UNSAFE_ENTRY(void, Unsafe_PrefetchRead(JNIEnv* env, jclass ignored, jobject obj, jlong offset))
1295 UNSAFE_ENTRY(void, Unsafe_PrefetchWrite(JNIEnv* env, jclass ignored, jobject obj, jlong offset))