fis-gtm/sr_alpha/op_call.m64

52 lines
1.1 KiB
Plaintext

.title OP_CALL
; ###############################################################
; # #
; # Copyright 2001, 2003 Sanchez Computer Associates, Inc. #
; # #
; # This source code contains the intellectual property #
; # of its copyright holder(s), and is made available #
; # under a license. If you do not know the terms of #
; # the license, please stop and do not read further. #
; # #
; ###############################################################
G_MSF
$linkage_section
a_frame_pointer:
.address frame_pointer
$code_section
$routine OP_CALLB, entry=OP_CALL_CA, aliases=<OP_CALLW, OP_CALLL>, kind=null
lda sp, -16(sp)
stq r13, 8(sp)
stq r26, (sp)
mov r27, r13
.base r13, $ls
ldq r1, a_frame_pointer
ldl r1, (r1)
; Bump the return PC past the branch sequence following the jsr that got us here:
addl r26, r16, r26 ; length of branch sequence
stl r26, msf$mpc_off(r1) ; and store it in the Mumps stack frame
$call COPY_STACK_FRAME, set_arg_info=false, nonstandard=true
ldq r12, a_frame_pointer
ldl r12, (r12)
ldq r26, (sp)
ldq r13, 8(sp)
lda sp, 16(sp)
ret r26
$end_routine
.end