8321130: Microbenchmarks do not build any more after 8254693 on 32 bit platforms
Reviewed-by: mcimadamore, tschatzl
This commit is contained in:
parent
8f1d40b48b
commit
3b30095a63
@ -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
|
||||
*/
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <jni.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user