On 8/7/23 02:45, Jiajie Chen wrote:
This commit adds loongarch32 mode to loongarch64-softmmu.
Signed-off-by: Jiajie Chen <c@jia.je>
---
target/loongarch/cpu.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index fa371ca8ba..43c73e6363 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -272,9 +272,16 @@ struct LoongArchTLB {
};
typedef struct LoongArchTLB LoongArchTLB;
+/* Current LoongArch mode */
+typedef enum LoongArchMode {
+ LA32 = 0,
+ LA64 = 1,
+} LoongArchMode;
+
typedef struct CPUArchState {
uint64_t gpr[32];
uint64_t pc;
+ LoongArchMode mode;
This is not how the hardware works.
This data is stored in CPUCFG.1.ARCH.