about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-12-02 10:50:21 +0100
committerGitHub <noreply@github.com>2024-12-02 10:50:21 +0100
commit83ed8ebb22da6d77f8f15af43bf316bd14e93ed3 (patch)
tree209f87e967585d29b49af00c191c2e4a30bf976e /src/include
parent88aab487f111ba280048fd7e240e2b62d45eeba8 (diff)
downloadbox64-83ed8ebb22da6d77f8f15af43bf316bd14e93ed3.tar.gz
box64-83ed8ebb22da6d77f8f15af43bf316bd14e93ed3.zip
Android Long Double handling (#2101)
* [ANDROID] Try to handle LongDouble in vaarg correctly

* [ANDROID] Try to enable test07

* [WRAPPED] Fixed Android long double handling (#2096)

* [WRAPPED] Fixed Android long double handling

* [WRAPPED] Force casting to uintptr_t

* [WRAPPED] Fixed a typing issue, removed a warning in the CI

---------

Co-authored-by: rajdakin <rajdakin@gmail.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/complext.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/complext.h b/src/include/complext.h
index 695bb876..27336ca8 100644
--- a/src/include/complext.h
+++ b/src/include/complext.h
@@ -45,12 +45,18 @@ static inline void from_complex(x64emu_t* emu, complex_t v) {
     emu->xmm[0].d[0]=v.r; 
     emu->xmm[1].d[0]=v.i;
 }
+#ifdef ANDROID
+static inline void from_complexl(x64emu_t* emu, complexl_t v) {
+    memcpy(&emu->xmm[0], &v, 16*2); // what if AVX is present?
+}
+#else
 static inline void from_complexl(x64emu_t* emu, complexl_t v) {
     fpu_do_push(emu);
     fpu_do_push(emu);
     ST0.d=FromLD(&v.r); 
     ST(1).d=FromLD(&v.i);
 }
+#endif
 static inline void from_complexk(x64emu_t* emu, complex_t v) {
     fpu_do_push(emu);
     fpu_do_push(emu);