[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / prefix-large.h
blob07b38ae08752d002ae8f2e538a42c5404e53a26a
1 /* Common tests for prefixed instructions testing whether we can generate a
2 34-bit offset using 1 instruction. */
4 #ifndef TYPE
5 #define TYPE unsigned int
6 #endif
8 #if !defined(DO_ADD) && !defined(DO_VALUE) && !defined(DO_SET)
9 #define DO_ADD 1
10 #define DO_VALUE 1
11 #define DO_SET 1
12 #endif
14 #ifndef CONSTANT
15 #define CONSTANT 0x12480UL
16 #endif
18 #if DO_ADD
19 void
20 add (TYPE *p, TYPE a)
22 p[CONSTANT] += a;
24 #endif
26 #if DO_VALUE
27 TYPE
28 value (TYPE *p)
30 return p[CONSTANT];
32 #endif
34 #if DO_SET
35 void
36 set (TYPE *p, TYPE a)
38 p[CONSTANT] = a;
40 #endif