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-0dff7051ff02master
parent
ae9a78b10d
commit
3f3599f0ee
|
@ -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
|
||||
|
|
|
@ -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`;
|
||||
|
|
Loading…
Reference in New Issue