Handle T_HRESULT types in CodeView records
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr53199.c
bloba5a53077ac282272dee87b1bdb971f8a723b0080
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-options "-O2 -mdejagnu-cpu=power6 -mavoid-indexed-addresses" } */
4 /* { dg-final { scan-assembler-times "lwbrx" 12 } } */
5 /* { dg-final { scan-assembler-times "stwbrx" 6 } } */
7 /* PR 51399: bswap gets an error if -mavoid-indexed-addresses was used in
8 creating the two lwbrx instructions. */
10 long long
11 load64_reverse_1 (long long *p)
13 return __builtin_bswap64 (*p);
16 long long
17 load64_reverse_2 (long long *p)
19 return __builtin_bswap64 (p[1]);
22 long long
23 load64_reverse_3 (long long *p, int i)
25 return __builtin_bswap64 (p[i]);
28 long long
29 load64_reverse_4 (long long dummy __attribute__ ((unused)), long long *p)
31 return __builtin_bswap64 (*p);
34 long long
35 load64_reverse_5 (long long dummy __attribute__ ((unused)), long long *p)
37 return __builtin_bswap64 (p[1]);
40 long long
41 load64_reverse_6 (long long dummy __attribute__ ((unused)), long long *p, int i)
43 return __builtin_bswap64 (p[i]);
46 void
47 store64_reverse_1 (long long *p, long long x)
49 *p = __builtin_bswap64 (x);
52 void
53 store64_reverse_2 (long long *p, long long x)
55 p[1] = __builtin_bswap64 (x);
58 void
59 store64_reverse_3 (long long *p, long long x, int i)
61 p[i] = __builtin_bswap64 (x);
64 long long
65 reg_reverse_1 (long long x)
67 return __builtin_bswap64 (x);
70 long long
71 reg_reverse_2 (long long dummy __attribute__ ((unused)), long long x)
73 return __builtin_bswap64 (x);