Last active
October 29, 2024 15:13
-
-
Save apangin/7a9b7062a4bd0cd41fcc to your computer and use it in GitHub Desktop.
HotSpot JVM intrinsics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This program generates a list of HotSpot intrinsic methods available in OpenJDK 8 | |
// For OpenJDK 9 see https://gist.github.com/apangin/8bc69f06879a86163e490a61931b37e8 | |
// Insert definitions from hotspot/src/share/vm/classfile/vmSymbols.hpp here | |
#include <stdio.h> | |
#define DECLARE(id, name) static const char* id = name; | |
#define PRINT(id, class, name, sig, flags) printf("%-40s%s.%s%s\n", #id, class, name, sig); | |
VM_SYMBOLS_DO(DECLARE, VM_SYMBOL_IGNORE) | |
VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, DECLARE) | |
int main() { | |
VM_INTRINSICS_DO(PRINT, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE) | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_hashCode java/lang/Object.hashCode()I | |
_getClass java/lang/Object.getClass()Ljava/lang/Class; | |
_clone java/lang/Object.clone()Ljava/lang/Object; | |
_dabs java/lang/Math.abs(D)D | |
_dsin java/lang/Math.sin(D)D | |
_dcos java/lang/Math.cos(D)D | |
_dtan java/lang/Math.tan(D)D | |
_datan2 java/lang/Math.atan2(DD)D | |
_dsqrt java/lang/Math.sqrt(D)D | |
_dlog java/lang/Math.log(D)D | |
_dlog10 java/lang/Math.log10(D)D | |
_dpow java/lang/Math.pow(DD)D | |
_dexp java/lang/Math.exp(D)D | |
_min java/lang/Math.min(II)I | |
_max java/lang/Math.max(II)I | |
_addExactI java/lang/Math.addExact(II)I | |
_addExactL java/lang/Math.addExact(JJ)J | |
_decrementExactI java/lang/Math.decrementExact(I)I | |
_decrementExactL java/lang/Math.decrementExact(J)J | |
_incrementExactI java/lang/Math.incrementExact(I)I | |
_incrementExactL java/lang/Math.incrementExact(J)J | |
_multiplyExactI java/lang/Math.multiplyExact(II)I | |
_multiplyExactL java/lang/Math.multiplyExact(JJ)J | |
_negateExactI java/lang/Math.negateExact(I)I | |
_negateExactL java/lang/Math.negateExact(J)J | |
_subtractExactI java/lang/Math.subtractExact(II)I | |
_subtractExactL java/lang/Math.subtractExact(JJ)J | |
_floatToRawIntBits java/lang/Float.floatToRawIntBits(F)I | |
_floatToIntBits java/lang/Float.floatToIntBits(F)I | |
_intBitsToFloat java/lang/Float.intBitsToFloat(I)F | |
_doubleToRawLongBits java/lang/Double.doubleToRawLongBits(D)J | |
_doubleToLongBits java/lang/Double.doubleToLongBits(D)J | |
_longBitsToDouble java/lang/Double.longBitsToDouble(J)D | |
_numberOfLeadingZeros_i java/lang/Integer.numberOfLeadingZeros(I)I | |
_numberOfLeadingZeros_l java/lang/Long.numberOfLeadingZeros(J)I | |
_numberOfTrailingZeros_i java/lang/Integer.numberOfTrailingZeros(I)I | |
_numberOfTrailingZeros_l java/lang/Long.numberOfTrailingZeros(J)I | |
_bitCount_i java/lang/Integer.bitCount(I)I | |
_bitCount_l java/lang/Long.bitCount(J)I | |
_reverseBytes_i java/lang/Integer.reverseBytes(I)I | |
_reverseBytes_l java/lang/Long.reverseBytes(J)J | |
_reverseBytes_c java/lang/Character.reverseBytes(C)C | |
_reverseBytes_s java/lang/Short.reverseBytes(S)S | |
_identityHashCode java/lang/System.identityHashCode(Ljava/lang/Object;)I | |
_currentTimeMillis java/lang/System.currentTimeMillis()J | |
_nanoTime java/lang/System.nanoTime()J | |
_arraycopy java/lang/System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V | |
_isInterrupted java/lang/Thread.isInterrupted(Z)Z | |
_currentThread java/lang/Thread.currentThread()Ljava/lang/Thread; | |
_isAssignableFrom java/lang/Class.isAssignableFrom(Ljava/lang/Class;)Z | |
_isInstance java/lang/Class.isInstance(Ljava/lang/Object;)Z | |
_getModifiers java/lang/Class.getModifiers()I | |
_isInterface java/lang/Class.isInterface()Z | |
_isArray java/lang/Class.isArray()Z | |
_isPrimitive java/lang/Class.isPrimitive()Z | |
_getSuperclass java/lang/Class.getSuperclass()Ljava/lang/Class; | |
_getComponentType java/lang/Class.getComponentType()Ljava/lang/Class; | |
_getClassAccessFlags sun/reflect/Reflection.getClassAccessFlags(Ljava/lang/Class;)I | |
_getLength java/lang/reflect/Array.getLength(Ljava/lang/Object;)I | |
_getCallerClass sun/reflect/Reflection.getCallerClass()Ljava/lang/Class; | |
_newArray java/lang/reflect/Array.newArray(Ljava/lang/Class;I)Ljava/lang/Object; | |
_copyOf java/util/Arrays.copyOf([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object; | |
_copyOfRange java/util/Arrays.copyOfRange([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object; | |
_equalsC java/util/Arrays.equals([C[C)Z | |
_compareTo java/lang/String.compareTo(Ljava/lang/String;)I | |
_indexOf java/lang/String.indexOf(Ljava/lang/String;)I | |
_equals java/lang/String.equals(Ljava/lang/Object;)Z | |
_checkIndex java/nio/Buffer.checkIndex(I)I | |
_encodeISOArray sun/nio/cs/ISO_8859_1$Encoder.encodeISOArray([CI[BII)I | |
_multiplyToLen java/math/BigInteger.multiplyToLen([II[II[I)[I | |
_Reference_get java/lang/ref/Reference.get()Ljava/lang/Object; | |
_aescrypt_encryptBlock com/sun/crypto/provider/AESCrypt.encryptBlock([BI[BI)V | |
_aescrypt_decryptBlock com/sun/crypto/provider/AESCrypt.decryptBlock([BI[BI)V | |
_cipherBlockChaining_encryptAESCrypt com/sun/crypto/provider/CipherBlockChaining.encrypt([BII[BI)I | |
_cipherBlockChaining_decryptAESCrypt com/sun/crypto/provider/CipherBlockChaining.decrypt([BII[BI)I | |
_sha_implCompress sun/security/provider/SHA.implCompress([BI)V | |
_sha2_implCompress sun/security/provider/SHA2.implCompress([BI)V | |
_sha5_implCompress sun/security/provider/SHA5.implCompress([BI)V | |
_digestBase_implCompressMB sun/security/provider/DigestBase.implCompressMultiBlock([BII)I | |
_updateCRC32 java/util/zip/CRC32.update(II)I | |
_updateBytesCRC32 java/util/zip/CRC32.updateBytes(I[BII)I | |
_updateByteBufferCRC32 java/util/zip/CRC32.updateByteBuffer(IJII)I | |
_allocateInstance sun/misc/Unsafe.allocateInstance(Ljava/lang/Class;)Ljava/lang/Object; | |
_copyMemory sun/misc/Unsafe.copyMemory(Ljava/lang/Object;JLjava/lang/Object;JJ)V | |
_park sun/misc/Unsafe.park(ZJ)V | |
_unpark sun/misc/Unsafe.unpark(Ljava/lang/Object;)V | |
_loadFence sun/misc/Unsafe.loadFence()V | |
_storeFence sun/misc/Unsafe.storeFence()V | |
_fullFence sun/misc/Unsafe.fullFence()V | |
_profileBoolean java/lang/invoke/MethodHandleImpl.profileBoolean(Z[I)Z | |
_getObject sun/misc/Unsafe.getObject(Ljava/lang/Object;J)Ljava/lang/Object; | |
_getBoolean sun/misc/Unsafe.getBoolean(Ljava/lang/Object;J)Z | |
_getByte sun/misc/Unsafe.getByte(Ljava/lang/Object;J)B | |
_getShort sun/misc/Unsafe.getShort(Ljava/lang/Object;J)S | |
_getChar sun/misc/Unsafe.getChar(Ljava/lang/Object;J)C | |
_getInt sun/misc/Unsafe.getInt(Ljava/lang/Object;J)I | |
_getLong sun/misc/Unsafe.getLong(Ljava/lang/Object;J)J | |
_getFloat sun/misc/Unsafe.getFloat(Ljava/lang/Object;J)F | |
_getDouble sun/misc/Unsafe.getDouble(Ljava/lang/Object;J)D | |
_putObject sun/misc/Unsafe.putObject(Ljava/lang/Object;JLjava/lang/Object;)V | |
_putBoolean sun/misc/Unsafe.putBoolean(Ljava/lang/Object;JZ)V | |
_putByte sun/misc/Unsafe.putByte(Ljava/lang/Object;JB)V | |
_putShort sun/misc/Unsafe.putShort(Ljava/lang/Object;JS)V | |
_putChar sun/misc/Unsafe.putChar(Ljava/lang/Object;JC)V | |
_putInt sun/misc/Unsafe.putInt(Ljava/lang/Object;JI)V | |
_putLong sun/misc/Unsafe.putLong(Ljava/lang/Object;JJ)V | |
_putFloat sun/misc/Unsafe.putFloat(Ljava/lang/Object;JF)V | |
_putDouble sun/misc/Unsafe.putDouble(Ljava/lang/Object;JD)V | |
_getObjectVolatile sun/misc/Unsafe.getObjectVolatile(Ljava/lang/Object;J)Ljava/lang/Object; | |
_getBooleanVolatile sun/misc/Unsafe.getBooleanVolatile(Ljava/lang/Object;J)Z | |
_getByteVolatile sun/misc/Unsafe.getByteVolatile(Ljava/lang/Object;J)B | |
_getShortVolatile sun/misc/Unsafe.getShortVolatile(Ljava/lang/Object;J)S | |
_getCharVolatile sun/misc/Unsafe.getCharVolatile(Ljava/lang/Object;J)C | |
_getIntVolatile sun/misc/Unsafe.getIntVolatile(Ljava/lang/Object;J)I | |
_getLongVolatile sun/misc/Unsafe.getLongVolatile(Ljava/lang/Object;J)J | |
_getFloatVolatile sun/misc/Unsafe.getFloatVolatile(Ljava/lang/Object;J)F | |
_getDoubleVolatile sun/misc/Unsafe.getDoubleVolatile(Ljava/lang/Object;J)D | |
_putObjectVolatile sun/misc/Unsafe.putObjectVolatile(Ljava/lang/Object;JLjava/lang/Object;)V | |
_putBooleanVolatile sun/misc/Unsafe.putBooleanVolatile(Ljava/lang/Object;JZ)V | |
_putByteVolatile sun/misc/Unsafe.putByteVolatile(Ljava/lang/Object;JB)V | |
_putShortVolatile sun/misc/Unsafe.putShortVolatile(Ljava/lang/Object;JS)V | |
_putCharVolatile sun/misc/Unsafe.putCharVolatile(Ljava/lang/Object;JC)V | |
_putIntVolatile sun/misc/Unsafe.putIntVolatile(Ljava/lang/Object;JI)V | |
_putLongVolatile sun/misc/Unsafe.putLongVolatile(Ljava/lang/Object;JJ)V | |
_putFloatVolatile sun/misc/Unsafe.putFloatVolatile(Ljava/lang/Object;JF)V | |
_putDoubleVolatile sun/misc/Unsafe.putDoubleVolatile(Ljava/lang/Object;JD)V | |
_getByte_raw sun/misc/Unsafe.getByte(J)B | |
_getShort_raw sun/misc/Unsafe.getShort(J)S | |
_getChar_raw sun/misc/Unsafe.getChar(J)C | |
_getInt_raw sun/misc/Unsafe.getInt(J)I | |
_getLong_raw sun/misc/Unsafe.getLong(J)J | |
_getFloat_raw sun/misc/Unsafe.getFloat(J)F | |
_getDouble_raw sun/misc/Unsafe.getDouble(J)D | |
_getAddress_raw sun/misc/Unsafe.getAddress(J)J | |
_putByte_raw sun/misc/Unsafe.putByte(JB)V | |
_putShort_raw sun/misc/Unsafe.putShort(JS)V | |
_putChar_raw sun/misc/Unsafe.putChar(JC)V | |
_putInt_raw sun/misc/Unsafe.putInt(JI)V | |
_putLong_raw sun/misc/Unsafe.putLong(JJ)V | |
_putFloat_raw sun/misc/Unsafe.putFloat(JF)V | |
_putDouble_raw sun/misc/Unsafe.putDouble(JD)V | |
_putAddress_raw sun/misc/Unsafe.putAddress(JJ)V | |
_compareAndSwapObject sun/misc/Unsafe.compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z | |
_compareAndSwapLong sun/misc/Unsafe.compareAndSwapLong(Ljava/lang/Object;JJJ)Z | |
_compareAndSwapInt sun/misc/Unsafe.compareAndSwapInt(Ljava/lang/Object;JII)Z | |
_putOrderedObject sun/misc/Unsafe.putOrderedObject(Ljava/lang/Object;JLjava/lang/Object;)V | |
_putOrderedLong sun/misc/Unsafe.putOrderedLong(Ljava/lang/Object;JJ)V | |
_putOrderedInt sun/misc/Unsafe.putOrderedInt(Ljava/lang/Object;JI)V | |
_getAndAddInt sun/misc/Unsafe.getAndAddInt(Ljava/lang/Object;JI)I | |
_getAndAddLong sun/misc/Unsafe.getAndAddLong(Ljava/lang/Object;JJ)J | |
_getAndSetInt sun/misc/Unsafe.getAndSetInt(Ljava/lang/Object;JI)I | |
_getAndSetLong sun/misc/Unsafe.getAndSetLong(Ljava/lang/Object;JJ)J | |
_getAndSetObject sun/misc/Unsafe.getAndSetObject(Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object; | |
_prefetchRead sun/misc/Unsafe.prefetchRead(Ljava/lang/Object;J)V | |
_prefetchWrite sun/misc/Unsafe.prefetchWrite(Ljava/lang/Object;J)V | |
_prefetchReadStatic sun/misc/Unsafe.prefetchReadStatic(Ljava/lang/Object;J)V | |
_prefetchWriteStatic sun/misc/Unsafe.prefetchWriteStatic(Ljava/lang/Object;J)V | |
_fillInStackTrace java/lang/Throwable.fillInStackTrace()Ljava/lang/Throwable; | |
_StringBuilder_void java/lang/StringBuilder.<init>()V | |
_StringBuilder_int java/lang/StringBuilder.<init>(I)V | |
_StringBuilder_String java/lang/StringBuilder.<init>(Ljava/lang/String;)V | |
_StringBuilder_append_char java/lang/StringBuilder.append(C)Ljava/lang/StringBuilder; | |
_StringBuilder_append_int java/lang/StringBuilder.append(I)Ljava/lang/StringBuilder; | |
_StringBuilder_append_String java/lang/StringBuilder.append(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
_StringBuilder_toString java/lang/StringBuilder.toString()Ljava/lang/String; | |
_StringBuffer_void java/lang/StringBuffer.<init>()V | |
_StringBuffer_int java/lang/StringBuffer.<init>(I)V | |
_StringBuffer_String java/lang/StringBuffer.<init>(Ljava/lang/String;)V | |
_StringBuffer_append_char java/lang/StringBuffer.append(C)Ljava/lang/StringBuffer; | |
_StringBuffer_append_int java/lang/StringBuffer.append(I)Ljava/lang/StringBuffer; | |
_StringBuffer_append_String java/lang/StringBuffer.append(Ljava/lang/String;)Ljava/lang/StringBuffer; | |
_StringBuffer_toString java/lang/StringBuffer.toString()Ljava/lang/String; | |
_Integer_toString java/lang/Integer.toString(I)Ljava/lang/String; | |
_String_String java/lang/String.<init>(Ljava/lang/String;)V | |
_Object_init java/lang/Object.<init>()V | |
_invoke java/lang/reflect/Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; | |
_invokeGeneric java/lang/invoke/MethodHandle.invoke* | |
_invokeBasic java/lang/invoke/MethodHandle.invokeBasic* | |
_linkToVirtual java/lang/invoke/MethodHandle.linkToVirtual* | |
_linkToStatic java/lang/invoke/MethodHandle.linkToStatic* | |
_linkToSpecial java/lang/invoke/MethodHandle.linkToSpecial* | |
_linkToInterface java/lang/invoke/MethodHandle.linkToInterface* | |
_compiledLambdaForm java/lang/invoke/MethodHandle.<compiledLambdaForm>* | |
_booleanValue java/lang/Boolean.booleanValue()Z | |
_byteValue java/lang/Byte.byteValue()B | |
_charValue java/lang/Character.charValue()C | |
_shortValue java/lang/Short.shortValue()S | |
_intValue java/lang/Integer.intValue()I | |
_longValue java/lang/Long.longValue()J | |
_floatValue java/lang/Float.floatValue()F | |
_doubleValue java/lang/Double.doubleValue()D | |
_Boolean_valueOf java/lang/Boolean.valueOf(Z)Ljava/lang/Boolean; | |
_Byte_valueOf java/lang/Byte.valueOf(B)Ljava/lang/Byte; | |
_Character_valueOf java/lang/Character.valueOf(C)Ljava/lang/Character; | |
_Short_valueOf java/lang/Short.valueOf(S)Ljava/lang/Short; | |
_Integer_valueOf java/lang/Integer.valueOf(I)Ljava/lang/Integer; | |
_Long_valueOf java/lang/Long.valueOf(J)Ljava/lang/Long; | |
_Float_valueOf java/lang/Float.valueOf(F)Ljava/lang/Float; | |
_Double_valueOf java/lang/Double.valueOf(D)Ljava/lang/Double; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment