History

[macOS] Add VT_LDOUBLE special case for Rosetta to handle --cpu=x86_64.

Christian Jullien committed 5 years ago

Commit 91a95681 parent 592cf7f1 file · +5 −0Browse files

Unified · Split

tccgen.c+5−0
@@ -8093,6 +8093,11 @@ static void init_putv(init_params *p, CType *type, unsigned long c) · 8092 unmodified lines
8093 else if (sizeof(double) == LDOUBLE_SIZE)8093 else if (sizeof(double) == LDOUBLE_SIZE)
8094 memcpy(ptr, &vtop->c.ld, LDOUBLE_SIZE);8094 memcpy(ptr, &vtop->c.ld, LDOUBLE_SIZE);
8095#ifndef TCC_CROSS_TEST8095#ifndef TCC_CROSS_TEST
8096#if defined(TCC_TARGET_MACHO) && defined(TCC_TARGET_X86_64)
8097 /* Special case for Rosetta to handle --cpu=x86_64 on macOS */
8098 else if (sizeof(double) == sizeof(long double))
8099 memcpy(ptr, &vtop->c.ld, sizeof(double));
8100#endif
8096 else8101 else
8097 tcc_error("can't cross compile long double constants");8102 tcc_error("can't cross compile long double constants");
8098#endif8103#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t