aboutsummaryrefslogtreecommitdiffstats
path: root/backend/PrintAsmaux.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-12-15 14:34:57 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-12-15 14:34:57 +0100
commit0e40a5b6ae0997b11469fdeea702db4c7f878c17 (patch)
tree2822da4c9312f949d751dfb7142de6a758f3e432 /backend/PrintAsmaux.ml
parentd830772b1d61c638fe2197755a2b77f7321118a9 (diff)
downloadcompcert-kvx-0e40a5b6ae0997b11469fdeea702db4c7f878c17.tar.gz
compcert-kvx-0e40a5b6ae0997b11469fdeea702db4c7f878c17.zip
Print cfi_sections only if cfi is supported.
On older version of the binutils the cfi directives are not always supported so we only print cfi_sections if the corresponding .ini setting is set to true.
Diffstat (limited to 'backend/PrintAsmaux.ml')
-rw-r--r--backend/PrintAsmaux.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/PrintAsmaux.ml b/backend/PrintAsmaux.ml
index 4a612c26..0ca5b8e0 100644
--- a/backend/PrintAsmaux.ml
+++ b/backend/PrintAsmaux.ml
@@ -129,6 +129,12 @@ let cfi_rel_offset =
else
(fun _ _ _ -> ())
+let cfi_section =
+ if Configuration.asm_supports_cfi then
+ (fun oc -> fprintf oc " .cfi_sections .debug_frame\n")
+ else
+ (fun _ -> ())
+
(* Basic printing functions *)
let coqint oc n =
fprintf oc "%ld" (camlint_of_coqint n)