From 9b8f0f6c4683dd00ee0e3422b84c9cc34510011e Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 1 Jul 2012 07:40:04 +0000 Subject: Added option -falign-functions git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1945 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- powerpc/PrintAsm.ml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'powerpc/PrintAsm.ml') diff --git a/powerpc/PrintAsm.ml b/powerpc/PrintAsm.ml index 65d6ce0..0b94aaa 100644 --- a/powerpc/PrintAsm.ml +++ b/powerpc/PrintAsm.ml @@ -875,7 +875,9 @@ let print_function oc name code = | [t;l;j] -> (t, l, j) | _ -> (Section_text, Section_literal, Section_jumptable) in section oc text; - fprintf oc " .align 2\n"; + let alignment = + match !Clflags.option_falignfunctions with Some n -> log2 n | None -> 2 in + fprintf oc " .align %d\n" alignment; if not (C2C.atom_is_static name) then fprintf oc " .globl %a\n" symbol name; fprintf oc "%a:\n" symbol name; @@ -1070,11 +1072,12 @@ let print_init oc = function | Init_int32 n -> fprintf oc " .long %ld\n" (camlint_of_coqint n) | Init_float32 n -> - fprintf oc " .long %ld %s %.18g\n" (camlint_of_coqint (Floats.Float.bits_of_single n)) - comment (camlfloat_of_coqfloat n) + fprintf oc " .long 0x%lx %s %.18g\n" + (camlint_of_coqint (Floats.Float.bits_of_single n)) + comment (camlfloat_of_coqfloat n) | Init_float64 n -> let b = camlint64_of_coqint (Floats.Float.bits_of_double n) in - fprintf oc " .long %Ld, %Ld %s %.18g\n" + fprintf oc " .long 0x%Lx, 0x%Lx %s %.18g\n" (Int64.shift_right_logical b 32) (Int64.logand b 0xFFFFFFFFL) comment (camlfloat_of_coqfloat n) -- cgit v1.2.3