diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-01-27 16:31:25 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-01-27 16:31:25 +0000 |
commit | 87ada41360ec47118e3847637b6c746060e60be8 (patch) | |
tree | dca2da7400f19f41172e2008362793d81a599a94 /powerpc/PrintAsm.ml | |
parent | 3df67218d4551653683640bd52cda5bf8401f77b (diff) | |
download | compcert-87ada41360ec47118e3847637b6c746060e60be8.tar.gz compcert-87ada41360ec47118e3847637b6c746060e60be8.zip |
Revised handling of #pragma section and small data areas
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1235 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc/PrintAsm.ml')
-rw-r--r-- | powerpc/PrintAsm.ml | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/powerpc/PrintAsm.ml b/powerpc/PrintAsm.ml index d9c65314..50a84744 100644 --- a/powerpc/PrintAsm.ml +++ b/powerpc/PrintAsm.ml @@ -175,26 +175,23 @@ let section oc name = (* Names of sections *) -let (text, data, const_data, sdata, float_literal) = +let (text, data, const_data, float_literal) = match target with | MacOS -> (".text", ".data", ".const", - ".data", (* unused *) ".const_data") | Linux -> (".text", ".data", ".rodata", - ".data", (* unused *) ".section .rodata.cst8,\"aM\",@progbits,8") | Diab -> (".text", ".data", - ".data", (* or: .rodata? *) - ".sdata", (* to check *) - ".data") (* or: .rodata? *) + ".text", + ".text") (* Encoding masks for rlwinm instructions *) @@ -496,7 +493,7 @@ let print_function oc name code = Hashtbl.clear current_function_labels; section oc (match CPragmas.section_for_atom name true with - | Some s -> ".section\t" ^ s + | Some s -> s | None -> text); fprintf oc " .align 2\n"; if not (Cil2Csyntax.atom_is_static name) then @@ -713,14 +710,11 @@ let print_var oc (Coq_pair(Coq_pair(name, init_data), _)) = match init_data with [Init_space _] -> false | _ -> true in let sec = match CPragmas.section_for_atom name init with - | Some s -> ".section\t" ^ s + | Some s -> s | None -> - if CPragmas.atom_is_small_data name (coqint_of_camlint 0l) then - sdata - else if Cil2Csyntax.atom_is_readonly name then - const_data - else - data + if Cil2Csyntax.atom_is_readonly name + then const_data + else data in section oc sec; fprintf oc " .align 3\n"; |