Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WRAPPED] Fixed Android long double handling #2096

Merged
merged 3 commits into from
Nov 30, 2024

Conversation

rajdakin
Copy link
Collaborator

This PR fixes the long double handling in Android builds (in which long doubles are 128 bits wide, instead of 80).

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 30, 2024

Mmm, so the Android ABI should not be applied on TERMUX config (because its a libc ABI). Unfortunatly, it seems to use both ANDROID and TERMUX macro

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 30, 2024

Also, maybe we should use -Wno-pointer-type-mismatch to clean up the logs on the CI

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 30, 2024

The build error are:

/home/runner/work/box64/box64/src/wrapped/generated/wrapper.c:6817:83: error: passing 'complexl_t' (aka 'struct complexl_s') to parameter of incompatible type 'complex_t' (aka 'struct complex_s')
void DFY(x64emu_t *emu, uintptr_t fcn) { DFY_t fn = (DFY_t)fcn; long double ld=fn(to_complexl(emu, (uintptr_t)&emu->xmm[0])); emu->xmm[0].u128=*(__uint128_t*)&ld; }
                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/box64/box64/src/wrapped/generated/wrapper.c:6819:87: error: passing 'complexl_t' (aka 'struct complexl_s') to parameter of incompatible type 'complex_t' (aka 'struct complex_s')
void YFY(x64emu_t *emu, uintptr_t fcn) { YFY_t fn = (YFY_t)fcn; from_complexl(emu, fn(to_complexl(emu, (uintptr_t)&emu->xmm[0]))); }
                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/box64/box64/src/wrapped/generated/wrapper.c:6829:90: error: passing 'complexl_t' (aka 'struct complexl_s') to parameter of incompatible type 'complex_t' (aka 'struct complex_s')
void YFYY(x64emu_t *emu, uintptr_t fcn) { YFYY_t fn = (YFYY_t)fcn; from_complexl(emu, fn(to_complexl(emu, (uintptr_t)&emu->xmm[0]), to_complexl(emu, (uintptr_t)&emu->xmm[1]))); }
                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@ptitSeb ptitSeb merged commit a03c3e7 into ptitSeb:android_ld Nov 30, 2024
27 checks passed
@rajdakin rajdakin deleted the android_ld branch November 30, 2024 19:22
ptitSeb added a commit that referenced this pull request Dec 2, 2024
* [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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants