4 * [Generated from seh, 25 September 1996]
7 #if !defined(__CC_NORCROFT) || !defined(__arm)
8 #error You must use the Norcroft ARM Compiler for Sapphire programs
11 #pragma include_only_once
12 #pragma force_top_level
21 /*----- Overview ----------------------------------------------------------*
35 * On entry: R0 == pointer to catch definition block
37 * On exit: R13 dropped by a (small) amount
39 * Use: Inserts an exception handler at the current position.
40 * Exceptions are matched against those described in the catch
41 * block. If there is a handler for the exception, the
42 * corresponding handler is called, and expected to resume
43 * normally. Otherwise the tidy-up routine is called and we
44 * unwind the stack further to find an appropriate handler.
46 * The catch block has the following format:
48 * word B to tidy-up routine
49 * word 1st exception mask
50 * word 1st B to catch routine
51 * word 2nd exception mask
52 * word 2nd B to catch routine
56 * An exception mask contains two halfwords. Bits 16-31 are the
57 * class to match, or -1 for all classes. Bits 0-15 are the
58 * subtype to match, or -1 for all subtypes. You can do really
59 * odd things if you set bits 16-31 to -1 and leave 0-15
60 * matching specific subtypes -- do this at your own risk.
63 extern routine seh_try;
65 /* --- seh_unTry --- *
69 * On exit: R13 moved to position before corresponding seh_try
71 * Use: Removes the try block marker in the stack at the current
72 * position. Note that the stack will be unwound to where it
73 * was when seh_try was called.
76 extern routine seh_unTry;
78 /* --- seh_throw --- *
80 * On entry: R0 == exception to match
81 * R1-R3 == useful bits of information
83 * On exit: Doesn't return, unless you've done something /really/ odd
85 * Use: Throws an exception. The stack is unwound until we find
86 * a handler which can cope. If there is no handler, we abort
90 extern routine seh_throw;
92 /* --- seh_throwErrors --- *
98 * Use: Sets up an except-style error handler to throw errors
102 extern routine seh_throwErrors;
104 /* --- seh_setListBase --- *
106 * On entry: R0 == pointer to try block list base, or 0 to use global
110 * Use: Sets the try block list base. This should only be used by
111 * coroutine providers, like coRoutine and thread.
114 extern routine seh_setListBase;
116 /* --- seh_init --- *
122 * Use: Initialises SEH's facilities.
125 extern routine seh_init;
127 /*----- That's all, folks -------------------------------------------------*/