mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
tcg: Use TCGReg for standard tcg-target entry points.
Including tcg_out_ld, tcg_out_st, tcg_out_mov, tcg_out_movi. Signed-off-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
771142c2a7
commit
2a534aff30
10 changed files with 56 additions and 52 deletions
|
@ -379,13 +379,14 @@ static inline void tcg_out_nop(TCGContext *s)
|
|||
tcg_out32(s, 0);
|
||||
}
|
||||
|
||||
static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg)
|
||||
static inline void tcg_out_mov(TCGContext *s, TCGType type,
|
||||
TCGReg ret, TCGReg arg)
|
||||
{
|
||||
tcg_out_opc_reg(s, OPC_ADDU, ret, arg, TCG_REG_ZERO);
|
||||
}
|
||||
|
||||
static inline void tcg_out_movi(TCGContext *s, TCGType type,
|
||||
int reg, int32_t arg)
|
||||
TCGReg reg, tcg_target_long arg)
|
||||
{
|
||||
if (arg == (int16_t)arg) {
|
||||
tcg_out_opc_imm(s, OPC_ADDIU, reg, TCG_REG_ZERO, arg);
|
||||
|
@ -480,14 +481,14 @@ static inline void tcg_out_ldst(TCGContext *s, int opc, int arg,
|
|||
}
|
||||
}
|
||||
|
||||
static inline void tcg_out_ld(TCGContext *s, TCGType type, int arg,
|
||||
int arg1, tcg_target_long arg2)
|
||||
static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg arg,
|
||||
TCGReg arg1, tcg_target_long arg2)
|
||||
{
|
||||
tcg_out_ldst(s, OPC_LW, arg, arg1, arg2);
|
||||
}
|
||||
|
||||
static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
|
||||
int arg1, tcg_target_long arg2)
|
||||
static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg,
|
||||
TCGReg arg1, tcg_target_long arg2)
|
||||
{
|
||||
tcg_out_ldst(s, OPC_SW, arg, arg1, arg2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue