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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [simd-6.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
extern void abort (void);
2
extern int memcmp (const void *, const void *, __SIZE_TYPE__);
3
 
4
typedef unsigned char v8qi __attribute__((vector_size(8)));
5
 
6
v8qi foo(v8qi x, v8qi y)
7
{
8
  return x * y;
9
}
10
 
11
int main()
12
{
13
  v8qi a = { 1, 2, 3, 4, 5, 6, 7, 8 };
14
  v8qi b = { 3, 3, 3, 3, 3, 3, 3, 3 };
15
  v8qi c = { 3, 6, 9, 12, 15, 18, 21, 24 };
16
  v8qi r;
17
 
18
  r = foo (a, b);
19
  if (memcmp (&r, &c, 8) != 0)
20
    abort ();
21
  return 0;
22
}

powered by: WebSVN 2.1.0

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