23c10886 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Use extracts for sraiw and srliw
These operations can be done in one instruction on some hosts.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Bin Meng <
target/riscv: Use extracts for sraiw and srliw
These operations can be done in one instruction on some hosts.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210823195529.560295-14-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
89c88309 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Use DisasExtend in shift operations
These operations are greatly simplified by ctx->w, which allows us to fold gen_shiftw into gen_shift. Split gen_shifti into gen_shift_imm_{fn,tl} l
target/riscv: Use DisasExtend in shift operations
These operations are greatly simplified by ctx->w, which allows us to fold gen_shiftw into gen_shift. Split gen_shifti into gen_shift_imm_{fn,tl} like we do for gen_arith_imm_{fn,tl}.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-13-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
60903915 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Add DisasExtend to gen_unary
Use ctx->w for ctpopw, which is the only one that can re-use the generic algorithm for the narrow operation.
Reviewed-by: Alistair Francis <alistair.franc
target/riscv: Add DisasExtend to gen_unary
Use ctx->w for ctpopw, which is the only one that can re-use the generic algorithm for the narrow operation.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-12-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
f84ed8c2 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Move gen_* helpers for RVB
Move these helpers near their use by the trans_* functions within insn_trans/trans_rvb.c.inc.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philip
target/riscv: Move gen_* helpers for RVB
Move these helpers near their use by the trans_* functions within insn_trans/trans_rvb.c.inc.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-11-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
b66a0585 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Move gen_* helpers for RVM
Move these helpers near their use by the trans_* functions within insn_trans/trans_rvm.c.inc.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philip
target/riscv: Move gen_* helpers for RVM
Move these helpers near their use by the trans_* functions within insn_trans/trans_rvm.c.inc.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-10-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
8a1b4917 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Use gen_arith for mulh and mulhu
Split out gen_mulh and gen_mulhu and use the common helper.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis
target/riscv: Use gen_arith for mulh and mulhu
Split out gen_mulh and gen_mulhu and use the common helper.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-9-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
afbbec82 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Remove gen_arith_div*
Use ctx->w and the enhanced gen_arith function.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by
target/riscv: Remove gen_arith_div*
Use ctx->w and the enhanced gen_arith function.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-8-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
191d1daf | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Add DisasExtend to gen_arith*
Most arithmetic does not require extending the inputs. Exceptions include division, comparison and minmax.
Begin using ctx->w, which allows elimination o
target/riscv: Add DisasExtend to gen_arith*
Most arithmetic does not require extending the inputs. Exceptions include division, comparison and minmax.
Begin using ctx->w, which allows elimination of gen_addw, gen_subw, gen_mulw.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-7-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
ecda15d1 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Introduce DisasExtend and new helpers
Introduce get_gpr, dest_gpr, temp_new -- new helpers that do not force tcg globals into temps, returning a constant 0 for $zero as source and a ne
target/riscv: Introduce DisasExtend and new helpers
Introduce get_gpr, dest_gpr, temp_new -- new helpers that do not force tcg globals into temps, returning a constant 0 for $zero as source and a new temp for $zero as destination.
Introduce ctx->w for simplifying word operations, such as addw.
Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-6-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
867c8196 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Add DisasContext to gen_get_gpr, gen_set_gpr
We will require the context to handle RV64 word operations.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng
target/riscv: Add DisasContext to gen_get_gpr, gen_set_gpr
We will require the context to handle RV64 word operations.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-5-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
4a083b56 | 23-Aug-2021 |
Richard Henderson <richard.henderson@linaro.org> |
target/riscv: Clean up division helpers
Utilize the condition in the movcond more; this allows some of the setcond that were feeding into movcond to be removed. Do not write into source1 and source2
target/riscv: Clean up division helpers
Utilize the condition in the movcond more; this allows some of the setcond that were feeding into movcond to be removed. Do not write into source1 and source2. Re-name "condN" to "tempN" and use the temporaries for more than holding conditions.
Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210823195529.560295-4-richard.henderson@linaro.org Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
42109837 | 09-Aug-2021 |
LIU Zhiwei <zhiwei_liu@c-sky.com> |
target/riscv: Add User CSRs read-only check
For U-mode CSRs, read-only check is also needed.
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-id:
target/riscv: Add User CSRs read-only check
For U-mode CSRs, read-only check is also needed.
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-id: 20210810014552.4884-1-zhiwei_liu@c-sky.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
a8b37120 | 11-Aug-2021 |
LIU Zhiwei <zhiwei_liu@c-sky.com> |
target/riscv: Don't wrongly override isa version
For some cpu, the isa version has already been set in cpu init function. Thus only override the isa version when isa version is not set, or users set
target/riscv: Don't wrongly override isa version
For some cpu, the isa version has already been set in cpu init function. Thus only override the isa version when isa version is not set, or users set different isa version explicitly by cpu parameters.
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-id: 20210811144612.68674-1-zhiwei_liu@c-sky.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
bc083a51 | 22-May-2021 |
Jose Martins <josemartins90@gmail.com> |
target/riscv: hardwire bits in hideleg and hedeleg
The specification mandates for certain bits to be hardwired in the hypervisor delegation registers. This was not being enforced.
Signed-off-by: Jo
target/riscv: hardwire bits in hideleg and hedeleg
The specification mandates for certain bits to be hardwired in the hypervisor delegation registers. This was not being enforced.
Signed-off-by: Jose Martins <josemartins90@gmail.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210522155902.374439-1-josemartins90@gmail.com [ Changes by AF: - Improve indentation - Convert delegable_excps to a #define to avoid failures with GCC 8 ] Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
232a2c8c | 27-Jun-2021 |
Bin Meng <bmeng.cn@gmail.com> |
target/riscv: csr: Remove redundant check in fp csr read/write routines
The following check:
if (!env->debugger && !riscv_cpu_fp_enabled(env)) { return -RISCV_EXCP_ILLEGAL_INST; }
target/riscv: csr: Remove redundant check in fp csr read/write routines
The following check:
if (!env->debugger && !riscv_cpu_fp_enabled(env)) { return -RISCV_EXCP_ILLEGAL_INST; }
is redundant in fflags/frm/fcsr read/write routines, as the check was already done in fs().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210627120604.11116-1-bmeng.cn@gmail.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
79a41289 | 15-Jun-2021 |
Bin Meng <bin.meng@windriver.com> |
target/riscv: gdbstub: Fix dynamic CSR XML generation
Since commit 605def6eeee5 ("target/riscv: Use the RISCVException enum for CSR operations") the CSR predicate() function was changed to return RI
target/riscv: gdbstub: Fix dynamic CSR XML generation
Since commit 605def6eeee5 ("target/riscv: Use the RISCVException enum for CSR operations") the CSR predicate() function was changed to return RISCV_EXCP_NONE instead of 0 for a valid CSR, but it forgot to update the dynamic CSR XML generation codes in gdbstub.
Fixes: 605def6eeee5 ("target/riscv: Use the RISCVException enum for CSR operations") Reported-by: Xuzhou Cheng <xuzhou.cheng@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Tested-by: Xuzhou Cheng <xuzhou.cheng@windriver.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210615085133.389887-1-bmeng.cn@gmail.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
d2c1a177 | 05-May-2021 |
Frank Chang <frank.chang@sifive.com> |
target/riscv: rvb: add b-ext version cpu option
Default b-ext version is v0.93.
Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-
target/riscv: rvb: add b-ext version cpu option
Default b-ext version is v0.93.
Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210505160620.15723-18-frank.chang@sifive.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
d52e9408 | 05-May-2021 |
Kito Cheng <kito.cheng@sifive.com> |
target/riscv: rvb: support and turn on B-extension from command line
B-extension is default off, use cpu rv32 or rv64 with x-b=true to enable B-extension.
Signed-off-by: Kito Cheng <kito.cheng@sifi
target/riscv: rvb: support and turn on B-extension from command line
B-extension is default off, use cpu rv32 or rv64 with x-b=true to enable B-extension.
Signed-off-by: Kito Cheng <kito.cheng@sifive.com> Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210505160620.15723-17-frank.chang@sifive.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|