fix platform dependency in leaf-signal-handler
parent
abaa051768
commit
252915a37c
|
@ -114,6 +114,8 @@ big-endian off
|
|||
frame-size jit-signal-handler-epilog
|
||||
] \ signal-handler define-sub-primitive
|
||||
|
||||
: leaf-frame-size ( -- n ) 4 bootstrap-cells ;
|
||||
|
||||
[| |
|
||||
jit-signal-handler-prolog :> frame-size
|
||||
jit-save-context
|
||||
|
@ -121,7 +123,7 @@ big-endian off
|
|||
temp0 CALL
|
||||
frame-size jit-signal-handler-epilog
|
||||
! Pop the fake leaf frame along with our return address
|
||||
stack-frame-size cell - RET
|
||||
leaf-frame-size cell - RET
|
||||
] \ leaf-signal-handler define-sub-primitive
|
||||
|
||||
[
|
||||
|
|
|
@ -53,10 +53,10 @@ void factor_vm::dispatch_signal_handler(cell *sp, cell *pc, cell handler)
|
|||
code_block *leaf_block = code->code_block_for_address(*pc);
|
||||
assert(leaf_block != NULL);
|
||||
|
||||
cell newsp = *sp - 32;
|
||||
*(cell*)(newsp + 32 - sizeof(cell)) = 32;
|
||||
*(cell*)(newsp + 32 - 2*sizeof(cell)) = (cell)leaf_block->entry_point();
|
||||
*(cell*) newsp = *pc;
|
||||
cell newsp = *sp - 4*sizeof(cell);
|
||||
*(cell*)(newsp + 3*sizeof(cell)) = 4*sizeof(cell);
|
||||
*(cell*)(newsp + 2*sizeof(cell)) = (cell)leaf_block->entry_point();
|
||||
*(cell*) newsp = *pc;
|
||||
*sp = newsp;
|
||||
handler_word = tagged<word>(special_objects[LEAF_SIGNAL_HANDLER_WORD]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue