On 8/8/23 19:13, Jiajie Chen wrote:
On 2023/8/9 01:01, Richard Henderson wrote:
On 8/7/23 18:54, Jiajie Chen wrote:
Add macro to check if the current cpucfg[1].arch equals to 1(LA32) or
2(LA64).
Signed-off-by: Jiajie Chen <c...@jia.je>
---
target/loongarch/cpu.h | 7 +++++++
1 file changed, 7 insertions(+)
It might be easier to just define
static inline bool is_la64(CPULoongArch64 *env)
{
return FIELD_EX32(env->cpucfg[1], CPUCFG1, ARCH) ==
CPUCFG1_ARCH_LA64;
}
Ah, drop my other suggestion (Richard's way is simpler).
Sure, I will use this way.