OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [stackalign/] [push-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR middle-end/37010 */
2
/* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
3
/* { dg-options "-msse2 -mpreferred-stack-boundary=2" } */
4
/* { dg-require-effective-target sse2 } */
5
/* { dg-require-effective-target sse2_runtime } */
6
 
7
#include <emmintrin.h>
8
 
9
typedef __PTRDIFF_TYPE__ ptrdiff_t;
10
typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
11
typedef int aligned __attribute__((aligned(16)));
12
 
13
extern void abort (void);
14
 
15
__m128 r;
16
 
17
int
18
__attribute__ ((noinline))
19
check_int (int *i, int align)
20
{
21
  *i = 20;
22
  if ((((ptrdiff_t) i) & (align - 1)) != 0)
23
    {
24
      abort ();
25
    }
26
  return *i;
27
}
28
 
29
void
30
__attribute__ ((noinline))
31
foo (__m128 x, __m128 y ,__m128 z ,__m128 a, int size)
32
{
33
  aligned i;
34
 
35
  if (size != 5 || check_int (&i, __alignof__(i)) != i)
36
    abort ();
37
 
38
  r = a;
39
}
40
 
41
int
42
main (void)
43
{
44
  __m128 x = { 1.0 };
45
 
46
  foo (x, x, x, x, 5);
47
 
48
  if (__builtin_memcmp (&r, &x, sizeof (r)))
49
    abort ();
50
 
51
  return 0;
52
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.