Mercurial > hg > CbC > old > device
changeset 792:3622e3f561db
struct offset alignment
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 22 Nov 2010 14:14:15 +0900 |
parents | 75e30aea08cd |
children | aa2db7c70d42 |
files | mc-codegen.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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