mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target/riscv: Encode the FS and VS on a normal way for tb flags
Reuse the MSTATUS_FS and MSTATUS_VS for the tb flags positions is not a normal way. It will make it hard to change the tb flags layout. And even worse, if we want to keep tb flags for a same extension togather without a hole. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Message-Id: <20230324143031.1093-4-zhiwei_liu@linux.alibaba.com> [rth: Adjust trans_rvf.c.inc as well; use the typedef] Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Tested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-Id: <20230325105429.1142530-4-richard.henderson@linaro.org> Message-Id: <20230412114333.118895-4-richard.henderson@linaro.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
42967f4073
commit
ebd476488d
5 changed files with 32 additions and 36 deletions
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#define REQUIRE_FPU do {\
|
||||
if (ctx->mstatus_fs == 0) \
|
||||
if (ctx->mstatus_fs == EXT_STATUS_DISABLED) \
|
||||
if (!ctx->cfg_ptr->ext_zfinx) \
|
||||
return false; \
|
||||
} while (0)
|
||||
|
|
|
@ -29,12 +29,12 @@ static inline bool is_overlapped(const int8_t astart, int8_t asize,
|
|||
|
||||
static bool require_rvv(DisasContext *s)
|
||||
{
|
||||
return s->mstatus_vs != 0;
|
||||
return s->mstatus_vs != EXT_STATUS_DISABLED;
|
||||
}
|
||||
|
||||
static bool require_rvf(DisasContext *s)
|
||||
{
|
||||
if (s->mstatus_fs == 0) {
|
||||
if (s->mstatus_fs == EXT_STATUS_DISABLED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ static bool require_rvf(DisasContext *s)
|
|||
|
||||
static bool require_scale_rvf(DisasContext *s)
|
||||
{
|
||||
if (s->mstatus_fs == 0) {
|
||||
if (s->mstatus_fs == EXT_STATUS_DISABLED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ static bool require_scale_rvf(DisasContext *s)
|
|||
|
||||
static bool require_scale_rvfmin(DisasContext *s)
|
||||
{
|
||||
if (s->mstatus_fs == 0) {
|
||||
if (s->mstatus_fs == EXT_STATUS_DISABLED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue