Support raise_notrace under arm/arm64 (not tested). Do not distinguish raise/reraise for now.

git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14228 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Alain Frisch 2013-10-15 12:03:47 +00:00
parent ae9a78b10d
commit 3f3599f0ee
2 changed files with 9 additions and 5 deletions

View File

@ -808,11 +808,13 @@ let emit_instr i =
` pop \{trap_ptr, lr}\n`;
cfi_adjust_cfa_offset (-8);
stack_offset := !stack_offset - 8; 1
| Lraise ->
if !Clflags.debug then begin
| Lraise k ->
begin match !Clflags.debug, k with
| true, (Lambda.Raise_regular | Lambda.Raise_reraise) ->
` {emit_call "caml_raise_exn"}\n`;
`{record_frame Reg.Set.empty i.dbg}\n`; 1
end else begin
| false, _
| true, Lambda.Raise_notrace ->
` mov sp, trap_ptr\n`;
` pop \{trap_ptr, pc}\n`; 2
end

View File

@ -614,10 +614,12 @@ let emit_instr i =
cfi_adjust_cfa_offset (-16);
stack_offset := !stack_offset - 16
| Lraise ->
if !Clflags.debug then begin
begin match !Clflags.debug, k with
| true, (Lambda.Raise_regular | Lambda.Raise_reraise) ->
` bl {emit_symbol "caml_raise_exn"}\n`;
`{record_frame Reg.Set.empty i.dbg}\n`
end else begin
| false, _
| true, Lambda.Raise_notrace ->
` mov sp, {emit_reg reg_trap_ptr}\n`;
` ldr {emit_reg reg_tmp1}, [sp, #8]\n`;
` ldr {emit_reg reg_trap_ptr}, [sp], 16\n`;