target-mips: fix multiple TCG registers covering same data
Avoid to allocate different TCG registers for the FPU registers that are mapped on the MSA vectore registers. Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
This commit is contained in:
parent
342368aff7
commit
cb269f273f
@ -19284,15 +19284,13 @@ void mips_tcg_init(void)
|
|||||||
offsetof(CPUMIPSState, active_tc.gpr[i]),
|
offsetof(CPUMIPSState, active_tc.gpr[i]),
|
||||||
regnames[i]);
|
regnames[i]);
|
||||||
|
|
||||||
for (i = 0; i < 32; i++) {
|
|
||||||
int off = offsetof(CPUMIPSState, active_fpu.fpr[i]);
|
|
||||||
fpu_f64[i] = tcg_global_mem_new_i64(TCG_AREG0, off, fregnames[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]);
|
int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]);
|
||||||
msa_wr_d[i * 2] =
|
msa_wr_d[i * 2] =
|
||||||
tcg_global_mem_new_i64(TCG_AREG0, off, msaregnames[i * 2]);
|
tcg_global_mem_new_i64(TCG_AREG0, off, msaregnames[i * 2]);
|
||||||
|
/* The scalar floating-point unit (FPU) registers are mapped on
|
||||||
|
* the MSA vector registers. */
|
||||||
|
fpu_f64[i] = msa_wr_d[i * 2];
|
||||||
off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[1]);
|
off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[1]);
|
||||||
msa_wr_d[i * 2 + 1] =
|
msa_wr_d[i * 2 + 1] =
|
||||||
tcg_global_mem_new_i64(TCG_AREG0, off, msaregnames[i * 2 + 1]);
|
tcg_global_mem_new_i64(TCG_AREG0, off, msaregnames[i * 2 + 1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user