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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [vperm-v2di.c] - Blame information for rev 848

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O -msse2" } */
3
/* { dg-require-effective-target sse2 } */
4
 
5
#include "isa-check.h"
6
#include "sse-os-support.h"
7
 
8
typedef long long S;
9
typedef long long V __attribute__((vector_size(16)));
10
typedef long long IV __attribute__((vector_size(16)));
11
typedef union { S s[2]; V v; } U;
12
 
13
static U i[2], b, c;
14
 
15
extern int memcmp (const void *, const void *, __SIZE_TYPE__);
16
#define assert(T) ((T) || (__builtin_trap (), 0))
17
 
18
#define TEST(E0, E1) \
19
  b.v = __builtin_shuffle (i[0].v, i[1].v, (IV){E0, E1}); \
20
  c.s[0] = i[0].s[E0]; \
21
  c.s[1] = i[0].s[E1]; \
22
  __asm__("" : : : "memory"); \
23
  assert (memcmp (&b, &c, sizeof(c)) == 0);
24
 
25
#include "vperm-2-2.inc"
26
 
27
int main()
28
{
29
  check_isa ();
30
 
31
  if (!sse_os_support ())
32
    exit (0);
33
 
34
  i[0].s[0] = 0;
35
  i[0].s[1] = 1;
36
  i[0].s[2] = 2;
37
  i[0].s[3] = 3;
38
 
39
  check();
40
  return 0;
41
}

powered by: WebSVN 2.1.0

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