diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-22 14:05:47 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-22 14:05:47 +0000 |
commit | e1030852452c9e59045806d3306bffb14742da3b (patch) | |
tree | 075dc8dedbeaa40aab5737045950c46136bcacf5 /powerpc | |
parent | 902c3f9defe6599c20c74cf0af646e270fe91122 (diff) | |
download | compcert-e1030852452c9e59045806d3306bffb14742da3b.tar.gz compcert-e1030852452c9e59045806d3306bffb14742da3b.zip |
Simplified and cleaned up the passing of information from C2C to PrintAsm, as well as the handling of sections.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1822 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc')
-rw-r--r-- | powerpc/PrintAsm.ml | 13 | ||||
-rw-r--r-- | powerpc/extractionMachdep.v | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/powerpc/PrintAsm.ml b/powerpc/PrintAsm.ml index ff7957da..f396a235 100644 --- a/powerpc/PrintAsm.ml +++ b/powerpc/PrintAsm.ml @@ -870,7 +870,10 @@ let print_function oc name code = Hashtbl.clear current_function_labels; float_literals := []; jumptables := []; - let (text, lit, jmptbl) = sections_for_function name in + let (text, lit, jmptbl) = + match C2C.atom_sections name with + | [t;l;j] -> (t, l, j) + | _ -> (Section_text, Section_literal, Section_jumptable) in section oc text; fprintf oc " .align 2\n"; if not (C2C.atom_is_static name) then @@ -1093,11 +1096,11 @@ let print_var oc (name, v) = match v.gvar_init with | [] -> () | _ -> - let init = - match v.gvar_init with [Init_space _] -> false | _ -> true in let sec = - Sections.section_for_variable name init in - let align = + match C2C.atom_sections name with + | [s] -> s + | _ -> Section_data true + and align = match C2C.atom_alignof name with | Some a -> log2 a | None -> 3 in (* 8-alignment is a safe default *) diff --git a/powerpc/extractionMachdep.v b/powerpc/extractionMachdep.v index a315e8f9..cb4c3c20 100644 --- a/powerpc/extractionMachdep.v +++ b/powerpc/extractionMachdep.v @@ -18,7 +18,7 @@ Extract Constant SelectOp.use_fused_mul => "(fun () -> !Clflags.option_fmadd)". (* Asm *) Extract Constant Asm.low_half => "fun _ -> assert false". Extract Constant Asm.high_half => "fun _ -> assert false". -Extract Constant Asm.symbol_is_small_data => "Sections.atom_is_small_data". +Extract Constant Asm.symbol_is_small_data => "C2C.atom_is_small_data". Extract Constant Asm.small_data_area_offset => "fun _ _ _ -> assert false". (* Suppression of stupidly big equality functions *) |