55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
#################################################################
|
|
# #
|
|
# Copyright 2007, 2012 Fidelity Information Services, 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. #
|
|
# #
|
|
#################################################################
|
|
|
|
.sbttl error.si
|
|
# PAGE +
|
|
#-----------------------------------------------
|
|
# Mumps error condition handler macros
|
|
#-----------------------------------------------
|
|
chnd_size = 224
|
|
chnd_save_active = 0
|
|
chnd_ch_active = 8
|
|
chnd_ch = 16
|
|
chnd_jmp = 24
|
|
|
|
.data
|
|
.extern ctxt
|
|
|
|
# .text
|
|
# setjmp is really __sigsetjmp(env,0)
|
|
#.extern __sigsetjmp
|
|
.extern gtm_asm_establish
|
|
|
|
.sbttl error.si ESTABLISH
|
|
.macro ESTABLISH label
|
|
call gtm_asm_establish
|
|
movq ctxt(REG_IP),%rax
|
|
leaq mdb_condition_handler(REG_IP), REG64_SCRATCH1
|
|
movq REG64_SCRATCH1, chnd_ch(%rax) # ctxt->ch = x
|
|
addq $chnd_jmp,%rax # setjmp(ctxt->jmp)
|
|
movq $0,%rsi
|
|
movq %rax,%rdi
|
|
call __sigsetjmp@PLT
|
|
incl %eax
|
|
jne \label
|
|
REVERT
|
|
jmp return
|
|
\label:
|
|
.endm
|
|
|
|
.sbttl error.si REVERT
|
|
.macro REVERT
|
|
movq ctxt(REG_IP),%rax # active_ch = ctxt->save_active_c
|
|
movq chnd_save_active(%rax),%rax
|
|
movq %rax,active_ch(REG_IP)
|
|
subq $chnd_size,ctxt(REG_IP) # ctxt--
|
|
.endm
|