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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [simd-4.c] - Blame information for rev 688

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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