diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2014-01-03 08:41:34 +0800 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2014-01-03 10:19:38 +0800 |
| commit | 59b8007f98eb814f6fd19455ab868ecaa07dfc0d (patch) | |
| tree | 90fc301c3d93f24c1806b1b2d3184c2dfe3b3845 | |
| parent | fbc8810334e6a087bed6de4dd84635cb6037b4dc (diff) | |
| download | tinycc-59b8007f98eb814f6fd19455ab868ecaa07dfc0d.tar.gz tinycc-59b8007f98eb814f6fd19455ab868ecaa07dfc0d.tar.bz2 | |
Always set *palign in classify_x86_64_arg
Set *palign for VT_BITFIELD and VT_ARRAY types in classify_x86_64_arg as
else you happen to have in *palign what was already there. This can
cause gfunc_call on !PE systems to consider an array as 16 bytes align
and trigger the assert if the previous argument was 16 bytes aligned.
| -rw-r--r-- | x86_64-gen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/x86_64-gen.c b/x86_64-gen.c index 0962056..2f4d8fe 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -993,6 +993,7 @@ static X86_64_Mode classify_x86_64_arg(CType *ty, CType *ret, int *psize, int *p if (ty->t & (VT_BITFIELD|VT_ARRAY)) { *psize = 8; + *palign = 8; *reg_count = 1; ret_t = ty->t; mode = x86_64_mode_integer; |
