| 1 |
/* { dg-do link } */ |
| 2 |
|
| 3 |
typedef __UINT16_TYPE__ u16; |
| 4 |
typedef __INT16_TYPE__ T; |
| 5 |
|
| 6 |
#ifdef __OPTIMIZE__ |
| 7 |
|
| 8 |
static __inline__ __attribute__((always_inline)) |
| 9 |
void delay (T x, u16 nops) |
| 10 |
{ |
| 11 |
do |
| 12 |
__builtin_avr_nops (nops); |
| 13 |
while (--x != -1); |
| 14 |
} |
| 15 |
|
| 16 |
#ifdef __AVR_HAVE_JMP_CALL__ |
| 17 |
|
| 18 |
void delay_2043 (T x) { delay (x, 2043); } |
| 19 |
void delay_2044 (T x) { delay (x, 2044); } |
| 20 |
void delay_2045 (T x) { delay (x, 2045); } |
| 21 |
void delay_2046 (T x) { delay (x, 2046); } |
| 22 |
|
| 23 |
#endif /* have JUMP, CALL */ |
| 24 |
|
| 25 |
void delay_61 (T x) { delay (x, 61); } |
| 26 |
void delay_62 (T x) { delay (x, 62); } |
| 27 |
void delay_63 (T x) { delay (x, 63); } |
| 28 |
|
| 29 |
#endif /* optimize */ |
| 30 |
|
| 31 |
int main (void) |
| 32 |
{ |
| 33 |
return 0; |
| 34 |
} |