# HG changeset patch # User Shinji KONO # Date 1290402855 -32400 # Node ID 3622e3f561dbcac6702815d228713ec402685e72 # Parent 75e30aea08cd07c00ae83628f1e8c655d6f6cb2c struct offset alignment diff -r 75e30aea08cd -r 3622e3f561db mc-codegen.c --- a/mc-codegen.c Mon Nov 22 13:34:27 2010 +0900 +++ b/mc-codegen.c Mon Nov 22 14:14:15 2010 +0900 @@ -3396,7 +3396,9 @@ if (type0>0 && (car(type0)==STRUCT||car(type0)==UNION)) strtype=1; sz = size(type0); - if ((sz%size_of_int==0)||strtype) { + if (lp64 && (sz%size_of_longlong==0)||strtype) { + disp = align(disp,size_of_longlong); + } else if ((sz%size_of_int==0)||strtype) { disp = align(disp,struct_align); } #endif