HACK : get iOS building again

- TODO FIXME : actually get proper __PIC__ code written for Mac/i386
This commit is contained in:
Aaron Culliney 2016-05-15 18:12:57 -07:00
parent b7a49137c0
commit fd5b97189a
2 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@
#define ENTRY(x) .globl _UNDER(x); .balign 16; _UNDER(x)##:
#if !__PIC__
#if !__PIC__ || (__APPLE__ && !__LP64__)
// For non-Position Independent Code, the assembly is relatively simple...
@ -161,7 +161,7 @@
# define REG2MEM(op,x,sym) op x, _UNDER(sym)(%rip) // op register-to-memory
# define MEM2REG(op,sym,x) op _UNDER(sym)(%rip), x // op memory-to-register
# elif __LP64__
# define _AT_PLT @PLT
# define _AT_PLT @PLT
# define _LEA(sym) movq _UNDER(sym)@GOTPCREL(%rip), _X8
# define CALL_IND0(fn) callq *_UNDER(fn)_AT_PLT
# define _2MEM(op,sym) _LEA(sym); op (_X8) // op to-memory

View File

@ -16,7 +16,7 @@
#include "cpu-regs.h"
#include "vm.h"
#if !__PIC__
#if !__PIC__ || (__APPLE__ && !__LP64__)
# define SAVE_Y_REG() \
REG2MEM(movb, Y_Reg, cpu65_y)
# define _POP_PICREG()
@ -2222,7 +2222,7 @@ ENTRY(cpu65_run)
// NOTE: should we be also preserving r12-r15?
#endif
#if __PIC__ && __i386__
#if __PIC__ && __i386__ && !__APPLE__
calll .Lget_pc_thunk0
.Lget_pc_thunk0:
_POP_PICREG()