mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-18 21:51:37 +00:00
- Add x86_64 platform for MacOSX
- Fix compilation on MacOSX gcc
This commit is contained in:
parent
3b642f9032
commit
99e157e066
2 changed files with 16 additions and 13 deletions
3
Makefile
3
Makefile
|
@ -386,6 +386,9 @@ ifeq ($(PLATFORM),darwin)
|
||||||
# used no matter what and they corrupt the frame pointer in VM calls
|
# used no matter what and they corrupt the frame pointer in VM calls
|
||||||
BASE_CFLAGS += -mstackrealign
|
BASE_CFLAGS += -mstackrealign
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ARCH),x86_64)
|
||||||
|
OPTIMIZEVM += -mfpmath=sse
|
||||||
|
endif
|
||||||
|
|
||||||
BASE_CFLAGS += -fno-strict-aliasing -DMACOS_X -fno-common -pipe
|
BASE_CFLAGS += -fno-strict-aliasing -DMACOS_X -fno-common -pipe
|
||||||
|
|
||||||
|
|
|
@ -1776,25 +1776,25 @@ int VM_CallCompiled(vm_t *vm, int *args)
|
||||||
#endif
|
#endif
|
||||||
#elif idx64
|
#elif idx64
|
||||||
__asm__ volatile(
|
__asm__ volatile(
|
||||||
"movq %5, %%rax\r\n"
|
"movq %5, %%rax\n"
|
||||||
"movq %3, %%r8\r\n"
|
"movq %3, %%r8\n"
|
||||||
"movq %4, %%r9\r\n"
|
"movq %4, %%r9\n"
|
||||||
"push %%r15\r\n"
|
"push %%r15\n"
|
||||||
"push %%r14\r\n"
|
"push %%r14\n"
|
||||||
"push %%r13\r\n"
|
"push %%r13\n"
|
||||||
"push %%r12\r\n"
|
"push %%r12\n"
|
||||||
"callq *%%rax\r\n"
|
"callq *%%rax\n"
|
||||||
"pop %%r12\r\n"
|
"pop %%r12\n"
|
||||||
"pop %%r13\r\n"
|
"pop %%r13\n"
|
||||||
"pop %%r14\r\n"
|
"pop %%r14\n"
|
||||||
"pop %%r15\r\n"
|
"pop %%r15\n"
|
||||||
: "+S" (programStack), "+D" (opStack), "+b" (opStackOfs)
|
: "+S" (programStack), "+D" (opStack), "+b" (opStackOfs)
|
||||||
: "g" (vm->instructionPointers), "g" (vm->dataBase), "g" (entryPoint)
|
: "g" (vm->instructionPointers), "g" (vm->dataBase), "g" (entryPoint)
|
||||||
: "cc", "memory", "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11"
|
: "cc", "memory", "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11"
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
__asm__ volatile(
|
__asm__ volatile(
|
||||||
"calll *%3\r\n"
|
"calll *%3\n"
|
||||||
: "+S" (programStack), "+D" (opStack), "+b" (opStackOfs)
|
: "+S" (programStack), "+D" (opStack), "+b" (opStackOfs)
|
||||||
: "g" (entryPoint)
|
: "g" (entryPoint)
|
||||||
: "cc", "memory", "%eax", "%ecx", "%edx"
|
: "cc", "memory", "%eax", "%ecx", "%edx"
|
||||||
|
|
Loading…
Reference in a new issue