summaryrefslogtreecommitdiffstats
path: root/src/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/native')
-rw-r--r--src/native/common/MachineDescriptionRuntime.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/native/common/MachineDescriptionRuntime.c b/src/native/common/MachineDescriptionRuntime.c
index 0e6475c..a8a69ee 100644
--- a/src/native/common/MachineDescriptionRuntime.c
+++ b/src/native/common/MachineDescriptionRuntime.c
@@ -74,6 +74,11 @@ typedef struct {
double v;
} struct_alignment_double;
+typedef struct {
+ int8_t c1;
+ long double v;
+} struct_alignment_ldouble;
+
// size_t padding(size_t totalsize, size_t typesize) { return totalsize - typesize - sizeof(char); }
// static size_t alignment(size_t totalsize, size_t typesize) { return totalsize - typesize; }
#define ALIGNMENT(a, b) ( (a) - (b) )
@@ -124,6 +129,11 @@ Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentDoubleImpl(JNIEnv *e
}
JNIEXPORT jint JNICALL
+Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentLongDoubleImpl(JNIEnv *env, jclass _unused) {
+ return ALIGNMENT(sizeof( struct_alignment_ldouble ), sizeof(long double));
+}
+
+JNIEXPORT jint JNICALL
Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfIntImpl(JNIEnv *env, jclass _unused) {
return sizeof(int);
}
@@ -143,3 +153,8 @@ Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfDoubleImpl(JNIEnv *env,
return sizeof(double);
}
+JNIEXPORT jint JNICALL
+Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfLongDoubleImpl(JNIEnv *env, jclass _unused) {
+ return sizeof(long double);
+}
+