From 87ada41360ec47118e3847637b6c746060e60be8 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 27 Jan 2010 16:31:25 +0000 Subject: 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 --- powerpc/PrintAsm.ml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'powerpc/PrintAsm.ml') 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"; -- cgit