1 .define ___Get_PC, ___Set_PC, ___u_LiB
2 .sect .text; .sect .rom; .sect .data
4 ! $Id: machdep.s,v 1.2 1994/06/24 13:01:54 ceriel Exp $
6 ! This is the machine-dependant part of the ACK debugger support.
7 ! ___Get_PC takes a frame pointer (local base) argument and returns the
8 ! return address from this frame.
9 ! ___Set_PC takes a frame pointer (local base) argument plus a return
10 ! address and sets the return address of this frame to the
11 ! return address supplied.
12 ! ___u_LiB saves the scratch registers and then calls ___uX_LiB;
13 ! when ___uX_LiB returns, the scratch registers are restored.
14 ! ___u_LiB is the solution chosen for the Intel 80386 back-end.
15 ! Other back-ends could choose different solutions.
17 ! The local base of ___uX_LiB is kind of special: because of ___u_LiB,
18 ! the "interesting" return address of this particular stack-frame is found
19 ! in a different place than the one of a normal stack-frame:
20 ! the "interesting" return address is in fact the return address of
21 ! ___u_LiB. Therefore, we save the local base of ___uX_LiB in sv_bp.
65 mov (sv_bp),eax ! this is the LB of __uX_LiB