qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 09/23] target/loongarch: Use target_ulong for CSR helpers


From: Richard Henderson
Subject: Re: [PATCH v2 09/23] target/loongarch: Use target_ulong for CSR helpers
Date: Thu, 26 Dec 2024 13:31:30 -0800
User-agent: Mozilla Thunderbird

On 12/26/24 13:19, Jiaxun Yang wrote:
All CSRs are meant to be target_ulong wide in our setting.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
  target/loongarch/helper.h        | 14 +++++++-------
  target/loongarch/tcg/op_helper.c |  4 ++--
  2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/target/loongarch/helper.h b/target/loongarch/helper.h
index 
409d93a5b0808f0e32b8c0e2e17cebac9feaf8ed..a608754b7f52689da9e9f4da1cef68d5af72f2ed
 100644
--- a/target/loongarch/helper.h
+++ b/target/loongarch/helper.h
@@ -97,13 +97,13 @@ DEF_HELPER_1(rdtime_d, i64, env)
#ifndef CONFIG_USER_ONLY
  /* CSRs helper */
-DEF_HELPER_1(csrrd_pgd, i64, env)
-DEF_HELPER_1(csrrd_cpuid, i64, env)
-DEF_HELPER_1(csrrd_tval, i64, env)
-DEF_HELPER_2(csrwr_estat, i64, env, tl)
-DEF_HELPER_2(csrwr_asid, i64, env, tl)
-DEF_HELPER_2(csrwr_tcfg, i64, env, tl)
-DEF_HELPER_2(csrwr_ticlr, i64, env, tl)
+DEF_HELPER_1(csrrd_pgd, tl, env)
+DEF_HELPER_1(csrrd_cpuid, tl, env)
+DEF_HELPER_1(csrrd_tval, tl, env)
+DEF_HELPER_2(csrwr_estat, tl, env, tl)
+DEF_HELPER_2(csrwr_asid, tl, env, tl)
+DEF_HELPER_2(csrwr_tcfg, tl, env, tl)
+DEF_HELPER_2(csrwr_ticlr, tl, env, tl)


Changes to helper declarations here, but not to definitions.


  DEF_HELPER_2(iocsrrd_b, tl, env, tl)
  DEF_HELPER_2(iocsrrd_h, tl, env, tl)
  DEF_HELPER_2(iocsrrd_w, tl, env, tl)
diff --git a/target/loongarch/tcg/op_helper.c b/target/loongarch/tcg/op_helper.c
index 
b17208e5b962f2191b2afa60181bff311d618bba..c9d7e84e7ec9000bab655366bdf6ed8aaa4fd080
 100644
--- a/target/loongarch/tcg/op_helper.c
+++ b/target/loongarch/tcg/op_helper.c
@@ -61,7 +61,7 @@ void helper_asrtgt_d(CPULoongArchState *env, target_ulong rj, 
target_ulong rk)
      }
  }
-target_ulong helper_crc32(target_ulong val, target_ulong m, uint64_t sz)
+target_ulong helper_crc32(target_ulong val, target_ulong m, target_ulong sz)
  {
      uint8_t buf[8];
      target_ulong mask = ((sz * 8) == 64) ? -1ULL : ((1ULL << (sz * 8)) - 1);
@@ -71,7 +71,7 @@ target_ulong helper_crc32(target_ulong val, target_ulong m, 
uint64_t sz)
      return (int32_t) (crc32(val ^ 0xffffffff, buf, sz) ^ 0xffffffff);
  }
-target_ulong helper_crc32c(target_ulong val, target_ulong m, uint64_t sz)
+target_ulong helper_crc32c(target_ulong val, target_ulong m, target_ulong sz)
  {
      uint8_t buf[8];
      target_ulong mask = ((sz * 8) == 64) ? -1ULL : ((1ULL << (sz * 8)) - 1);


Changes to helper definitions, but not to the declarations.

Is this patch a victim of incorrect splitting, or incorrect rebasing?


r~



reply via email to

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