aboutsummaryrefslogtreecommitdiff
path: root/target/loongarch/cpu.h
diff options
context:
space:
mode:
authorJiajie Chen <c@jia.je>2023-08-22 09:13:54 +0200
committerSong Gao <gaosong@loongson.cn>2023-08-24 11:17:57 +0800
commit2f6478ffad1770a474460b7692588bae7f031da3 (patch)
tree97bd6431bc88242b23331fa962c8f282ba380c4f /target/loongarch/cpu.h
parent5a7ce25d0db050b8ddd62dc91c56f4af46e9cf3c (diff)
target/loongarch: Extract set_pc() helper
Signed-off-by: Jiajie Chen <c@jia.je> Co-authored-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230822032724.1353391-6-gaosong@loongson.cn> [PMD: Extract helper from bigger patch] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230822071405.35386-9-philmd@linaro.org>
Diffstat (limited to 'target/loongarch/cpu.h')
-rw-r--r--target/loongarch/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h
index 72109095e4..e1562695e8 100644
--- a/target/loongarch/cpu.h
+++ b/target/loongarch/cpu.h
@@ -443,6 +443,11 @@ static inline bool is_va32(CPULoongArchState *env)
return va32;
}
+static inline void set_pc(CPULoongArchState *env, uint64_t value)
+{
+ env->pc = value;
+}
+
/*
* LoongArch CPUs hardware flags.
*/