target-mips: convert single case switch into if statement

Backports commit 00fb4a118142650e7fa3d5007b197bc11fec6ea9 from qemu
This commit is contained in:
Leon Alrae 2018-02-11 17:01:48 -05:00 committed by Lioncash
parent 49cf18a8ff
commit 30e7d6e4a4
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1883,13 +1883,10 @@ static inline void gen_r6_cmp_ ## fmt(DisasContext * ctx, int n, \
int ft, int fs, int fd) \
{ \
TCGContext *tcg_ctx = ctx->uc->tcg_ctx; \
TCGv_i ## bits fp0 = tcg_temp_new_i ## bits(tcg_ctx); \
TCGv_i ## bits fp1 = tcg_temp_new_i ## bits(tcg_ctx); \
switch (ifmt) { \
default: break; \
case FMT_D: \
TCGv_i ## bits fp0 = tcg_temp_new_i ## bits(tcg_ctx); \
TCGv_i ## bits fp1 = tcg_temp_new_i ## bits(tcg_ctx); \
if (ifmt == FMT_D) { \
check_cp1_registers(ctx, fs | ft | fd); \
break; \
} \
gen_ldcmp_fpr ## bits(ctx, fp0, fs); \
gen_ldcmp_fpr ## bits(ctx, fp1, ft); \