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