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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [bswaptest.c] - Blame information for rev 708

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run { target { x86_64-*-* && lp64 } } } */
2
/* { dg-options "-g" } */
3
 
4
volatile int vv;
5
 
6
__attribute__((noclone, noinline)) long
7
foo (long x)
8
{
9
  long f = __builtin_bswap64 (x);
10
  long g = f;
11
  asm volatile ("" : "+r" (f));
12
  vv++;         /* { dg-final { gdb-test 12 "g" "f" } } */
13
  return f;
14
}
15
 
16
__attribute__((noclone, noinline)) int
17
bar (int x)
18
{
19
  int f = __builtin_bswap32 (x);
20
  int g = f;
21
  asm volatile ("" : "+r" (f));
22
  vv++;         /* { dg-final { gdb-test 22 "g" "f" } } */
23
  return f;
24
}
25
 
26
int
27
main ()
28
{
29
  foo (0x123456789abcde0fUL);
30
  bar (0x12345678);
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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