VM: LEAF_FRAME_SIZE is 16 bytes on all platforms so we can simplify it
parent
05de24e9a1
commit
10464e7e4e
|
@ -8,7 +8,6 @@ IN: bootstrap.x86
|
||||||
|
|
||||||
4 \ cell set
|
4 \ cell set
|
||||||
|
|
||||||
: leaf-stack-frame-size ( -- n ) 4 bootstrap-cells ;
|
|
||||||
: signal-handler-stack-frame-size ( -- n ) 12 bootstrap-cells ;
|
: signal-handler-stack-frame-size ( -- n ) 12 bootstrap-cells ;
|
||||||
: stack-frame-size ( -- n ) 8 bootstrap-cells ;
|
: stack-frame-size ( -- n ) 8 bootstrap-cells ;
|
||||||
: shift-arg ( -- reg ) ECX ;
|
: shift-arg ( -- reg ) ECX ;
|
||||||
|
|
|
@ -4,7 +4,6 @@ USING: cpu.x86.assembler.operands kernel layouts parser
|
||||||
sequences ;
|
sequences ;
|
||||||
IN: bootstrap.x86
|
IN: bootstrap.x86
|
||||||
|
|
||||||
: leaf-stack-frame-size ( -- n ) 2 bootstrap-cells ;
|
|
||||||
: signal-handler-stack-frame-size ( -- n ) 20 bootstrap-cells ;
|
: signal-handler-stack-frame-size ( -- n ) 20 bootstrap-cells ;
|
||||||
: stack-frame-size ( -- n ) 4 bootstrap-cells ;
|
: stack-frame-size ( -- n ) 4 bootstrap-cells ;
|
||||||
: nv-regs ( -- seq ) { RBX R12 R13 R14 R15 } ;
|
: nv-regs ( -- seq ) { RBX R12 R13 R14 R15 } ;
|
||||||
|
|
|
@ -6,7 +6,6 @@ IN: bootstrap.x86
|
||||||
|
|
||||||
DEFER: stack-reg
|
DEFER: stack-reg
|
||||||
|
|
||||||
: leaf-stack-frame-size ( -- n ) 2 bootstrap-cells ;
|
|
||||||
: signal-handler-stack-frame-size ( -- n ) 24 bootstrap-cells ;
|
: signal-handler-stack-frame-size ( -- n ) 24 bootstrap-cells ;
|
||||||
: stack-frame-size ( -- n ) 8 bootstrap-cells ;
|
: stack-frame-size ( -- n ) 8 bootstrap-cells ;
|
||||||
: nv-regs ( -- seq ) { RBX RSI RDI R12 R13 R14 R15 } ;
|
: nv-regs ( -- seq ) { RBX RSI RDI R12 R13 R14 R15 } ;
|
||||||
|
|
|
@ -32,6 +32,8 @@ SYMBOL: header-bits
|
||||||
: hashcode-shift ( -- n )
|
: hashcode-shift ( -- n )
|
||||||
tag-bits get header-bits get + ;
|
tag-bits get header-bits get + ;
|
||||||
|
|
||||||
|
: leaf-stack-frame-size ( -- n ) 16 ;
|
||||||
|
|
||||||
! We do this in its own compilation unit so that they can be
|
! We do this in its own compilation unit so that they can be
|
||||||
! folded below
|
! folded below
|
||||||
<<
|
<<
|
||||||
|
|
|
@ -2,9 +2,8 @@ namespace factor {
|
||||||
|
|
||||||
#define FACTOR_CPU_STRING "x86.32"
|
#define FACTOR_CPU_STRING "x86.32"
|
||||||
|
|
||||||
/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
|
/* Must match the signal-handler-stack-frame-size and stack-frame-size
|
||||||
and stack-frame-size constants in bootstrap/assembler/x86.32.factor */
|
constants in bootstrap/assembler/x86.32.factor */
|
||||||
static const unsigned LEAF_FRAME_SIZE = 16;
|
|
||||||
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 48;
|
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 48;
|
||||||
static const unsigned JIT_FRAME_SIZE = 32;
|
static const unsigned JIT_FRAME_SIZE = 32;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,9 @@ inline static cell alignment_for(cell a, cell b) { return align(a, b) - a; }
|
||||||
|
|
||||||
static const cell data_alignment = 16;
|
static const cell data_alignment = 16;
|
||||||
|
|
||||||
|
/* Must match leaf-stack-frame-size in core/layouts/layouts.factor */
|
||||||
|
#define LEAF_FRAME_SIZE 16
|
||||||
|
|
||||||
#define WORD_SIZE (signed)(sizeof(cell) * 8)
|
#define WORD_SIZE (signed)(sizeof(cell) * 8)
|
||||||
|
|
||||||
#define TAG_MASK 15
|
#define TAG_MASK 15
|
||||||
|
|
|
@ -25,9 +25,8 @@ inline static void uap_clear_fpu_status(void* uap) {
|
||||||
#define FUNCTION_CODE_POINTER(ptr) ptr
|
#define FUNCTION_CODE_POINTER(ptr) ptr
|
||||||
#define FUNCTION_TOC_POINTER(ptr) ptr
|
#define FUNCTION_TOC_POINTER(ptr) ptr
|
||||||
|
|
||||||
/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
|
/* Must match the signal-handler-stack-frame-size and stack-frame-size
|
||||||
and stack-frame-size constants in bootstrap/assembler/x86.64.unix.factor */
|
constants in bootstrap/assembler/x86.64.unix.factor */
|
||||||
static const unsigned LEAF_FRAME_SIZE = 16;
|
|
||||||
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 160;
|
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 160;
|
||||||
static const unsigned JIT_FRAME_SIZE = 32;
|
static const unsigned JIT_FRAME_SIZE = 32;
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,8 @@ inline static void uap_clear_fpu_status(void* uap) {
|
||||||
mach_clear_fpu_status(UAP_FS(uap));
|
mach_clear_fpu_status(UAP_FS(uap));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
|
/* Must match the signal-handler-stack-frame-size and stack-frame-size
|
||||||
and stack-frame-size constants in basis/bootstrap/assembler/x86.64.unix.factor */
|
constants in basis/bootstrap/assembler/x86.64.unix.factor */
|
||||||
static const unsigned LEAF_FRAME_SIZE = 16;
|
|
||||||
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 160;
|
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 160;
|
||||||
static const unsigned JIT_FRAME_SIZE = 32;
|
static const unsigned JIT_FRAME_SIZE = 32;
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,8 @@ namespace factor {
|
||||||
|
|
||||||
#define MXCSR(ctx) (ctx)->MxCsr
|
#define MXCSR(ctx) (ctx)->MxCsr
|
||||||
|
|
||||||
/* Must match the leaf-stack-frame-size, signal-handler-stack-frame-size,
|
/* Must match the signal-handler-stack-frame-size and stack-frame-size
|
||||||
and stack-frame-size constants in basis/bootstap/assembler/x86.64.windows.factor */
|
constants in basis/bootstap/assembler/x86.64.windows.factor */
|
||||||
static const unsigned LEAF_FRAME_SIZE = 16;
|
|
||||||
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 192;
|
static const unsigned SIGNAL_HANDLER_STACK_FRAME_SIZE = 192;
|
||||||
static const unsigned JIT_FRAME_SIZE = 64;
|
static const unsigned JIT_FRAME_SIZE = 64;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue