0c4d3e
From af276d83f41cb9eb9f1e50a75a9be205c9b2fee6 Mon Sep 17 00:00:00 2001
0c4d3e
From: "Richard W.M. Jones" <rjones@redhat.com>
0c4d3e
Date: Tue, 5 Jun 2018 19:48:08 +0000
0c4d3e
Subject: [PATCH 8/8] riscv: Emit debug info.
0c4d3e
0c4d3e
---
0c4d3e
 asmcomp/riscv/emit.mlp | 3 +++
0c4d3e
 1 file changed, 3 insertions(+)
0c4d3e
0c4d3e
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
0c4d3e
index 718dca080..e42ee9770 100644
0c4d3e
--- a/asmcomp/riscv/emit.mlp
0c4d3e
+++ b/asmcomp/riscv/emit.mlp
0c4d3e
@@ -261,6 +261,7 @@ let tailrec_entry_point = ref 0
0c4d3e
 (* Output the assembly code for an instruction *)
0c4d3e
 
0c4d3e
 let emit_instr i =
0c4d3e
+  emit_debug_info i.dbg;
0c4d3e
   match i.desc with
0c4d3e
     Lend -> ()
0c4d3e
   | Lop(Imove | Ispill | Ireload) ->
0c4d3e
@@ -560,6 +561,7 @@ let fundecl fundecl =
0c4d3e
   emit_stack_adjustment (-n);
0c4d3e
   if !contains_calls then store_ra n;
0c4d3e
   `{emit_label !tailrec_entry_point}:\n`;
0c4d3e
+  emit_debug_info fundecl.fun_dbg;
0c4d3e
   emit_all fundecl.fun_body;
0c4d3e
   List.iter emit_call_gc !call_gc_sites;
0c4d3e
   List.iter emit_call_bound_error !bound_error_sites;
0c4d3e
@@ -619,6 +621,7 @@ let data l =
0c4d3e
 
0c4d3e
 let begin_assembly() =
0c4d3e
   `	.file \"\"\n`; (* PR#7073 *)
0c4d3e
+  reset_debug_info ();
0c4d3e
   (* Emit the beginning of the segments *)
0c4d3e
   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
0c4d3e
   `	{emit_string data_space}\n`;
0c4d3e
-- 
0c4d3e
2.17.1
0c4d3e