OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [funcspec-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Test whether using target specific options, we can generate SSE2 code on
2
   32-bit, which does not generate SSE2 by default, but still generate 387 code
3
   for a function that doesn't use attribute((option)).  */
4
/* { dg-do compile } */
5
/* { dg-require-effective-target ia32 } */
6
/* { dg-options "-O3 -ftree-vectorize -mno-sse" } */
7
 
8
#ifndef SIZE
9
#define SIZE 1024
10
#endif
11
 
12
float a[SIZE] __attribute__((__aligned__(16)));
13
float b[SIZE] __attribute__((__aligned__(16)));
14
float c[SIZE] __attribute__((__aligned__(16)));
15
 
16
void sse_addnums (void) __attribute__ ((__target__ ("sse2")));
17
 
18
void
19
sse_addnums (void)
20
{
21
  int i = 0;
22
  for (; i < SIZE; ++i)
23
    a[i] = b[i] + c[i];
24
}
25
 
26
void
27
i387_subnums (void)
28
{
29
  int i = 0;
30
  for (; i < SIZE; ++i)
31
    a[i] = b[i] - c[i];
32
}
33
 
34
/* { dg-final { scan-assembler "addps\[ \t\]" } } */
35
/* { dg-final { scan-assembler "fsubs\[ \t\]" } } */

powered by: WebSVN 2.1.0

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