diff options
author | Anton Johansson <anjo@rev.ng> | 2023-02-27 14:51:38 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-03-01 07:31:33 -1000 |
commit | e607ea39efc5e091e89759c0957fe7a41c87a290 (patch) | |
tree | 7dc438a49f17c81ed00dc76a2142806dc94f8cea | |
parent | 492f8b88aeffb36dbcd736f4e5add67ceda299c4 (diff) | |
download | qemu-e607ea39efc5e091e89759c0957fe7a41c87a290.zip qemu-e607ea39efc5e091e89759c0957fe7a41c87a290.tar.gz qemu-e607ea39efc5e091e89759c0957fe7a41c87a290.tar.bz2 |
target/arm: set `CF_PCREL` in `arm_cpu_realizefn`
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230227135202.9710-4-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | target/arm/cpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 0b333a7..b21d52c 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1557,6 +1557,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 + /* If we needed to query the host kernel for the CPU features * then it's possible that might have failed in the initfn, but * this is the first point where we can report it. |