Mac OS X/x86 fixes
parent
8c022cced5
commit
d1b70d8b13
Binary file not shown.
1
Makefile
1
Makefile
|
@ -117,6 +117,7 @@ windows-ce-x86:
|
||||||
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.ce.x86
|
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.windows.ce.x86
|
||||||
|
|
||||||
macosx.app: factor
|
macosx.app: factor
|
||||||
|
mkdir -p $(BUNDLE)/Contents/MacOS
|
||||||
cp $(EXECUTABLE) $(BUNDLE)/Contents/MacOS/factor
|
cp $(EXECUTABLE) $(BUNDLE)/Contents/MacOS/factor
|
||||||
cp $(ENGINE) $(BUNDLE)/Contents/Frameworks
|
cp $(ENGINE) $(BUNDLE)/Contents/Frameworks
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,7 @@ IN: cpu.x86.32
|
||||||
M: x86-backend ds-reg ESI ;
|
M: x86-backend ds-reg ESI ;
|
||||||
M: x86-backend rs-reg EDI ;
|
M: x86-backend rs-reg EDI ;
|
||||||
M: x86-backend stack-reg ESP ;
|
M: x86-backend stack-reg ESP ;
|
||||||
M: x86-backend frame-reg EBP ;
|
M: x86-backend xt-reg ECX ;
|
||||||
M: x86-backend xt-reg EDX ;
|
|
||||||
M: x86-backend stack-save-reg EDX ;
|
M: x86-backend stack-save-reg EDX ;
|
||||||
|
|
||||||
M: temp-reg v>operand drop EBX ;
|
M: temp-reg v>operand drop EBX ;
|
||||||
|
|
|
@ -20,9 +20,9 @@ big-endian off
|
||||||
] { } make jit-setup set
|
] { } make jit-setup set
|
||||||
|
|
||||||
[
|
[
|
||||||
EBP ESP -48 [+] LEA ! compute forward chain pointer
|
|
||||||
EBP PUSH ! save forward chain pointer
|
|
||||||
xt-reg PUSH ! save XT
|
xt-reg PUSH ! save XT
|
||||||
|
xt-reg ESP -44 [+] LEA ! compute forward chain pointer
|
||||||
|
xt-reg PUSH ! save forward chain pointer
|
||||||
EAX PUSH ! save array
|
EAX PUSH ! save array
|
||||||
ESP 16 SUB ! reserve space for scan-save
|
ESP 16 SUB ! reserve space for scan-save
|
||||||
] { } make jit-prolog set
|
] { } make jit-prolog set
|
||||||
|
|
|
@ -11,7 +11,6 @@ TUPLE: x86-backend cell ;
|
||||||
HOOK: ds-reg compiler-backend
|
HOOK: ds-reg compiler-backend
|
||||||
HOOK: rs-reg compiler-backend
|
HOOK: rs-reg compiler-backend
|
||||||
HOOK: stack-reg compiler-backend
|
HOOK: stack-reg compiler-backend
|
||||||
HOOK: frame-reg compiler-backend
|
|
||||||
HOOK: xt-reg compiler-backend
|
HOOK: xt-reg compiler-backend
|
||||||
HOOK: stack-save-reg compiler-backend
|
HOOK: stack-save-reg compiler-backend
|
||||||
|
|
||||||
|
@ -49,8 +48,8 @@ M: x86-backend %save-xt ( -- )
|
||||||
xt-reg compiling-label get MOV ;
|
xt-reg compiling-label get MOV ;
|
||||||
|
|
||||||
M: x86-backend %prologue ( n -- )
|
M: x86-backend %prologue ( n -- )
|
||||||
frame-reg stack-reg pick stack-frame 5 cells + neg [+] LEA
|
xt-reg PUSH
|
||||||
frame-reg PUSH
|
xt-reg stack-reg pick stack-frame 4 cells + neg [+] LEA
|
||||||
xt-reg PUSH
|
xt-reg PUSH
|
||||||
stack-reg swap stack-frame 2 cells - SUB ;
|
stack-reg swap stack-frame 2 cells - SUB ;
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,12 @@ typedef struct _F_STACK_FRAME
|
||||||
In compiled word frames, unused. */
|
In compiled word frames, unused. */
|
||||||
CELL array;
|
CELL array;
|
||||||
|
|
||||||
|
/* Pointer to the next stack frame; frames are chained from
|
||||||
|
the bottom on up */
|
||||||
|
struct _F_STACK_FRAME *next;
|
||||||
|
|
||||||
/* In all compiled frames, the XT on entry. */
|
/* In all compiled frames, the XT on entry. */
|
||||||
XT xt;
|
XT xt;
|
||||||
|
|
||||||
struct _F_STACK_FRAME *next;
|
|
||||||
} F_STACK_FRAME;
|
} F_STACK_FRAME;
|
||||||
|
|
||||||
#define CALLSTACK_UP_P
|
#define CALLSTACK_UP_P
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
void c_to_factor_toplevel(CELL quot)
|
void c_to_factor_toplevel(CELL quot)
|
||||||
{
|
{
|
||||||
for(;;)
|
/* for(;;)
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING */
|
||||||
c_to_factor(quot);
|
c_to_factor(quot);
|
||||||
NS_VOIDRETURN;
|
/* NS_VOIDRETURN;
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
dpush(allot_alien(F,(CELL)localException));
|
dpush(allot_alien(F,(CELL)localException));
|
||||||
quot = userenv[COCOA_EXCEPTION_ENV];
|
quot = userenv[COCOA_EXCEPTION_ENV];
|
||||||
|
@ -16,11 +16,11 @@ NS_HANDLER
|
||||||
{
|
{
|
||||||
/* No Cocoa exception handler was registered, so
|
/* No Cocoa exception handler was registered, so
|
||||||
extra/cocoa/ is not loaded. So we pass the exception
|
extra/cocoa/ is not loaded. So we pass the exception
|
||||||
along. */
|
along. *
|
||||||
[localException raise];
|
[localException raise];
|
||||||
}
|
}
|
||||||
NS_ENDHANDLER
|
NS_ENDHANDLER
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
void early_init(void)
|
void early_init(void)
|
||||||
|
|
Loading…
Reference in New Issue