diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-07-01 07:40:04 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-07-01 07:40:04 +0000 |
commit | 9b8f0f6c4683dd00ee0e3422b84c9cc34510011e (patch) | |
tree | 27536a5176fe16448f376e69a3f335685bacb588 /powerpc/PrintAsm.ml | |
parent | a68e113d362e3d28fb1fc45d7f40692fdffe2498 (diff) |
Added option -falign-functions
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1945 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc/PrintAsm.ml')
-rw-r--r-- | powerpc/PrintAsm.ml | 11 |
1 files changed, 7 insertions, 4 deletions
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) |