1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
/******************************************************************************/
/* Copyright (c) 1993 by GMD Karlruhe, Germany */
/* Gesellschaft fuer Mathematik und Datenverarbeitung */
/* (German National Research Center for Computer Science) */
/* Forschungsstelle fuer Programmstrukturen an Universitaet Karlsruhe */
/* All rights reserved. */
/******************************************************************************/
# IMPLEMENTATION MODULE Exceptions
MaxDisplay_ = 16 # same as M2RTS.s
.globl _SetJmp
.globl _LongJmp
.text
.align 4
# PROCEDURE SetJmp (VAR exc : Exception) : LONGINT;
_SetJmp:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%eax
movl %ebx,(%eax)
movl %esi,4(%eax)
movl %edi,8(%eax)
movl 0(%ebp),%ebx
movl %ebx,12(%eax)
leal 8(%ebp),%ebx
movl %ebx,16(%eax)
movl 4(%ebp),%ebx
movl %ebx,20(%eax)
movl %ecx,24(%eax)
movl %edx,28(%eax)
leal 32(%eax),%edi
movl $DISPLAY_,%esi
movl $MaxDisplay_,%ecx
cld
repz
movsl
xorl %eax,%eax
movl %ebp,%esp
popl %ebp
ret
.align 4
# PROCEDURE LongJmp (VAR exc : Exception; val : LONGINT);
_LongJmp:
pushl %ebp
movl %esp,%ebp
movl 8(%ebp),%ecx
movl 12(%ebp),%eax
testl %eax,%eax
jne .L1
movl $1,%eax
.L1:
leal 32(%ecx),%esi
pushl %ecx
movl $DISPLAY_,%edi
movl $MaxDisplay_,%ecx
cld
repz
movsl
popl %ecx
movl (%ecx),%ebx
movl 4(%ecx),%esi
movl 8(%ecx),%edi
movl 12(%ecx),%ebp
movl 16(%ecx),%esp
pushl 20(%ecx)
movl 28(%ecx),%edx
movl 24(%ecx),%ecx
ret
|