diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java b/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java index 978765c2c79..bfe5ce61b1c 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/CLayouts.java @@ -56,7 +56,7 @@ public class CLayouts { /** * The layout for the {@code long long} C type. */ - public static final ValueLayout.OfLong C_LONG_LONG = (ValueLayout.OfLong) LINKER.canonicalLayouts().get("long"); + public static final ValueLayout.OfLong C_LONG_LONG = (ValueLayout.OfLong) LINKER.canonicalLayouts().get("long long"); /** * The layout for the {@code float} C type */ diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c b/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c index 2b74dc9c3d7..2ecea5f2b83 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c +++ b/test/micro/org/openjdk/bench/java/lang/foreign/xor/libjnitest.c @@ -1,6 +1,8 @@ #include #include +#include "jlong.h" + JNIEXPORT void xor_op(jbyte *restrict src, jbyte *restrict dst, jint len) { for (int i = 0; i < len; ++i) { dst[i] ^= src[i]; @@ -69,7 +71,7 @@ JNIEXPORT void JNICALL Java_org_openjdk_bench_java_lang_foreign_xor_GetArrayRegi JNIEXPORT void JNICALL Java_org_openjdk_bench_java_lang_foreign_xor_GetArrayUnsafeXorOpImpl_xorOp (JNIEnv *env, jobject obj, jlong src, jlong dst, jint len) { - jbyte *sbuf = (jbyte*)(void*)src; - jbyte *dbuf = (jbyte*)(void*)dst; + jbyte *sbuf = (jbyte*)jlong_to_ptr(src); + jbyte *dbuf = (jbyte*)jlong_to_ptr(dst); xor_op(sbuf, dbuf, len); }