diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-10-11 10:16:51 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-10-11 10:16:51 +0200 |
commit | 9a62a6663a25c74c537f79bfc767f75fd4994181 (patch) | |
tree | c92c3c2a881a54208ad4f63295daec0dd6836c02 /arm/TargetPrinter.ml | |
parent | 378ac3925503e6efd24cc34796e85d95c031e72d (diff) | |
parent | 659b735ed2dbefcbe8bcb2ec2123b66019ddaf14 (diff) | |
download | compcert-9a62a6663a25c74c537f79bfc767f75fd4994181.tar.gz compcert-9a62a6663a25c74c537f79bfc767f75fd4994181.zip |
Merge branch 'master' into ppc64
Resolved conflicts in:configure powerpc/Asmexpand.ml
Diffstat (limited to 'arm/TargetPrinter.ml')
-rw-r--r-- | arm/TargetPrinter.ml | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml index f7f0d313..2e676090 100644 --- a/arm/TargetPrinter.ml +++ b/arm/TargetPrinter.ml @@ -20,6 +20,7 @@ open AST open Memdata open Asm open PrintAsmaux +open Fileinfo (* Type for the ABI versions *) type float_abi_type = @@ -152,8 +153,11 @@ module Target (Opt: PRINTER_OPTIONS) : TARGET = | Section_user(s, wr, ex) -> sprintf ".section \"%s\",\"a%s%s\",%%progbits" s (if wr then "w" else "") (if ex then "x" else "") - | Section_debug_info - | Section_debug_abbrev -> "" (* Dummy value *) + | Section_debug_info _ -> ".section .debug_info,\"\",%progbits" + | Section_debug_loc -> ".section .debug_loc,\"\",%progbits" + | Section_debug_abbrev -> ".section .debug_abbrev,\"\",%progbits" + | Section_debug_line _ -> ".section .debug_line,\"\",%progbits" + let section oc sec = fprintf oc " %s\n" (name_of_section sec) @@ -894,25 +898,31 @@ module Target (Opt: PRINTER_OPTIONS) : TARGET = | _ -> "armv7"); fprintf oc " .fpu %s\n" (if Opt.vfpv3 then "vfpv3-d16" else "vfpv2"); - fprintf oc " .%s\n" (if !Clflags.option_mthumb then "thumb" else "arm") - - let print_epilogue oc = () - - let default_falignment = 4 + fprintf oc " .%s\n" (if !Clflags.option_mthumb then "thumb" else "arm"); + if !Clflags.option_g then begin + section oc Section_text; + let low_pc = new_label () in + Debug.add_compilation_section_start ".text" low_pc; + fprintf oc "%a:\n" elf_label low_pc; + fprintf oc " .cfi_sections .debug_frame\n" + end - let get_start_addr () = -1 (* Dummy constant *) - let get_end_addr () = -1 (* Dummy constant *) + let print_epilogue oc = + if !Clflags.option_g then begin + let high_pc = new_label () in + Debug.add_compilation_section_end ".text" high_pc; + Debug.compute_gnu_file_enum (fun f -> ignore (print_file oc f)); + section oc Section_text; + fprintf oc "%a:\n" elf_label high_pc + end - let get_stmt_list_addr () = -1 (* Dummy constant *) - module DwarfAbbrevs = DwarfUtil.DefaultAbbrevs (* Dummy Abbrev types *) - + let default_falignment = 4 + let label = elf_label let new_label = new_label - - let print_file_loc _ _ = () (* Dummy function *) end let sel_target () = |