mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
[macOS] Add VT_LDOUBLE special case for Rosetta to handle --cpu=x86_64.
This commit is contained in:
parent
592cf7fb25
commit
91a956823e
5
tccgen.c
5
tccgen.c
@ -8093,6 +8093,11 @@ static void init_putv(init_params *p, CType *type, unsigned long c)
|
||||
else if (sizeof(double) == LDOUBLE_SIZE)
|
||||
memcpy(ptr, &vtop->c.ld, LDOUBLE_SIZE);
|
||||
#ifndef TCC_CROSS_TEST
|
||||
#if defined(TCC_TARGET_MACHO) && defined(TCC_TARGET_X86_64)
|
||||
/* Special case for Rosetta to handle --cpu=x86_64 on macOS */
|
||||
else if (sizeof(double) == sizeof(long double))
|
||||
memcpy(ptr, &vtop->c.ld, sizeof(double));
|
||||
#endif
|
||||
else
|
||||
tcc_error("can't cross compile long double constants");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user