Introduction/utilisation de caml_array_bound_error

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5638 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 2003-06-30 15:39:39 +00:00
parent 2798826120
commit 8c008a73d1
2 changed files with 18 additions and 2 deletions

View File

@ -764,7 +764,7 @@ let fundecl fundecl =
emit_all fundecl.fun_body;
List.iter emit_call_gc !call_gc_sites;
if !range_check_trap > 0 then
`{emit_label !range_check_trap}: jmp _array_bound_error\n`;
`{emit_label !range_check_trap}: jmp _caml_array_bound_error\n`;
begin match !float_constants with
[] -> ()
| _ ->
@ -825,7 +825,7 @@ let begin_assembly() =
` EXTERN _caml_alloc1: PROC\n`;
` EXTERN _caml_alloc2: PROC\n`;
` EXTERN _caml_alloc3: PROC\n`;
` EXTERN _array_bound_error: PROC\n`;
` EXTERN _caml_array_bound_error: PROC\n`;
` .DATA\n`;
let lbl_begin = Compilenv.current_unit_name() ^ "__data_begin" in
add_def_symbol lbl_begin;

View File

@ -23,6 +23,7 @@
EXTERN _caml_apply2: PROC
EXTERN _caml_apply3: PROC
EXTERN _caml_program: PROC
EXTERN _array_bound_error: PROC
EXTERN _young_limit: DWORD
EXTERN _young_ptr: DWORD
EXTERN _caml_bottom_of_stack: DWORD
@ -251,6 +252,21 @@ _callback3_exn:
mov esi, offset _caml_apply3 ; code pointer
jmp L106
PUBLIC _caml_array_bound_error
ALIGN 4
_caml_array_bound_error:
; Empty the floating-point stack
ffree st(0)
ffree st(1)
ffree st(2)
ffree st(3)
ffree st(4)
ffree st(5)
ffree st(6)
ffree st(7)
; Branch to array_bound_error
jmp _array_bound_error
.DATA
PUBLIC _system__frametable
_system__frametable LABEL DWORD