Mercurial > hg > CbC > old > device
changeset 802:bdb63568ca08
alignment 16
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 24 Nov 2010 16:10:03 +0900 |
parents | 6b93d95a1564 |
children | a5f9e5a4db1b |
files | mc-code-i64.c test/ps2.c |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-i64.c Wed Nov 24 13:28:11 2010 +0900 +++ b/mc-code-i64.c Wed Nov 24 16:10:03 2010 +0900 @@ -568,7 +568,7 @@ #define round8(i) align(i,8) -#define func_disp_offset (16+8*5) +#define func_disp_offset (16+8*6) // #define code_disp_offset (16) #define arg_offset (16) @@ -5349,6 +5349,12 @@ extern int code_lvar_alignment(int args,NMTBL *n, int type0,int sz) { + // default align 16 for large object + if (sz >= 8 && !attr_value(n,ALIGNED)) { + n->sc = LVAR; + n->dsp = new_lvar_align(sz,16); + return disp; + } return code_lvar_alignment0(args,n, type0,sz); }
--- a/test/ps2.c Wed Nov 24 13:28:11 2010 +0900 +++ b/test/ps2.c Wed Nov 24 16:10:03 2010 +0900 @@ -145,7 +145,7 @@ sizeof(aligns)/sizeof(void *)); for(i=0;i<sizeof(aligns)/sizeof(void *);i++) { - printf("#0147:align10%ld %ld\n",i,mod16(aligns[i])); + printf("#0147:align10%d %ld\n",i,mod16(aligns[i])); } }