|
1 | 1 | /*
|
2 |
| - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
@@ -967,6 +967,31 @@ jboolean JVMCIEnv::call_HotSpotJVMCIRuntime_isGCSupported (JVMCIObject runtime,
|
967 | 967 | }
|
968 | 968 | }
|
969 | 969 |
|
| 970 | +jboolean JVMCIEnv::call_HotSpotJVMCIRuntime_isIntrinsicSupported (JVMCIObject runtime, jint intrinsicIdentifier) { |
| 971 | + JavaThread* THREAD = JavaThread::current(); // For exception macros. |
| 972 | + if (is_hotspot()) { |
| 973 | + JavaCallArguments jargs; |
| 974 | + jargs.push_oop(Handle(THREAD, HotSpotJVMCI::resolve(runtime))); |
| 975 | + jargs.push_int(intrinsicIdentifier); |
| 976 | + JavaValue result(T_BOOLEAN); |
| 977 | + JavaCalls::call_special(&result, |
| 978 | + HotSpotJVMCI::HotSpotJVMCIRuntime::klass(), |
| 979 | + vmSymbols::isIntrinsicSupported_name(), |
| 980 | + vmSymbols::int_bool_signature(), &jargs, CHECK_0); |
| 981 | + return result.get_jboolean(); |
| 982 | + } else { |
| 983 | + JNIAccessMark jni(this, THREAD); |
| 984 | + jboolean result = jni()->CallNonvirtualBooleanMethod(runtime.as_jobject(), |
| 985 | + JNIJVMCI::HotSpotJVMCIRuntime::clazz(), |
| 986 | + JNIJVMCI::HotSpotJVMCIRuntime::isIntrinsicSupported_method(), |
| 987 | + intrinsicIdentifier); |
| 988 | + if (jni()->ExceptionCheck()) { |
| 989 | + return false; |
| 990 | + } |
| 991 | + return result; |
| 992 | + } |
| 993 | +} |
| 994 | + |
970 | 995 | JVMCIObject JVMCIEnv::call_HotSpotJVMCIRuntime_compileMethod (JVMCIObject runtime, JVMCIObject method, int entry_bci,
|
971 | 996 | jlong compile_state, int id) {
|
972 | 997 | JavaThread* THREAD = JVMCI::compilation_tick(JavaThread::current()); // For exception macros.
|
|
0 commit comments