mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
target-xtensa: implement extended L32R
See ISA, 4.3.3 for details. TB flag XTENSA_TBFLAG_LITBASE is used to track enable bit of LITBASE SR. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
797d780b13
commit
6ad6dbf791
3 changed files with 40 additions and 4 deletions
|
@ -110,6 +110,7 @@ enum {
|
|||
LEND = 1,
|
||||
LCOUNT = 2,
|
||||
SAR = 3,
|
||||
LITBASE = 5,
|
||||
SCOMPARE1 = 12,
|
||||
WINDOW_BASE = 72,
|
||||
WINDOW_START = 73,
|
||||
|
@ -274,6 +275,7 @@ static inline int cpu_mmu_index(CPUState *env)
|
|||
|
||||
#define XTENSA_TBFLAG_RING_MASK 0x3
|
||||
#define XTENSA_TBFLAG_EXCM 0x4
|
||||
#define XTENSA_TBFLAG_LITBASE 0x8
|
||||
|
||||
static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
|
||||
target_ulong *cs_base, int *flags)
|
||||
|
@ -285,6 +287,10 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
|
|||
if (env->sregs[PS] & PS_EXCM) {
|
||||
*flags |= XTENSA_TBFLAG_EXCM;
|
||||
}
|
||||
if (xtensa_option_enabled(env->config, XTENSA_OPTION_EXTENDED_L32R) &&
|
||||
(env->sregs[LITBASE] & 1)) {
|
||||
*flags |= XTENSA_TBFLAG_LITBASE;
|
||||
}
|
||||
}
|
||||
|
||||
#include "cpu-all.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue