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
80938093 else if (sizeof(double) == LDOUBLE_SIZE)
80948094 memcpy(ptr, &vtop->c.ld, LDOUBLE_SIZE);
80958095 #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
80968101 else
80978102 tcc_error("can't cross compile long double constants");
80988103 #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