qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] target: Set `CF_PCREL` for arm and i386 frontends


From: Richard Henderson
Subject: Re: [PATCH 3/3] target: Set `CF_PCREL` for arm and i386 frontends
Date: Wed, 8 Feb 2023 11:15:48 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2/7/23 00:43, Anton Johansson wrote:
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
  target/arm/cpu-param.h  | 2 --
  target/arm/cpu.c        | 5 +++++
  target/i386/cpu-param.h | 4 ----
  target/i386/cpu.c       | 5 +++++
  4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h
index 53cac9c89b..b7bde18986 100644
--- a/target/arm/cpu-param.h
+++ b/target/arm/cpu-param.h
@@ -31,8 +31,6 @@
  # define TARGET_PAGE_BITS_VARY
  # define TARGET_PAGE_BITS_MIN  10
-# define TARGET_TB_PCREL 1
-
  /*
   * Cache the attrs and shareability fields from the page table entry.
   *
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 31dc595e11..62b876e0f0 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1551,6 +1551,11 @@ static void arm_cpu_realizefn(DeviceState *dev, Error 
**errp)
      Error *local_err = NULL;
      bool no_aa32 = false;
+ /* Use pc-relative instructions in system-mode */
+#ifndef CONFIG_USER_ONLY
+    cs->tcg_cflags |= CF_PCREL;
+#endif

To fix bisection problems, the hunks setting CF_PCREL need to precede removal of the TARGET_TB_PCREL tests. The removal of TARGET_TB_PCREL can happen all at once at the end.


r~



reply via email to

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