2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
/* Spec Token Definitions for the PowerPC/RS6000 ANDF translator */
|
|
|
30 |
|
|
|
31 |
Tokdec ansi.stdlib.abort : [] EXP;
|
|
|
32 |
|
|
|
33 |
/* ~Throw will be provided by producer */
|
|
|
34 |
Tokdec ~Throw : [NAT] EXP;
|
|
|
35 |
|
|
|
36 |
Common __TDFstacklim : pointer (locals_alignment)
|
|
|
37 |
= make_null_ptr (locals_alignment);
|
|
|
38 |
|
|
|
39 |
Common __TDFhandler : proc;
|
|
|
40 |
|
|
|
41 |
/* Set_signal_handler Must be called before any possible exceptions */
|
|
|
42 |
Tokdef ~Set_signal_handler = [] EXP
|
|
|
43 |
Let handler = Proc bottom (err : Int)
|
|
|
44 |
{
|
|
|
45 |
?{
|
|
|
46 |
? ( * err == + error_val(overflow)(Int) );
|
|
|
47 |
~Throw[error_val(overflow)];
|
|
|
48 |
ansi.stdlib.abort
|
|
|
49 |
| ? { ? ( * err == + error_val(stack_overflow)(Int) );
|
|
|
50 |
~Throw[error_val(stack_overflow)];
|
|
|
51 |
ansi.stdlib.abort
|
|
|
52 |
|
|
|
|
53 |
~Throw[error_val(nil_access)];
|
|
|
54 |
ansi.stdlib.abort
|
|
|
55 |
}
|
|
|
56 |
}
|
|
|
57 |
}
|
|
|
58 |
{
|
|
|
59 |
__TDFhandler = handler;
|
|
|
60 |
env_size(handler)
|
|
|
61 |
};
|
|
|
62 |
|
|
|
63 |
Tokdef ~Sync_handler = [] EXP make_top;
|
|
|
64 |
|
|
|
65 |
Keep(~Set_signal_handler ,__TDFhandler,~Sync_handler,__TDFstacklim)
|