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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [simd-4.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
typedef int __attribute__((vector_size(8))) v2si;
2
long long s64;
3
 
4
static inline long long
5
__ev_convert_s64 (v2si a)
6
{
7
  return (long long) a;
8
}
9
 
10
int main()
11
{
12
  union { long long ll; int i[2]; } endianness_test;
13
  endianness_test.ll = 1;
14
  int little_endian = endianness_test.i[0];
15
  s64 = __ev_convert_s64 ((v2si){1,0xffffffff});
16
  if (s64 != (little_endian ? 0xffffffff00000001LL : 0x1ffffffffLL))
17
    abort ();
18
  return 0;
19
}

powered by: WebSVN 2.1.0

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