| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-std=gnu17" } */ |
| 3 |
|
| 4 |
typedef int UInt; |
| 5 |
UInt skeletal_RI5_instr; |
| 6 |
__attribute__((__noreturn__)) void vex_assert_fail(); |
| 7 |
typedef struct { |
| 8 |
union { |
| 9 |
struct { |
| 10 |
UInt imm5; |
| 11 |
} I5; |
| 12 |
} ARMri5; |
| 13 |
} ARMRI5; |
| 14 |
typedef enum { ARMin_Alu, ARMin_Shift } ARMInstrTag; |
| 15 |
void iregEnc(); |
| 16 |
static UInt skeletal_RI5(ARMRI5 *ri) { |
| 17 |
UInt imm5 = ri->ARMri5.I5.imm5; |
| 18 |
__builtin_expect(imm5, 1) ?: vex_assert_fail(); |
| 19 |
iregEnc(ri->ARMri5); |
| 20 |
return skeletal_RI5_instr; |
| 21 |
} |
| 22 |
ARMInstrTag emit_ARMInstr_i_0; |
| 23 |
void *emit_ARMInstr_disp_cp_chain_me_to_slowEP() { |
| 24 |
switch (emit_ARMInstr_i_0) { |
| 25 |
case ARMin_Alu: |
| 26 |
UInt instr, subopc; |
| 27 |
UInt rD, rN; |
| 28 |
goto bad; |
| 29 |
instr |= subopc | rN; |
| 30 |
case ARMin_Shift: |
| 31 |
rD = 0; |
| 32 |
UInt rM = 0; |
| 33 |
ARMRI5 argR; |
| 34 |
instr = skeletal_RI5(&argR); |
| 35 |
instr |= rD | rM; |
| 36 |
goto done; |
| 37 |
} |
| 38 |
bad: |
| 39 |
done: |
| 40 |
return 0; |
| 41 |
} |