mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
target/riscv: Pass ra to riscv_csrrw_i128
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250425152311.804338-6-richard.henderson@linaro.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
f1304836ea
commit
9ef792a78d
3 changed files with 11 additions and 10 deletions
|
@ -848,8 +848,8 @@ typedef RISCVException (*riscv_csr_op_fn)(CPURISCVState *env, int csrno,
|
|||
RISCVException riscv_csrr_i128(CPURISCVState *env, int csrno,
|
||||
Int128 *ret_value);
|
||||
RISCVException riscv_csrrw_i128(CPURISCVState *env, int csrno,
|
||||
Int128 *ret_value,
|
||||
Int128 new_value, Int128 write_mask);
|
||||
Int128 *ret_value, Int128 new_value,
|
||||
Int128 write_mask, uintptr_t ra);
|
||||
|
||||
typedef RISCVException (*riscv_csr_read128_fn)(CPURISCVState *env, int csrno,
|
||||
Int128 *ret_value);
|
||||
|
|
|
@ -5656,8 +5656,8 @@ RISCVException riscv_csrr_i128(CPURISCVState *env, int csrno,
|
|||
}
|
||||
|
||||
RISCVException riscv_csrrw_i128(CPURISCVState *env, int csrno,
|
||||
Int128 *ret_value,
|
||||
Int128 new_value, Int128 write_mask)
|
||||
Int128 *ret_value, Int128 new_value,
|
||||
Int128 write_mask, uintptr_t ra)
|
||||
{
|
||||
RISCVException ret;
|
||||
|
||||
|
@ -5668,7 +5668,7 @@ RISCVException riscv_csrrw_i128(CPURISCVState *env, int csrno,
|
|||
|
||||
if (csr_ops[csrno].read128) {
|
||||
return riscv_csrrw_do128(env, csrno, ret_value,
|
||||
new_value, write_mask, 0);
|
||||
new_value, write_mask, ra);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -5681,7 +5681,7 @@ RISCVException riscv_csrrw_i128(CPURISCVState *env, int csrno,
|
|||
target_ulong old_value;
|
||||
ret = riscv_csrrw_do64(env, csrno, &old_value,
|
||||
int128_getlo(new_value),
|
||||
int128_getlo(write_mask), 0);
|
||||
int128_getlo(write_mask), ra);
|
||||
if (ret == RISCV_EXCP_NONE && ret_value) {
|
||||
*ret_value = int128_make64(old_value);
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ void helper_csrw_i128(CPURISCVState *env, int csr,
|
|||
{
|
||||
RISCVException ret = riscv_csrrw_i128(env, csr, NULL,
|
||||
int128_make128(srcl, srch),
|
||||
UINT128_MAX);
|
||||
UINT128_MAX, GETPC());
|
||||
|
||||
if (ret != RISCV_EXCP_NONE) {
|
||||
riscv_raise_exception(env, ret, GETPC());
|
||||
|
@ -116,13 +116,14 @@ void helper_csrw_i128(CPURISCVState *env, int csr,
|
|||
}
|
||||
|
||||
target_ulong helper_csrrw_i128(CPURISCVState *env, int csr,
|
||||
target_ulong srcl, target_ulong srch,
|
||||
target_ulong maskl, target_ulong maskh)
|
||||
target_ulong srcl, target_ulong srch,
|
||||
target_ulong maskl, target_ulong maskh)
|
||||
{
|
||||
Int128 rv = int128_zero();
|
||||
RISCVException ret = riscv_csrrw_i128(env, csr, &rv,
|
||||
int128_make128(srcl, srch),
|
||||
int128_make128(maskl, maskh));
|
||||
int128_make128(maskl, maskh),
|
||||
GETPC());
|
||||
|
||||
if (ret != RISCV_EXCP_NONE) {
|
||||
riscv_raise_exception(env, ret, GETPC());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue