tcg/sparc: Drop inline markers

Let the compiler decide about inlining.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2021-08-05 01:09:41 +03:00
parent 3d1e8ed011
commit 897fd616fd
1 changed files with 22 additions and 23 deletions

View File

@ -294,12 +294,12 @@ static const int tcg_target_call_oarg_regs[] = {
bool use_vis3_instructions; bool use_vis3_instructions;
#endif #endif
static inline int check_fit_i64(int64_t val, unsigned int bits) static bool check_fit_i64(int64_t val, unsigned int bits)
{ {
return val == sextract64(val, 0, bits); return val == sextract64(val, 0, bits);
} }
static inline int check_fit_i32(int32_t val, unsigned int bits) static bool check_fit_i32(int32_t val, unsigned int bits)
{ {
return val == sextract32(val, 0, bits); return val == sextract32(val, 0, bits);
} }
@ -362,14 +362,14 @@ static bool tcg_target_const_match(int64_t val, TCGType type, int ct)
} }
} }
static inline void tcg_out_arith(TCGContext *s, TCGReg rd, TCGReg rs1, static void tcg_out_arith(TCGContext *s, TCGReg rd, TCGReg rs1,
TCGReg rs2, int op) TCGReg rs2, int op)
{ {
tcg_out32(s, op | INSN_RD(rd) | INSN_RS1(rs1) | INSN_RS2(rs2)); tcg_out32(s, op | INSN_RD(rd) | INSN_RS1(rs1) | INSN_RS2(rs2));
} }
static inline void tcg_out_arithi(TCGContext *s, TCGReg rd, TCGReg rs1, static void tcg_out_arithi(TCGContext *s, TCGReg rd, TCGReg rs1,
int32_t offset, int op) int32_t offset, int op)
{ {
tcg_out32(s, op | INSN_RD(rd) | INSN_RS1(rs1) | INSN_IMM13(offset)); tcg_out32(s, op | INSN_RD(rd) | INSN_RS1(rs1) | INSN_IMM13(offset));
} }
@ -381,8 +381,7 @@ static void tcg_out_arithc(TCGContext *s, TCGReg rd, TCGReg rs1,
| (val2const ? INSN_IMM13(val2) : INSN_RS2(val2))); | (val2const ? INSN_IMM13(val2) : INSN_RS2(val2)));
} }
static inline bool tcg_out_mov(TCGContext *s, TCGType type, static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)
TCGReg ret, TCGReg arg)
{ {
if (ret != arg) { if (ret != arg) {
tcg_out_arith(s, ret, arg, TCG_REG_G0, ARITH_OR); tcg_out_arith(s, ret, arg, TCG_REG_G0, ARITH_OR);
@ -390,12 +389,12 @@ static inline bool tcg_out_mov(TCGContext *s, TCGType type,
return true; return true;
} }
static inline void tcg_out_sethi(TCGContext *s, TCGReg ret, uint32_t arg) static void tcg_out_sethi(TCGContext *s, TCGReg ret, uint32_t arg)
{ {
tcg_out32(s, SETHI | INSN_RD(ret) | ((arg & 0xfffffc00) >> 10)); tcg_out32(s, SETHI | INSN_RD(ret) | ((arg & 0xfffffc00) >> 10));
} }
static inline void tcg_out_movi_imm13(TCGContext *s, TCGReg ret, int32_t arg) static void tcg_out_movi_imm13(TCGContext *s, TCGReg ret, int32_t arg)
{ {
tcg_out_arithi(s, ret, TCG_REG_G0, arg, ARITH_OR); tcg_out_arithi(s, ret, TCG_REG_G0, arg, ARITH_OR);
} }
@ -470,14 +469,14 @@ static void tcg_out_movi_int(TCGContext *s, TCGType type, TCGReg ret,
} }
} }
static inline void tcg_out_movi(TCGContext *s, TCGType type, static void tcg_out_movi(TCGContext *s, TCGType type,
TCGReg ret, tcg_target_long arg) TCGReg ret, tcg_target_long arg)
{ {
tcg_out_movi_int(s, type, ret, arg, false); tcg_out_movi_int(s, type, ret, arg, false);
} }
static inline void tcg_out_ldst_rr(TCGContext *s, TCGReg data, TCGReg a1, static void tcg_out_ldst_rr(TCGContext *s, TCGReg data, TCGReg a1,
TCGReg a2, int op) TCGReg a2, int op)
{ {
tcg_out32(s, op | INSN_RD(data) | INSN_RS1(a1) | INSN_RS2(a2)); tcg_out32(s, op | INSN_RD(data) | INSN_RS1(a1) | INSN_RS2(a2));
} }
@ -494,20 +493,20 @@ static void tcg_out_ldst(TCGContext *s, TCGReg ret, TCGReg addr,
} }
} }
static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret,
TCGReg arg1, intptr_t arg2) TCGReg arg1, intptr_t arg2)
{ {
tcg_out_ldst(s, ret, arg1, arg2, (type == TCG_TYPE_I32 ? LDUW : LDX)); tcg_out_ldst(s, ret, arg1, arg2, (type == TCG_TYPE_I32 ? LDUW : LDX));
} }
static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg,
TCGReg arg1, intptr_t arg2) TCGReg arg1, intptr_t arg2)
{ {
tcg_out_ldst(s, arg, arg1, arg2, (type == TCG_TYPE_I32 ? STW : STX)); tcg_out_ldst(s, arg, arg1, arg2, (type == TCG_TYPE_I32 ? STW : STX));
} }
static inline bool tcg_out_sti(TCGContext *s, TCGType type, TCGArg val, static bool tcg_out_sti(TCGContext *s, TCGType type, TCGArg val,
TCGReg base, intptr_t ofs) TCGReg base, intptr_t ofs)
{ {
if (val == 0) { if (val == 0) {
tcg_out_st(s, type, TCG_REG_G0, base, ofs); tcg_out_st(s, type, TCG_REG_G0, base, ofs);
@ -527,12 +526,12 @@ static void tcg_out_ld_ptr(TCGContext *s, TCGReg ret, const void *arg)
tcg_out_ld(s, TCG_TYPE_PTR, ret, ret, (uintptr_t)arg & 0x3ff); tcg_out_ld(s, TCG_TYPE_PTR, ret, ret, (uintptr_t)arg & 0x3ff);
} }
static inline void tcg_out_sety(TCGContext *s, TCGReg rs) static void tcg_out_sety(TCGContext *s, TCGReg rs)
{ {
tcg_out32(s, WRY | INSN_RS1(TCG_REG_G0) | INSN_RS2(rs)); tcg_out32(s, WRY | INSN_RS1(TCG_REG_G0) | INSN_RS2(rs));
} }
static inline void tcg_out_rdy(TCGContext *s, TCGReg rd) static void tcg_out_rdy(TCGContext *s, TCGReg rd)
{ {
tcg_out32(s, RDY | INSN_RD(rd)); tcg_out32(s, RDY | INSN_RD(rd));
} }
@ -552,7 +551,7 @@ static void tcg_out_div32(TCGContext *s, TCGReg rd, TCGReg rs1,
uns ? ARITH_UDIV : ARITH_SDIV); uns ? ARITH_UDIV : ARITH_SDIV);
} }
static inline void tcg_out_nop(TCGContext *s) static void tcg_out_nop(TCGContext *s)
{ {
tcg_out32(s, NOP); tcg_out32(s, NOP);
} }