mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/loongarch: Add CHECK_SXE maccro for check LSX enable
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20230504122810.4094787-4-gaosong@loongson.cn>
This commit is contained in:
parent
a0c9400a5b
commit
a3f3db5cda
3 changed files with 15 additions and 0 deletions
|
@ -419,6 +419,7 @@ static inline int cpu_mmu_index(CPULoongArchState *env, bool ifetch)
|
|||
#define HW_FLAGS_PLV_MASK R_CSR_CRMD_PLV_MASK /* 0x03 */
|
||||
#define HW_FLAGS_CRMD_PG R_CSR_CRMD_PG_MASK /* 0x10 */
|
||||
#define HW_FLAGS_EUEN_FPE 0x04
|
||||
#define HW_FLAGS_EUEN_SXE 0x08
|
||||
|
||||
static inline void cpu_get_tb_cpu_state(CPULoongArchState *env,
|
||||
target_ulong *pc,
|
||||
|
@ -429,6 +430,7 @@ static inline void cpu_get_tb_cpu_state(CPULoongArchState *env,
|
|||
*cs_base = 0;
|
||||
*flags = env->CSR_CRMD & (R_CSR_CRMD_PLV_MASK | R_CSR_CRMD_PG_MASK);
|
||||
*flags |= FIELD_EX64(env->CSR_EUEN, CSR_EUEN, FPE) * HW_FLAGS_EUEN_FPE;
|
||||
*flags |= FIELD_EX64(env->CSR_EUEN, CSR_EUEN, SXE) * HW_FLAGS_EUEN_SXE;
|
||||
}
|
||||
|
||||
void loongarch_cpu_list(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue