qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/6] target/loongarch: Add loongarch32 mode for loongarch6


From: Jiajie Chen
Subject: Re: [PATCH v3 1/6] target/loongarch: Add loongarch32 mode for loongarch64-softmmu
Date: Mon, 7 Aug 2023 23:14:39 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0


On 2023/8/7 23:13, Richard Henderson wrote:
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.
Okay, I will change to use CFGCFG.1.ARCH instead in v4.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]