[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Generating better i386 code
From: |
Jason Hood |
Subject: |
Re: [Tinycc-devel] Generating better i386 code |
Date: |
Fri, 27 Sep 2013 19:38:05 +1000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
On 27/09/2013 16:54, Daniel Glöckner wrote:
> No,
> struct {
> char x[4];
> }
> has an alignment of 1 byte.
Right, well I think that's simple enough:
--- tccgen~.c 2013-09-25 19:24:46 +1000
+++ tccgen.c 2013-09-27 19:33:08 +1000
@@ -2405,12 +2405,18 @@
if (!nocode_wanted) {
size = type_size(&vtop->type, &align);
+#ifdef TCC_TARGET_ARM
+ if (!(align & 3)) {
+#endif
if (size == 4)
goto small_struct;
if (size == 8) {
ft = VT_LLONG;
goto small_struct;
}
+#ifdef TCC_TARGET_ARM
+ }
+#endif
/* destination */
vswap();
--
Jason.