| 1 |
/* { dg-do compile { target int128 } } */ |
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
|
| 4 |
static inline unsigned __int128 rotr(unsigned __int128 input) |
| 5 |
{ |
| 6 |
return ((input >> 64) | (input << (64))); |
| 7 |
} |
| 8 |
|
| 9 |
unsigned __int128 WHIRL_S[256] = {((__int128)0x18186018C07830D8) << 64 |0x18186018C07830D8}; |
| 10 |
unsigned __int128 whirl(unsigned char x0) |
| 11 |
{ |
| 12 |
register int t __asm("rdi") = x0&0xFF; |
| 13 |
const unsigned __int128 s4 = WHIRL_S[t]; |
| 14 |
register unsigned __int128 tt __asm("rdi") = rotr(s4); |
| 15 |
asm("":::"memory"); |
| 16 |
return tt; |
| 17 |
} |