mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 19:56:57 +00:00
target/mips: Fix some space checkpatch errors in translate.c
Remove some space-related checkpatch warning. Backports commit 235785e8347558f36be21aa99efa1ba517ecc827 from qemu
This commit is contained in:
parent
802c626145
commit
1e52cb8fa1
|
@ -2589,7 +2589,7 @@ static const char * const mxuregnames[] = {
|
|||
} while (0)
|
||||
|
||||
/* General purpose registers moves. */
|
||||
static inline void gen_load_gpr (DisasContext *s, TCGv t, int reg)
|
||||
static inline void gen_load_gpr(DisasContext *s, TCGv t, int reg)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -2599,7 +2599,7 @@ static inline void gen_load_gpr (DisasContext *s, TCGv t, int reg)
|
|||
tcg_gen_mov_tl(tcg_ctx, t, cpu_gpr[reg]);
|
||||
}
|
||||
|
||||
static inline void gen_store_gpr (DisasContext *s, TCGv t, int reg)
|
||||
static inline void gen_store_gpr(DisasContext *s, TCGv t, int reg)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -2608,7 +2608,7 @@ static inline void gen_store_gpr (DisasContext *s, TCGv t, int reg)
|
|||
}
|
||||
|
||||
/* Moves to/from shadow registers. */
|
||||
static inline void gen_load_srsgpr (DisasContext *s, int from, int to)
|
||||
static inline void gen_load_srsgpr(DisasContext *s, int from, int to)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
TCGv t0 = tcg_temp_new(tcg_ctx);
|
||||
|
@ -2634,7 +2634,7 @@ static inline void gen_load_srsgpr (DisasContext *s, int from, int to)
|
|||
tcg_temp_free(tcg_ctx, t0);
|
||||
}
|
||||
|
||||
static inline void gen_store_srsgpr (DisasContext *s, int from, int to)
|
||||
static inline void gen_store_srsgpr(DisasContext *s, int from, int to)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
if (to != 0) {
|
||||
|
@ -2842,7 +2842,8 @@ static inline int get_fp_bit (int cc)
|
|||
}
|
||||
|
||||
/* Addresses computation */
|
||||
static inline void gen_op_addr_add (DisasContext *ctx, TCGv ret, TCGv arg0, TCGv arg1)
|
||||
static inline void gen_op_addr_add(DisasContext *ctx, TCGv ret, TCGv arg0,
|
||||
TCGv arg1)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
tcg_gen_add_tl(tcg_ctx, ret, arg0, arg1);
|
||||
|
@ -3333,8 +3334,8 @@ OP_LD_ATOMIC(lld,ld64);
|
|||
#endif
|
||||
#undef OP_LD_ATOMIC
|
||||
|
||||
static void gen_base_offset_addr (DisasContext *ctx, TCGv addr,
|
||||
int base, int offset)
|
||||
static void gen_base_offset_addr(DisasContext *ctx, TCGv addr,
|
||||
int base, int offset)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -3348,7 +3349,7 @@ static void gen_base_offset_addr (DisasContext *ctx, TCGv addr,
|
|||
}
|
||||
}
|
||||
|
||||
static target_ulong pc_relative_pc (DisasContext *ctx)
|
||||
static target_ulong pc_relative_pc(DisasContext *ctx)
|
||||
{
|
||||
target_ulong pc = ctx->base.pc_next;
|
||||
|
||||
|
@ -3587,8 +3588,8 @@ static void gen_llwp(DisasContext *ctx, uint32_t base, int16_t offset,
|
|||
}
|
||||
|
||||
/* Store */
|
||||
static void gen_st (DisasContext *ctx, uint32_t opc, int rt,
|
||||
int base, int offset)
|
||||
static void gen_st(DisasContext *ctx, uint32_t opc, int rt,
|
||||
int base, int offset)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv t0 = tcg_temp_new(tcg_ctx);
|
||||
|
@ -3729,8 +3730,8 @@ static void gen_scwp(DisasContext *ctx, uint32_t base, int16_t offset,
|
|||
}
|
||||
|
||||
/* Load and store */
|
||||
static void gen_flt_ldst (DisasContext *ctx, uint32_t opc, int ft,
|
||||
TCGv t0)
|
||||
static void gen_flt_ldst(DisasContext *ctx, uint32_t opc, int ft,
|
||||
TCGv t0)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
|
||||
|
@ -5184,8 +5185,8 @@ static void gen_mul_txx9(DisasContext *ctx, uint32_t opc,
|
|||
tcg_temp_free(tcg_ctx, t1);
|
||||
}
|
||||
|
||||
static void gen_mul_vr54xx (DisasContext *ctx, uint32_t opc,
|
||||
int rd, int rs, int rt)
|
||||
static void gen_mul_vr54xx(DisasContext *ctx, uint32_t opc,
|
||||
int rd, int rs, int rt)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv t0 = tcg_temp_new(tcg_ctx);
|
||||
|
@ -5249,8 +5250,8 @@ static void gen_mul_vr54xx (DisasContext *ctx, uint32_t opc,
|
|||
tcg_temp_free(tcg_ctx, t1);
|
||||
}
|
||||
|
||||
static void gen_cl (DisasContext *ctx, uint32_t opc,
|
||||
int rd, int rs)
|
||||
static void gen_cl(DisasContext *ctx, uint32_t opc,
|
||||
int rd, int rs)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -6252,8 +6253,8 @@ static void gen_compute_branch_nm(DisasContext *ctx, uint32_t opc,
|
|||
|
||||
|
||||
/* special3 bitfield operations */
|
||||
static void gen_bitops (DisasContext *ctx, uint32_t opc, int rt,
|
||||
int rs, int lsb, int msb)
|
||||
static void gen_bitops(DisasContext *ctx, uint32_t opc, int rt,
|
||||
int rs, int lsb, int msb)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv t0 = tcg_temp_new(tcg_ctx);
|
||||
|
@ -6324,7 +6325,7 @@ fail:
|
|||
tcg_temp_free(tcg_ctx, t1);
|
||||
}
|
||||
|
||||
static void gen_bshfl (DisasContext *ctx, uint32_t op2, int rt, int rd)
|
||||
static void gen_bshfl(DisasContext *ctx, uint32_t op2, int rt, int rd)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -6577,7 +6578,7 @@ static inline void gen_mfhc0_load64(DisasContext *s, TCGv arg, target_ulong off,
|
|||
tcg_temp_free_i64(tcg_ctx, t0);
|
||||
}
|
||||
|
||||
static inline void gen_mfc0_load32 (DisasContext *ctx, TCGv arg, target_ulong off)
|
||||
static inline void gen_mfc0_load32(DisasContext *ctx, TCGv arg, target_ulong off)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv_i32 t0 = tcg_temp_new_i32(tcg_ctx);
|
||||
|
@ -6587,14 +6588,14 @@ static inline void gen_mfc0_load32 (DisasContext *ctx, TCGv arg, target_ulong of
|
|||
tcg_temp_free_i32(tcg_ctx, t0);
|
||||
}
|
||||
|
||||
static inline void gen_mfc0_load64 (DisasContext *ctx, TCGv arg, target_ulong off)
|
||||
static inline void gen_mfc0_load64(DisasContext *ctx, TCGv arg, target_ulong off)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
tcg_gen_ld_tl(tcg_ctx, arg, tcg_ctx->cpu_env, off);
|
||||
tcg_gen_ext32s_tl(tcg_ctx, arg, arg);
|
||||
}
|
||||
|
||||
static inline void gen_mtc0_store32 (DisasContext *ctx, TCGv arg, target_ulong off)
|
||||
static inline void gen_mtc0_store32(DisasContext *ctx, TCGv arg, target_ulong off)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv_i32 t0 = tcg_temp_new_i32(tcg_ctx);
|
||||
|
@ -10141,7 +10142,8 @@ die:
|
|||
generate_exception_end(ctx, EXCP_RI);
|
||||
}
|
||||
|
||||
static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt, int rd)
|
||||
static void gen_cp0(CPUMIPSState *env, DisasContext *ctx, uint32_t opc,
|
||||
int rt, int rd)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -10533,22 +10535,22 @@ enum fopcode {
|
|||
OPC_CVT_W_S = FOP(36, FMT_S),
|
||||
OPC_CVT_L_S = FOP(37, FMT_S),
|
||||
OPC_CVT_PS_S = FOP(38, FMT_S),
|
||||
OPC_CMP_F_S = FOP (48, FMT_S),
|
||||
OPC_CMP_UN_S = FOP (49, FMT_S),
|
||||
OPC_CMP_EQ_S = FOP (50, FMT_S),
|
||||
OPC_CMP_UEQ_S = FOP (51, FMT_S),
|
||||
OPC_CMP_OLT_S = FOP (52, FMT_S),
|
||||
OPC_CMP_ULT_S = FOP (53, FMT_S),
|
||||
OPC_CMP_OLE_S = FOP (54, FMT_S),
|
||||
OPC_CMP_ULE_S = FOP (55, FMT_S),
|
||||
OPC_CMP_SF_S = FOP (56, FMT_S),
|
||||
OPC_CMP_NGLE_S = FOP (57, FMT_S),
|
||||
OPC_CMP_SEQ_S = FOP (58, FMT_S),
|
||||
OPC_CMP_NGL_S = FOP (59, FMT_S),
|
||||
OPC_CMP_LT_S = FOP (60, FMT_S),
|
||||
OPC_CMP_NGE_S = FOP (61, FMT_S),
|
||||
OPC_CMP_LE_S = FOP (62, FMT_S),
|
||||
OPC_CMP_NGT_S = FOP (63, FMT_S),
|
||||
OPC_CMP_F_S = FOP(48, FMT_S),
|
||||
OPC_CMP_UN_S = FOP(49, FMT_S),
|
||||
OPC_CMP_EQ_S = FOP(50, FMT_S),
|
||||
OPC_CMP_UEQ_S = FOP(51, FMT_S),
|
||||
OPC_CMP_OLT_S = FOP(52, FMT_S),
|
||||
OPC_CMP_ULT_S = FOP(53, FMT_S),
|
||||
OPC_CMP_OLE_S = FOP(54, FMT_S),
|
||||
OPC_CMP_ULE_S = FOP(55, FMT_S),
|
||||
OPC_CMP_SF_S = FOP(56, FMT_S),
|
||||
OPC_CMP_NGLE_S = FOP(57, FMT_S),
|
||||
OPC_CMP_SEQ_S = FOP(58, FMT_S),
|
||||
OPC_CMP_NGL_S = FOP(59, FMT_S),
|
||||
OPC_CMP_LT_S = FOP(60, FMT_S),
|
||||
OPC_CMP_NGE_S = FOP(61, FMT_S),
|
||||
OPC_CMP_LE_S = FOP(62, FMT_S),
|
||||
OPC_CMP_NGT_S = FOP(63, FMT_S),
|
||||
|
||||
OPC_ADD_D = FOP(0, FMT_D),
|
||||
OPC_SUB_D = FOP(1, FMT_D),
|
||||
|
@ -10589,22 +10591,22 @@ enum fopcode {
|
|||
OPC_CVT_S_D = FOP(32, FMT_D),
|
||||
OPC_CVT_W_D = FOP(36, FMT_D),
|
||||
OPC_CVT_L_D = FOP(37, FMT_D),
|
||||
OPC_CMP_F_D = FOP (48, FMT_D),
|
||||
OPC_CMP_UN_D = FOP (49, FMT_D),
|
||||
OPC_CMP_EQ_D = FOP (50, FMT_D),
|
||||
OPC_CMP_UEQ_D = FOP (51, FMT_D),
|
||||
OPC_CMP_OLT_D = FOP (52, FMT_D),
|
||||
OPC_CMP_ULT_D = FOP (53, FMT_D),
|
||||
OPC_CMP_OLE_D = FOP (54, FMT_D),
|
||||
OPC_CMP_ULE_D = FOP (55, FMT_D),
|
||||
OPC_CMP_SF_D = FOP (56, FMT_D),
|
||||
OPC_CMP_NGLE_D = FOP (57, FMT_D),
|
||||
OPC_CMP_SEQ_D = FOP (58, FMT_D),
|
||||
OPC_CMP_NGL_D = FOP (59, FMT_D),
|
||||
OPC_CMP_LT_D = FOP (60, FMT_D),
|
||||
OPC_CMP_NGE_D = FOP (61, FMT_D),
|
||||
OPC_CMP_LE_D = FOP (62, FMT_D),
|
||||
OPC_CMP_NGT_D = FOP (63, FMT_D),
|
||||
OPC_CMP_F_D = FOP(48, FMT_D),
|
||||
OPC_CMP_UN_D = FOP(49, FMT_D),
|
||||
OPC_CMP_EQ_D = FOP(50, FMT_D),
|
||||
OPC_CMP_UEQ_D = FOP(51, FMT_D),
|
||||
OPC_CMP_OLT_D = FOP(52, FMT_D),
|
||||
OPC_CMP_ULT_D = FOP(53, FMT_D),
|
||||
OPC_CMP_OLE_D = FOP(54, FMT_D),
|
||||
OPC_CMP_ULE_D = FOP(55, FMT_D),
|
||||
OPC_CMP_SF_D = FOP(56, FMT_D),
|
||||
OPC_CMP_NGLE_D = FOP(57, FMT_D),
|
||||
OPC_CMP_SEQ_D = FOP(58, FMT_D),
|
||||
OPC_CMP_NGL_D = FOP(59, FMT_D),
|
||||
OPC_CMP_LT_D = FOP(60, FMT_D),
|
||||
OPC_CMP_NGE_D = FOP(61, FMT_D),
|
||||
OPC_CMP_LE_D = FOP(62, FMT_D),
|
||||
OPC_CMP_NGT_D = FOP(63, FMT_D),
|
||||
|
||||
OPC_CVT_S_W = FOP(32, FMT_W),
|
||||
OPC_CVT_D_W = FOP(33, FMT_W),
|
||||
|
@ -10636,22 +10638,22 @@ enum fopcode {
|
|||
OPC_PLU_PS = FOP(45, FMT_PS),
|
||||
OPC_PUL_PS = FOP(46, FMT_PS),
|
||||
OPC_PUU_PS = FOP(47, FMT_PS),
|
||||
OPC_CMP_F_PS = FOP (48, FMT_PS),
|
||||
OPC_CMP_UN_PS = FOP (49, FMT_PS),
|
||||
OPC_CMP_EQ_PS = FOP (50, FMT_PS),
|
||||
OPC_CMP_UEQ_PS = FOP (51, FMT_PS),
|
||||
OPC_CMP_OLT_PS = FOP (52, FMT_PS),
|
||||
OPC_CMP_ULT_PS = FOP (53, FMT_PS),
|
||||
OPC_CMP_OLE_PS = FOP (54, FMT_PS),
|
||||
OPC_CMP_ULE_PS = FOP (55, FMT_PS),
|
||||
OPC_CMP_SF_PS = FOP (56, FMT_PS),
|
||||
OPC_CMP_NGLE_PS = FOP (57, FMT_PS),
|
||||
OPC_CMP_SEQ_PS = FOP (58, FMT_PS),
|
||||
OPC_CMP_NGL_PS = FOP (59, FMT_PS),
|
||||
OPC_CMP_LT_PS = FOP (60, FMT_PS),
|
||||
OPC_CMP_NGE_PS = FOP (61, FMT_PS),
|
||||
OPC_CMP_LE_PS = FOP (62, FMT_PS),
|
||||
OPC_CMP_NGT_PS = FOP (63, FMT_PS),
|
||||
OPC_CMP_F_PS = FOP(48, FMT_PS),
|
||||
OPC_CMP_UN_PS = FOP(49, FMT_PS),
|
||||
OPC_CMP_EQ_PS = FOP(50, FMT_PS),
|
||||
OPC_CMP_UEQ_PS = FOP(51, FMT_PS),
|
||||
OPC_CMP_OLT_PS = FOP(52, FMT_PS),
|
||||
OPC_CMP_ULT_PS = FOP(53, FMT_PS),
|
||||
OPC_CMP_OLE_PS = FOP(54, FMT_PS),
|
||||
OPC_CMP_ULE_PS = FOP(55, FMT_PS),
|
||||
OPC_CMP_SF_PS = FOP(56, FMT_PS),
|
||||
OPC_CMP_NGLE_PS = FOP(57, FMT_PS),
|
||||
OPC_CMP_SEQ_PS = FOP(58, FMT_PS),
|
||||
OPC_CMP_NGL_PS = FOP(59, FMT_PS),
|
||||
OPC_CMP_LT_PS = FOP(60, FMT_PS),
|
||||
OPC_CMP_NGE_PS = FOP(61, FMT_PS),
|
||||
OPC_CMP_LE_PS = FOP(62, FMT_PS),
|
||||
OPC_CMP_NGT_PS = FOP(63, FMT_PS),
|
||||
};
|
||||
|
||||
enum r6_f_cmp_op {
|
||||
|
@ -10701,7 +10703,8 @@ enum r6_f_cmp_op {
|
|||
R6_OPC_CMP_SUNE_D = FOP(26, FMT_L),
|
||||
R6_OPC_CMP_SNE_D = FOP(27, FMT_L),
|
||||
};
|
||||
static void gen_cp1 (DisasContext *ctx, uint32_t opc, int rt, int fs)
|
||||
|
||||
static void gen_cp1(DisasContext *ctx, uint32_t opc, int rt, int fs)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv t0 = tcg_temp_new(tcg_ctx);
|
||||
|
@ -10783,7 +10786,7 @@ static void gen_cp1 (DisasContext *ctx, uint32_t opc, int rt, int fs)
|
|||
tcg_temp_free(tcg_ctx, t0);
|
||||
}
|
||||
|
||||
static void gen_movci (DisasContext *ctx, int rd, int rs, int cc, int tf)
|
||||
static void gen_movci(DisasContext *ctx, int rd, int rs, int cc, int tf)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -10835,7 +10838,8 @@ static inline void gen_movcf_s(DisasContext *ctx, int fs, int fd, int cc,
|
|||
tcg_temp_free_i32(tcg_ctx, t0);
|
||||
}
|
||||
|
||||
static inline void gen_movcf_d (DisasContext *ctx, int fs, int fd, int cc, int tf)
|
||||
static inline void gen_movcf_d(DisasContext *ctx, int fs, int fd, int cc,
|
||||
int tf)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
int cond;
|
||||
|
@ -10962,8 +10966,8 @@ static void gen_sel_d(DisasContext *ctx, enum fopcode op1, int fd, int ft,
|
|||
tcg_temp_free_i64(tcg_ctx, t1);
|
||||
}
|
||||
|
||||
static void gen_farith (DisasContext *ctx, enum fopcode op1,
|
||||
int ft, int fs, int fd, int cc)
|
||||
static void gen_farith(DisasContext *ctx, enum fopcode op1,
|
||||
int ft, int fs, int fd, int cc)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
|
||||
|
@ -12393,8 +12397,8 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1,
|
|||
}
|
||||
|
||||
/* Coprocessor 3 (FPU) */
|
||||
static void gen_flt3_ldst (DisasContext *ctx, uint32_t opc,
|
||||
int fd, int fs, int base, int index)
|
||||
static void gen_flt3_ldst(DisasContext *ctx, uint32_t opc,
|
||||
int fd, int fs, int base, int index)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -12475,8 +12479,8 @@ static void gen_flt3_ldst (DisasContext *ctx, uint32_t opc,
|
|||
tcg_temp_free(tcg_ctx, t0);
|
||||
}
|
||||
|
||||
static void gen_flt3_arith (DisasContext *ctx, uint32_t opc,
|
||||
int fd, int fr, int fs, int ft)
|
||||
static void gen_flt3_arith(DisasContext *ctx, uint32_t opc,
|
||||
int fd, int fr, int fs, int ft)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
|
||||
|
@ -13250,17 +13254,17 @@ enum {
|
|||
RR_RY_CNVT_SEW = 0x6,
|
||||
};
|
||||
|
||||
static int xlat (int r)
|
||||
static int xlat(int r)
|
||||
{
|
||||
static int map[] = { 16, 17, 2, 3, 4, 5, 6, 7 };
|
||||
|
||||
return map[r];
|
||||
}
|
||||
|
||||
static void gen_mips16_save (DisasContext *ctx,
|
||||
int xsregs, int aregs,
|
||||
int do_ra, int do_s0, int do_s1,
|
||||
int framesize)
|
||||
static void gen_mips16_save(DisasContext *ctx,
|
||||
int xsregs, int aregs,
|
||||
int do_ra, int do_s0, int do_s1,
|
||||
int framesize)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -13416,10 +13420,10 @@ static void gen_mips16_save (DisasContext *ctx,
|
|||
tcg_temp_free(tcg_ctx, t2);
|
||||
}
|
||||
|
||||
static void gen_mips16_restore (DisasContext *ctx,
|
||||
int xsregs, int aregs,
|
||||
int do_ra, int do_s0, int do_s1,
|
||||
int framesize)
|
||||
static void gen_mips16_restore(DisasContext *ctx,
|
||||
int xsregs, int aregs,
|
||||
int do_ra, int do_s0, int do_s1,
|
||||
int framesize)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -13524,8 +13528,8 @@ static void gen_mips16_restore (DisasContext *ctx,
|
|||
tcg_temp_free(tcg_ctx, t2);
|
||||
}
|
||||
|
||||
static void gen_addiupc (DisasContext *ctx, int rx, int imm,
|
||||
int is_64_bit, int extended)
|
||||
static void gen_addiupc(DisasContext *ctx, int rx, int imm,
|
||||
int is_64_bit, int extended)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -13558,9 +13562,9 @@ static void gen_cache_operation(DisasContext *ctx, uint32_t op, int base,
|
|||
}
|
||||
|
||||
#if defined(TARGET_MIPS64)
|
||||
static void decode_i64_mips16 (DisasContext *ctx,
|
||||
int ry, int funct, int16_t offset,
|
||||
int extended)
|
||||
static void decode_i64_mips16(DisasContext *ctx,
|
||||
int ry, int funct, int16_t offset,
|
||||
int extended)
|
||||
{
|
||||
switch (funct) {
|
||||
case I64_LDSP:
|
||||
|
@ -13619,7 +13623,7 @@ static void decode_i64_mips16 (DisasContext *ctx,
|
|||
}
|
||||
#endif
|
||||
|
||||
static int decode_extended_mips16_opc (CPUMIPSState *env, DisasContext *ctx)
|
||||
static int decode_extended_mips16_opc(CPUMIPSState *env, DisasContext *ctx)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -13818,7 +13822,7 @@ static int decode_extended_mips16_opc (CPUMIPSState *env, DisasContext *ctx)
|
|||
return 4;
|
||||
}
|
||||
|
||||
static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_need_patch)
|
||||
static int decode_mips16_opc(CPUMIPSState *env, DisasContext *ctx, bool *insn_need_patch)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -14051,7 +14055,7 @@ static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_n
|
|||
case M16_OPC_LWPC:
|
||||
gen_ld(ctx, OPC_LWPC, rx, 0, ((uint8_t)ctx->opcode) << 2);
|
||||
break;
|
||||
#if defined (TARGET_MIPS64)
|
||||
#if defined(TARGET_MIPS64)
|
||||
case M16_OPC_LWU:
|
||||
check_insn(ctx, ISA_MIPS3);
|
||||
check_mips_64(ctx);
|
||||
|
@ -14151,7 +14155,7 @@ static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_n
|
|||
case RR_SRAV:
|
||||
gen_shift(ctx, OPC_SRAV, ry, rx, ry);
|
||||
break;
|
||||
#if defined (TARGET_MIPS64)
|
||||
#if defined(TARGET_MIPS64)
|
||||
case RR_DSRL:
|
||||
check_insn(ctx, ISA_MIPS3);
|
||||
check_mips_64(ctx);
|
||||
|
@ -14194,7 +14198,7 @@ static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_n
|
|||
case RR_RY_CNVT_SEH:
|
||||
tcg_gen_ext16s_tl(tcg_ctx, cpu_gpr[rx], cpu_gpr[rx]);
|
||||
break;
|
||||
#if defined (TARGET_MIPS64)
|
||||
#if defined(TARGET_MIPS64)
|
||||
case RR_RY_CNVT_ZEW:
|
||||
check_insn(ctx, ISA_MIPS64);
|
||||
check_mips_64(ctx);
|
||||
|
@ -14214,7 +14218,7 @@ static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_n
|
|||
case RR_MFLO:
|
||||
gen_HILO(ctx, OPC_MFLO, 0, rx);
|
||||
break;
|
||||
#if defined (TARGET_MIPS64)
|
||||
#if defined(TARGET_MIPS64)
|
||||
case RR_DSRA:
|
||||
check_insn(ctx, ISA_MIPS3);
|
||||
check_mips_64(ctx);
|
||||
|
@ -14248,7 +14252,7 @@ static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_n
|
|||
case RR_DIVU:
|
||||
gen_muldiv(ctx, OPC_DIVU, 0, rx, ry);
|
||||
break;
|
||||
#if defined (TARGET_MIPS64)
|
||||
#if defined(TARGET_MIPS64)
|
||||
case RR_DMULT:
|
||||
check_insn(ctx, ISA_MIPS3);
|
||||
check_mips_64(ctx);
|
||||
|
@ -14892,7 +14896,7 @@ enum {
|
|||
ADDIUR1SP = 0x1
|
||||
};
|
||||
|
||||
static int mmreg (int r)
|
||||
static int mmreg(int r)
|
||||
{
|
||||
static const int map[] = { 16, 17, 2, 3, 4, 5, 6, 7 };
|
||||
|
||||
|
@ -14900,7 +14904,7 @@ static int mmreg (int r)
|
|||
}
|
||||
|
||||
/* Used for 16-bit store instructions. */
|
||||
static int mmreg2 (int r)
|
||||
static int mmreg2(int r)
|
||||
{
|
||||
static const int map[] = { 0, 17, 2, 3, 4, 5, 6, 7 };
|
||||
|
||||
|
@ -14975,8 +14979,8 @@ static void gen_andi16(DisasContext *ctx)
|
|||
gen_logic_imm(ctx, OPC_ANDI, rd, rs, decoded_imm[encoded]);
|
||||
}
|
||||
|
||||
static void gen_ldst_multiple (DisasContext *ctx, uint32_t opc, int reglist,
|
||||
int base, int16_t offset)
|
||||
static void gen_ldst_multiple(DisasContext *ctx, uint32_t opc, int reglist,
|
||||
int base, int16_t offset)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv t0, t1;
|
||||
|
@ -15249,7 +15253,7 @@ static void gen_pool16c_r6_insn(DisasContext *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
static void gen_ldxs (DisasContext *ctx, int base, int index, int rd)
|
||||
static void gen_ldxs(DisasContext *ctx, int base, int index, int rd)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv t0 = tcg_temp_new(tcg_ctx);
|
||||
|
@ -15270,8 +15274,8 @@ static void gen_ldxs (DisasContext *ctx, int base, int index, int rd)
|
|||
tcg_temp_free(tcg_ctx, t1);
|
||||
}
|
||||
|
||||
static void gen_ldst_pair (DisasContext *ctx, uint32_t opc, int rd,
|
||||
int base, int16_t offset)
|
||||
static void gen_ldst_pair(DisasContext *ctx, uint32_t opc, int rd,
|
||||
int base, int16_t offset)
|
||||
{
|
||||
TCGContext *tcg_ctx = ctx->uc->tcg_ctx;
|
||||
TCGv t0, t1;
|
||||
|
@ -15297,14 +15301,14 @@ static void gen_ldst_pair (DisasContext *ctx, uint32_t opc, int rd,
|
|||
tcg_gen_movi_tl(tcg_ctx, t1, 4);
|
||||
gen_op_addr_add(ctx, t0, t0, t1);
|
||||
tcg_gen_qemu_ld_tl(ctx->uc, t1, t0, ctx->mem_idx, MO_TESL);
|
||||
gen_store_gpr(ctx, t1, rd+1);
|
||||
gen_store_gpr(ctx, t1, rd + 1);
|
||||
break;
|
||||
case SWP:
|
||||
gen_load_gpr(ctx, t1, rd);
|
||||
tcg_gen_qemu_st_tl(ctx->uc, t1, t0, ctx->mem_idx, MO_TEUL);
|
||||
tcg_gen_movi_tl(tcg_ctx, t1, 4);
|
||||
gen_op_addr_add(ctx, t0, t0, t1);
|
||||
gen_load_gpr(ctx, t1, rd+1);
|
||||
gen_load_gpr(ctx, t1, rd + 1);
|
||||
tcg_gen_qemu_st_tl(ctx->uc, t1, t0, ctx->mem_idx, MO_TEUL);
|
||||
break;
|
||||
#ifdef TARGET_MIPS64
|
||||
|
@ -15318,14 +15322,14 @@ static void gen_ldst_pair (DisasContext *ctx, uint32_t opc, int rd,
|
|||
tcg_gen_movi_tl(tcg_ctx, t1, 8);
|
||||
gen_op_addr_add(ctx, t0, t0, t1);
|
||||
tcg_gen_qemu_ld_tl(ctx->uc, t1, t0, ctx->mem_idx, MO_TEQ);
|
||||
gen_store_gpr(ctx, t1, rd+1);
|
||||
gen_store_gpr(ctx, t1, rd + 1);
|
||||
break;
|
||||
case SDP:
|
||||
gen_load_gpr(ctx, t1, rd);
|
||||
tcg_gen_qemu_st_tl(ctx->uc, t1, t0, ctx->mem_idx, MO_TEQ);
|
||||
tcg_gen_movi_tl(tcg_ctx, t1, 8);
|
||||
gen_op_addr_add(ctx, t0, t0, t1);
|
||||
gen_load_gpr(ctx, t1, rd+1);
|
||||
gen_load_gpr(ctx, t1, rd + 1);
|
||||
tcg_gen_qemu_st_tl(ctx->uc, t1, t0, ctx->mem_idx, MO_TEQ);
|
||||
break;
|
||||
#endif
|
||||
|
@ -15363,7 +15367,7 @@ static void gen_sync(DisasContext *ctx, int stype)
|
|||
tcg_gen_mb(tcg_ctx, tcg_mo);
|
||||
}
|
||||
|
||||
static void gen_pool32axf (CPUMIPSState *env, DisasContext *ctx, int rt, int rs)
|
||||
static void gen_pool32axf(CPUMIPSState *env, DisasContext *ctx, int rt, int rs)
|
||||
{
|
||||
TCGContext *tcg_ctx = env->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -17325,7 +17329,7 @@ static void decode_micromips32_opc(CPUMIPSState *env, DisasContext *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
static int decode_micromips_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_need_patch)
|
||||
static int decode_micromips_opc(CPUMIPSState *env, DisasContext *ctx, bool *insn_need_patch)
|
||||
{
|
||||
TCGContext *tcg_ctx = env->uc->tcg_ctx;
|
||||
TCGv *cpu_gpr = tcg_ctx->cpu_gpr;
|
||||
|
@ -28030,11 +28034,11 @@ static void gen_check_zero_element(CPUMIPSState *env, TCGv tresult, uint8_t df,
|
|||
eval_big = 0x8000000000000000ULL;
|
||||
break;
|
||||
}
|
||||
tcg_gen_subi_i64(tcg_ctx, t0, tcg_ctx->msa_wr_d[wt<<1], eval_zero_or_big);
|
||||
tcg_gen_andc_i64(tcg_ctx, t0, t0, tcg_ctx->msa_wr_d[wt<<1]);
|
||||
tcg_gen_subi_i64(tcg_ctx, t0, tcg_ctx->msa_wr_d[wt << 1], eval_zero_or_big);
|
||||
tcg_gen_andc_i64(tcg_ctx, t0, t0, tcg_ctx->msa_wr_d[wt << 1]);
|
||||
tcg_gen_andi_i64(tcg_ctx, t0, t0, eval_big);
|
||||
tcg_gen_subi_i64(tcg_ctx, t1, tcg_ctx->msa_wr_d[(wt<<1)+1], eval_zero_or_big);
|
||||
tcg_gen_andc_i64(tcg_ctx, t1, t1, tcg_ctx->msa_wr_d[(wt<<1)+1]);
|
||||
tcg_gen_subi_i64(tcg_ctx, t1, tcg_ctx->msa_wr_d[(wt << 1) + 1], eval_zero_or_big);
|
||||
tcg_gen_andc_i64(tcg_ctx, t1, t1, tcg_ctx->msa_wr_d[(wt << 1) + 1]);
|
||||
tcg_gen_andi_i64(tcg_ctx, t1, t1, eval_big);
|
||||
tcg_gen_or_i64(tcg_ctx, t0, t0, t1);
|
||||
/* if all bits are zero then all elements are not zero */
|
||||
|
@ -28063,7 +28067,7 @@ static void gen_msa_branch(CPUMIPSState *env, DisasContext *ctx, uint32_t op1)
|
|||
case OPC_BNZ_V:
|
||||
{
|
||||
TCGv_i64 t0 = tcg_temp_new_i64(tcg_ctx);
|
||||
tcg_gen_or_i64(tcg_ctx, t0, tcg_ctx->msa_wr_d[wt<<1], tcg_ctx->msa_wr_d[(wt<<1)+1]);
|
||||
tcg_gen_or_i64(tcg_ctx, t0, tcg_ctx->msa_wr_d[wt << 1], tcg_ctx->msa_wr_d[(wt << 1) + 1]);
|
||||
tcg_gen_setcondi_i64(tcg_ctx, (op1 == OPC_BZ_V) ?
|
||||
TCG_COND_EQ : TCG_COND_NE, t0, t0, 0);
|
||||
tcg_gen_trunc_i64_tl(tcg_ctx, tcg_ctx->bcond, t0);
|
||||
|
|
Loading…
Reference in a new issue