From 51390e9d451ec624677724febffe31d36a752a97 Mon Sep 17 00:00:00 2001 From: Gabriel Scherer Date: Thu, 10 Nov 2016 16:05:29 -0500 Subject: [PATCH] arm [minor]: have emit_call, emit_jump include a newline --- asmcomp/arm/emit.mlp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp index de61da57d73f..a2637851ae5c 100644 --- a/asmcomp/arm/emit.mlp +++ b/asmcomp/arm/emit.mlp @@ -42,13 +42,13 @@ let emit_symbol s = let emit_call s = if !Clflags.dlcode || !Clflags.pic_code - then `bl {emit_symbol s}(PLT)` - else `bl {emit_symbol s}` + then ` bl {emit_symbol s}(PLT)\n` + else ` bl {emit_symbol s}\n` let emit_jump s = if !Clflags.dlcode || !Clflags.pic_code - then `b {emit_symbol s}(PLT)` - else `b {emit_symbol s}` + then ` b {emit_symbol s}(PLT)\n` + else ` b {emit_symbol s}\n` (* Output a pseudo-register *) @@ -137,7 +137,7 @@ type gc_call = let call_gc_sites = ref ([] : gc_call list) let emit_call_gc gc = - `{emit_label gc.gc_lbl}: {emit_call "caml_call_gc"}\n`; + `{emit_label gc.gc_lbl}:`; emit_call "caml_call_gc"; `{emit_label gc.gc_frame_lbl}: b {emit_label gc.gc_return_lbl}\n` (* Record calls to caml_ml_array_bound_error. @@ -163,7 +163,7 @@ let bound_error_label ?label dbg = end let emit_call_bound_error bd = - `{emit_label bd.bd_lbl}: {emit_call "caml_ml_array_bound_error"}\n`; + `{emit_label bd.bd_lbl}:`; emit_call "caml_ml_array_bound_error"; `{emit_label bd.bd_frame_lbl}:\n` (* Negate a comparison *) @@ -450,7 +450,7 @@ let emit_instr i = `{record_frame i.live false i.dbg ~label:label_after}\n`; 2 end | Lop(Icall_imm { func; label_after; }) -> - ` {emit_call func}\n`; + emit_call func; `{record_frame i.live false i.dbg ~label:label_after}\n`; 1 | Lop(Itailcall_ind { label_after = _; }) -> output_epilogue begin fun () -> @@ -465,14 +465,14 @@ let emit_instr i = output_epilogue begin fun () -> if !contains_calls then ` ldr lr, [sp, #{emit_int (-4)}]\n`; - ` {emit_jump func}\n`; 2 + emit_jump func; 2 end end | Lop(Iextcall { func; alloc = false; }) -> - ` {emit_call func}\n`; 1 + emit_call func; 1 | Lop(Iextcall { func; alloc = true; label_after; }) -> let ninstr = emit_load_symbol_addr (phys_reg 7 (* r7 *)) func in - ` {emit_call "caml_c_call"}\n`; + emit_call "caml_c_call"; `{record_frame i.live false i.dbg ~label:label_after}\n`; 1 + ninstr | Lop(Istackoffset n) -> @@ -566,11 +566,11 @@ let emit_instr i = end else begin let ninstr = begin match n with - 8 -> ` {emit_call "caml_alloc1"}\n`; 1 - | 12 -> ` {emit_call "caml_alloc2"}\n`; 1 - | 16 -> ` {emit_call "caml_alloc3"}\n`; 1 + 8 -> emit_call "caml_alloc1"; 1 + | 12 -> emit_call "caml_alloc2"; 1 + | 16 -> emit_call "caml_alloc3"; 1 | _ -> let ninstr = emit_intconst (phys_reg 7) (Int32.of_int n) in - ` {emit_call "caml_allocN"}\n`; 1 + ninstr + emit_call "caml_allocN"; 1 + ninstr end in `{emit_label lbl_frame}: add {emit_reg i.res.(0)}, alloc_ptr, #4\n`; 1 + ninstr @@ -793,7 +793,7 @@ let emit_instr i = | Lraise k -> begin match k with | Cmm.Raise_withtrace -> - ` {emit_call "caml_raise_exn"}\n`; + emit_call "caml_raise_exn"; `{record_frame Reg.Set.empty true i.dbg}\n`; 1 | Cmm.Raise_notrace -> ` mov sp, trap_ptr\n`; @@ -830,7 +830,7 @@ let emit_profile() = match Config.system with "linux_eabi" | "linux_eabihf" | "netbsd" -> ` push \{lr}\n`; - ` {emit_call "__gnu_mcount_nc"}\n` + emit_call "__gnu_mcount_nc"; | _ -> () (* Emission of a function declaration *)