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.

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to