mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-03 09:58:41 +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)
|
else if (sizeof(double) == LDOUBLE_SIZE)
|
||||||
memcpy(ptr, &vtop->c.ld, LDOUBLE_SIZE);
|
memcpy(ptr, &vtop->c.ld, LDOUBLE_SIZE);
|
||||||
#ifndef TCC_CROSS_TEST
|
#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
|
else
|
||||||
tcc_error("can't cross compile long double constants");
|
tcc_error("can't cross compile long double constants");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user