https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68263

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-11-11
         Depends on|                            |66250
     Ever confirmed|0                           |1

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Uroš Bizjak from comment #3)
> (In reply to H.J. Lu from comment #2)
> > The maximum stack alignment is 4 byte for IA MCU.  That is why
> > reload generates misaligned load/store.
> 
> It looks to me that BIGGEST_ALIGNMENT is defined in a wrong way. If you want
> to use SSE with TARGET_IAMCU, then it needs to be defined to 128.

We can't change BIGGEST_ALIGNMENT due to PR 66250.  Alignment of
long long is 4 byte for IA MCU.  But alignment of long long can't be
changed.  With

#define BIGGEST_ALIGNMENT \
  (TARGET_AVX512F ? 512 \
   : (TARGET_AVX ? 256 \
      : (TARGET_SSE ? 128 \
         : (TARGET_IAMCU ? 32 : 128))))

I got:

[hjl@gnu-tools-1 gcc]$ cat x.i
int x = __alignof__(long long);
[hjl@gnu-tools-1 gcc]$ ./xgcc -B./ -S -m32 x.i -miamcu
[hjl@gnu-tools-1 gcc]$ cat x.s
        .file   "x.i"
        .globl  x
        .data
        .align 4
        .type   x, @object
        .size   x, 4
x:
        .long   8
        .ident  "GCC: (GNU) 6.0.0 20151110 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 gcc]$ ./xgcc -B./ -S -m32 x.i 
[hjl@gnu-tools-1 gcc]$ cat x.s
        .file   "x.i"
        .globl  x
        .data
        .align 4
        .type   x, @object
        .size   x, 4
x:
        .long   8
        .ident  "GCC: (GNU) 6.0.0 20151110 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 gcc]$


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66250
[Bug 66250] Can't adjust complex nor decimal floating point modes

Reply via email to