aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2014-11-11 18:42:51 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2014-11-11 18:42:51 +0100
commitac48235ec7485f659162d6220c8b4c7731505423 (patch)
tree59a828e7e21daa7682871b14173b8a177e92cab7 /powerpc
parent977f81ff4962750f14970b8a32e30d90407572fe (diff)
downloadcompcert-kvx-ac48235ec7485f659162d6220c8b4c7731505423.tar.gz
compcert-kvx-ac48235ec7485f659162d6220c8b4c7731505423.zip
Added functions for printing of the abbreviations.
Diffstat (limited to 'powerpc')
-rw-r--r--powerpc/PrintDiab.ml24
1 files changed, 24 insertions, 0 deletions
diff --git a/powerpc/PrintDiab.ml b/powerpc/PrintDiab.ml
index 59a2951e..7606cbcf 100644
--- a/powerpc/PrintDiab.ml
+++ b/powerpc/PrintDiab.ml
@@ -106,6 +106,10 @@ module Diab_System =
let string_of_uleb v =
Printf.sprintf " .uleb128 %d\n" v
+
+ let abbrv_start_addr = ref (-1)
+
+ let get_abbrv_start_addr () = !abbrv_start_addr
let sibling_type_abbr = 0x13
let decl_file_type_abbr = 0x6
@@ -134,6 +138,26 @@ module Diab_System =
let data_location_ref_type_abbr = 0x13
let bound_const_type_abbr = 0xf
let bound_ref_type_abbr=0x13
+
+
+ let abbrv_section_start oc =
+ fprintf oc " .section .debug_abbrev,,n\n";
+ let lbl = new_label () in
+ abbrv_start_addr := lbl;
+ label oc lbl
+
+ let abbrv_section_end oc =
+ fprintf oc " .section .debug_abbrev,,n\n";
+ fprintf oc " .sleb128 0\n"
+
+ let abbrv_prologue oc id =
+ fprintf oc " .section .debug_abbrev,,n\n";
+ fprintf oc " .uleb128 %d\n" id
+
+ let abbrv_epilogue oc =
+ fprintf oc " .uleb128 0\n";
+ fprintf oc " .uleb128 0\n"
+
end:ABBRV_DEFS)
end:SYSTEM)