mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-07 19:50:49 +00:00
target/mips: Introduce 32 R5900 multimedia registers
The 32 R5900 128-bit registers are split into two 64-bit halves: the lower halves are the GPRs and the upper halves are accessible by the R5900-specific multimedia instructions. Backports commit a168a796e1c251787fcdf2d9ca1e9e69cb86ffcd from qemu
This commit is contained in:
parent
3bf320249e
commit
baf2fe0fc1
|
@ -429,6 +429,9 @@ struct TCState {
|
||||||
|
|
||||||
float_status msa_fp_status;
|
float_status msa_fp_status;
|
||||||
|
|
||||||
|
/* Upper 64-bit MMRs (multimedia registers); the lower 64-bit are GPRs */
|
||||||
|
uint64_t mmr[32];
|
||||||
|
|
||||||
#define NUMBER_OF_MXU_REGISTERS 16
|
#define NUMBER_OF_MXU_REGISTERS 16
|
||||||
target_ulong mxu_gpr[NUMBER_OF_MXU_REGISTERS - 1];
|
target_ulong mxu_gpr[NUMBER_OF_MXU_REGISTERS - 1];
|
||||||
target_ulong mxu_cr;
|
target_ulong mxu_cr;
|
||||||
|
|
|
@ -30034,6 +30034,16 @@ void mips_tcg_init(struct uc_struct *uc)
|
||||||
offsetof(CPUMIPSState, active_fpu.fcr31),
|
offsetof(CPUMIPSState, active_fpu.fcr31),
|
||||||
"fcr31");
|
"fcr31");
|
||||||
|
|
||||||
|
#if defined(TARGET_MIPS64)
|
||||||
|
tcg_ctx->cpu_mmr[0] = NULL;
|
||||||
|
for (i = 1; i < 32; i++) {
|
||||||
|
tcg_ctx->cpu_mmr[i] = tcg_global_mem_new_i64(tcg_ctx, tcg_ctx->cpu_env,
|
||||||
|
offsetof(CPUMIPSState,
|
||||||
|
active_tc.mmr[i]),
|
||||||
|
regnames[i]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(TARGET_MIPS64)
|
#if !defined(TARGET_MIPS64)
|
||||||
for (i = 0; i < NUMBER_OF_MXU_REGISTERS - 1; i++) {
|
for (i = 0; i < NUMBER_OF_MXU_REGISTERS - 1; i++) {
|
||||||
tcg_ctx->mxu_gpr[i] = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
|
tcg_ctx->mxu_gpr[i] = tcg_global_mem_new(tcg_ctx, tcg_ctx->cpu_env,
|
||||||
|
|
|
@ -904,6 +904,9 @@ struct TCGContext {
|
||||||
TCGv mxu_gpr[16 - 1]; // NUMBER_OF_MXU_REGISTERS - 1
|
TCGv mxu_gpr[16 - 1]; // NUMBER_OF_MXU_REGISTERS - 1
|
||||||
TCGv mxu_CR;
|
TCGv mxu_CR;
|
||||||
|
|
||||||
|
/* Upper halves of R5900's 128-bit registers: MMRs (multimedia registers) */
|
||||||
|
TCGv_i64 cpu_mmr[32];
|
||||||
|
|
||||||
/* qemu/target-sparc/translate.c */
|
/* qemu/target-sparc/translate.c */
|
||||||
/* global register indexes */
|
/* global register indexes */
|
||||||
TCGv_ptr cpu_regwptr;
|
TCGv_ptr cpu_regwptr;
|
||||||
|
|
Loading…
Reference in a new issue