From 37180552769b316e7239d047008f187127e630e6 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 25 Jun 2010 20:47:16 -0700 Subject: [PATCH] Align emitted DATA_* elements -- tydescs in particular -- to 16 byte boundaries, so we can get our tag bit freed up. --- src/boot/me/trans.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index a8b74fcf44d..98bf6bab264 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -1016,6 +1016,9 @@ let trans_visitor let (cell, _) = trans_lval flv in (Il.Cell cell, fty) + and align x = + Asm.ALIGN_FILE (16, Asm.ALIGN_MEM(16, x)) + and trans_crate_rel_data_operand (d:data) (thunk:unit -> Asm.frag) @@ -1025,7 +1028,7 @@ let trans_visitor begin fun _ -> let fix = new_fixup "data item" in - let frag = Asm.DEF (fix, thunk()) in + let frag = align (Asm.DEF (fix, thunk())) in (fix, frag) end in @@ -1037,7 +1040,7 @@ let trans_visitor begin fun _ -> let fix = new_fixup "data item" in - let frag = Asm.DEF (fix, thunk()) in + let frag = align (Asm.DEF (fix, thunk())) in (fix, frag) end in