mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8035857: Add tests to verify correctness of operations with BMI1 and LZCNT instructions
Reviewed-by: iveresov, kvn, iignatyev
This commit is contained in:
parent
fc7f4197f1
commit
8167043964
18 changed files with 1686 additions and 0 deletions
|
@ -500,6 +500,16 @@ WB_ENTRY(void, WB_ReadReservedMemory(JNIEnv* env, jobject o))
|
|||
c = *p;
|
||||
WB_END
|
||||
|
||||
WB_ENTRY(jstring, WB_GetCPUFeatures(JNIEnv* env, jobject o))
|
||||
const char* cpu_features = VM_Version::cpu_features();
|
||||
ThreadToNativeFromVM ttn(thread);
|
||||
jstring features_string = env->NewStringUTF(cpu_features);
|
||||
|
||||
CHECK_JNI_EXCEPTION_(env, NULL);
|
||||
|
||||
return features_string;
|
||||
WB_END
|
||||
|
||||
//Some convenience methods to deal with objects from java
|
||||
int WhiteBox::offset_for_field(const char* field_name, oop object,
|
||||
Symbol* signature_symbol) {
|
||||
|
@ -611,6 +621,7 @@ static JNINativeMethod methods[] = {
|
|||
{CC"isInStringTable", CC"(Ljava/lang/String;)Z", (void*)&WB_IsInStringTable },
|
||||
{CC"fullGC", CC"()V", (void*)&WB_FullGC },
|
||||
{CC"readReservedMemory", CC"()V", (void*)&WB_ReadReservedMemory },
|
||||
{CC"getCPUFeatures", CC"()Ljava/lang/String;", (void*)&WB_GetCPUFeatures },
|
||||
};
|
||||
|
||||
#undef CC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue