summaryrefslogtreecommitdiff
path: root/arm
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-02-22 14:05:47 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-02-22 14:05:47 +0000
commite1030852452c9e59045806d3306bffb14742da3b (patch)
tree075dc8dedbeaa40aab5737045950c46136bcacf5 /arm
parent902c3f9defe6599c20c74cf0af646e270fe91122 (diff)
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 'arm')
-rw-r--r--arm/PrintAsm.ml11
1 files changed, 7 insertions, 4 deletions
diff --git a/arm/PrintAsm.ml b/arm/PrintAsm.ml
index a616cc2..634faae 100644
--- a/arm/PrintAsm.ml
+++ b/arm/PrintAsm.ml
@@ -677,7 +677,10 @@ let print_function oc name fn =
Hashtbl.clear current_function_labels;
reset_constants();
currpos := 0;
- let (text, _, _) = sections_for_function name in
+ let text =
+ match C2C.atom_sections name with
+ | t :: _ -> t
+ | _ -> Section_text in
section oc text;
fprintf oc " .align 2\n";
if not (C2C.atom_is_static name) then
@@ -733,10 +736,10 @@ 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
+ match C2C.atom_sections name with
+ | [s] -> s
+ | _ -> Section_data true
and align =
match C2C.atom_alignof name with
| Some a -> log2 a