summaryrefslogtreecommitdiff
path: root/arm
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-11-12 13:42:22 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-11-12 13:42:22 +0000
commitce4951549999f403446415c135ad1403a16a15c3 (patch)
treecac9bbb2fea29fce331916b277c38ed8fe29e471 /arm
parentdcb9f48f51cec5e864565862a700c27df2a1a7e6 (diff)
Globalenvs: allocate one-byte block with permissions Nonempty for each
function definition, so that comparisons between function pointers are correctly defined. AST, Globalenvs, and many other files: represent programs as a list of (function or variable) definitions instead of two lists, one for functions and the other for variables. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2067 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'arm')
-rw-r--r--arm/PrintAsm.ml17
1 files changed, 8 insertions, 9 deletions
diff --git a/arm/PrintAsm.ml b/arm/PrintAsm.ml
index ec1e836..60d0fa4 100644
--- a/arm/PrintAsm.ml
+++ b/arm/PrintAsm.ml
@@ -698,13 +698,6 @@ let print_function oc name fn =
fprintf oc " .type %a, %%function\n" print_symb name;
fprintf oc " .size %a, . - %a\n" print_symb name print_symb name
-let print_fundef oc (name, defn) =
- match defn with
- | Internal code ->
- print_function oc name code
- | External ef ->
- ()
-
(* Data *)
let print_init oc = function
@@ -734,7 +727,7 @@ let print_init_data oc name id =
else
List.iter (print_init oc) id
-let print_var oc (name, v) =
+let print_var oc name v =
match v.gvar_init with
| [] -> ()
| _ ->
@@ -756,8 +749,14 @@ let print_var oc (name, v) =
fprintf oc " .type %a, %%object\n" print_symb name;
fprintf oc " .size %a, . - %a\n" print_symb name print_symb name
+let print_globdef oc (name, gdef) =
+ | Gfun(Internal f) -> print_function oc name f
+ | Gfun(External ef) -> ()
+ | Gvar v -> print_var oc name v
+
let print_program oc p =
(* fprintf oc " .fpu vfp\n"; *)
List.iter (print_var oc) p.prog_vars;
- List.iter (print_fundef oc) p.prog_funct
+ List.iter (print_globdef oc) p.prog_defs
+