mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 15:11:08 +08:00
i386.c (contains_aligned_value_p): Return true for TCmode.
gcc/ 2008-07-03 H.J. Lu <hongjiu.lu@intel.com> * config/i386/i386.c (contains_aligned_value_p): Return true for TCmode. (ix86_data_alignment): Align TCmode to 128bits. (ix86_local_alignment): Likewise. testsuite/ 2008-07-03 H.J. Lu <hongjiu.lu@intel.com> Uros Bizjak <ubizjak@gmail.com> * gcc.target/i386/float128-1.c: New. Co-Authored-By: Uros Bizjak <ubizjak@gmail.com> From-SVN: r137416
This commit is contained in:
parent
e85edc9ed5
commit
192f2d33a1
@ -1,3 +1,10 @@
|
||||
2008-07-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config/i386/i386.c (contains_aligned_value_p): Return true
|
||||
for TCmode.
|
||||
(ix86_data_alignment): Align TCmode to 128bits.
|
||||
(ix86_local_alignment): Likewise.
|
||||
|
||||
2008-07-03 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR bootstrap/33304
|
||||
|
@ -4746,7 +4746,8 @@ contains_aligned_value_p (tree type)
|
||||
enum machine_mode mode = TYPE_MODE (type);
|
||||
if (((TARGET_SSE && SSE_REG_MODE_P (mode))
|
||||
|| mode == TDmode
|
||||
|| mode == TFmode)
|
||||
|| mode == TFmode
|
||||
|| mode == TCmode)
|
||||
&& (!TYPE_USER_ALIGN (type) || TYPE_ALIGN (type) > 128))
|
||||
return true;
|
||||
if (TYPE_ALIGN (type) < 128)
|
||||
@ -17103,7 +17104,8 @@ ix86_data_alignment (tree type, int align)
|
||||
|
||||
if (TYPE_MODE (type) == DCmode && align < 64)
|
||||
return 64;
|
||||
if (TYPE_MODE (type) == XCmode && align < 128)
|
||||
if ((TYPE_MODE (type) == XCmode
|
||||
|| TYPE_MODE (type) == TCmode) && align < 128)
|
||||
return 128;
|
||||
}
|
||||
else if ((TREE_CODE (type) == RECORD_TYPE
|
||||
@ -17169,7 +17171,8 @@ ix86_local_alignment (tree type, enum machine_mode mode,
|
||||
{
|
||||
if (TYPE_MODE (type) == DCmode && align < 64)
|
||||
return 64;
|
||||
if (TYPE_MODE (type) == XCmode && align < 128)
|
||||
if ((TYPE_MODE (type) == XCmode
|
||||
|| TYPE_MODE (type) == TCmode) && align < 128)
|
||||
return 128;
|
||||
}
|
||||
else if ((TREE_CODE (type) == RECORD_TYPE
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-07-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.target/i386/float128-1.c: New.
|
||||
|
||||
2008-07-03 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR preprocessor/33305
|
||||
|
24
gcc/testsuite/gcc.target/i386/float128-1.c
Normal file
24
gcc/testsuite/gcc.target/i386/float128-1.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* { dg-do run { target *-*-linux* } } */
|
||||
/* { dg-options "-O2 -msse2" } */
|
||||
|
||||
#include "sse2-check.h"
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
typedef _Complex float __attribute__((mode(TC))) _Complex128;
|
||||
|
||||
_Complex128 __attribute__ ((noinline))
|
||||
foo (_Complex128 x, _Complex128 y)
|
||||
{
|
||||
return x * y;
|
||||
}
|
||||
|
||||
static void
|
||||
sse2_test (void)
|
||||
{
|
||||
_Complex128 a = 1.3q + 3.4qi, b = 5.6q + 7.8qi, c;
|
||||
|
||||
c = foo (a, b);
|
||||
if (__real__(c) == 0.0q || __imag__ (c) == 0.0q)
|
||||
abort ();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user