[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Patch] remove unused params in some TCG functions
From: |
Jun Koi |
Subject: |
[Qemu-devel] [Patch] remove unused params in some TCG functions |
Date: |
Fri, 11 Dec 2009 17:54:06 +0900 |
Hi,
Thanks to everybody helping me to have more understanding on QEmu
internals. This community is great!
This trivial patch removes some unused params in tcg_out_st() and
tcg_out_ld(). Probably this remains from dyngen time?
Thanks,
Jun
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 972b102..484f476 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -262,14 +262,14 @@ static inline void tcg_out_movi(TCGContext *s,
TCGType type,
}
}
-static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret,
+static inline void tcg_out_ld(TCGContext *s, int ret,
int arg1, tcg_target_long arg2)
{
/* movl */
tcg_out_modrm_offset(s, 0x8b, ret, arg1, arg2);
}
-static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
+static inline void tcg_out_st(TCGContext *s, int arg,
int arg1, tcg_target_long arg2)
{
/* movl */
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 3c0e296..abed1c3 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1333,7 +1333,7 @@ static void tcg_reg_free(TCGContext *s, int reg)
if (!ts->mem_coherent) {
if (!ts->mem_allocated)
temp_allocate_frame(s, temp);
- tcg_out_st(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
+ tcg_out_st(s, reg, ts->mem_reg, ts->mem_offset);
}
ts->val_type = TEMP_VAL_MEM;
s->reg_to_temp[reg] = -1;
@@ -1389,7 +1389,7 @@ static void temp_save(TCGContext *s, int temp,
TCGRegSet allocated_regs)
if (!ts->mem_allocated)
temp_allocate_frame(s, temp);
tcg_out_movi(s, ts->type, reg, ts->val);
- tcg_out_st(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
+ tcg_out_st(s, reg, ts->mem_reg, ts->mem_offset);
ts->val_type = TEMP_VAL_MEM;
break;
case TEMP_VAL_MEM:
@@ -1494,7 +1494,7 @@ static void tcg_reg_alloc_mov(TCGContext *s,
const TCGOpDef *def,
} else {
reg = tcg_reg_alloc(s, arg_ct->u.regs, s->reserved_regs);
}
- tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
+ tcg_out_ld(s, reg, ts->mem_reg, ts->mem_offset);
} else if (ts->val_type == TEMP_VAL_CONST) {
if (ots->fixed_reg) {
reg = ots->reg;
@@ -1546,7 +1546,7 @@ static void tcg_reg_alloc_op(TCGContext *s,
ts = &s->temps[arg];
if (ts->val_type == TEMP_VAL_MEM) {
reg = tcg_reg_alloc(s, arg_ct->u.regs, allocated_regs);
- tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
+ tcg_out_ld(s, reg, ts->mem_reg, ts->mem_offset);
ts->val_type = TEMP_VAL_REG;
ts->reg = reg;
ts->mem_coherent = 1;
@@ -1726,19 +1726,19 @@ static int tcg_reg_alloc_call(TCGContext *s,
const TCGOpDef *def,
if (arg != TCG_CALL_DUMMY_ARG) {
ts = &s->temps[arg];
if (ts->val_type == TEMP_VAL_REG) {
- tcg_out_st(s, ts->type, ts->reg, TCG_REG_CALL_STACK,
stack_offset);
+ tcg_out_st(s, ts->reg, TCG_REG_CALL_STACK, stack_offset);
} else if (ts->val_type == TEMP_VAL_MEM) {
reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
s->reserved_regs);
/* XXX: not correct if reading values from the stack */
- tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
- tcg_out_st(s, ts->type, reg, TCG_REG_CALL_STACK, stack_offset);
+ tcg_out_ld(s, reg, ts->mem_reg, ts->mem_offset);
+ tcg_out_st(s, reg, TCG_REG_CALL_STACK, stack_offset);
} else if (ts->val_type == TEMP_VAL_CONST) {
reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
s->reserved_regs);
/* XXX: sign extend may be needed on some targets */
tcg_out_movi(s, ts->type, reg, ts->val);
- tcg_out_st(s, ts->type, reg, TCG_REG_CALL_STACK, stack_offset);
+ tcg_out_st(s, reg, TCG_REG_CALL_STACK, stack_offset);
} else {
tcg_abort();
}
@@ -1761,7 +1761,7 @@ static int tcg_reg_alloc_call(TCGContext *s,
const TCGOpDef *def,
tcg_out_mov(s, reg, ts->reg);
}
} else if (ts->val_type == TEMP_VAL_MEM) {
- tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
+ tcg_out_ld(s, reg, ts->mem_reg, ts->mem_offset);
} else if (ts->val_type == TEMP_VAL_CONST) {
/* XXX: sign extend ? */
tcg_out_movi(s, ts->type, reg, ts->val);
@@ -1780,7 +1780,7 @@ static int tcg_reg_alloc_call(TCGContext *s,
const TCGOpDef *def,
const_func_arg = 0;
if (ts->val_type == TEMP_VAL_MEM) {
reg = tcg_reg_alloc(s, arg_ct->u.regs, allocated_regs);
- tcg_out_ld(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
+ tcg_out_ld(s, reg, ts->mem_reg, ts->mem_offset);
func_arg = reg;
tcg_regset_set_reg(allocated_regs, reg);
} else if (ts->val_type == TEMP_VAL_REG) {
- [Qemu-devel] [Patch] remove unused params in some TCG functions,
Jun Koi <=