diff options
author | Jiajie Chen <c@jia.je> | 2023-08-22 09:13:52 +0200 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2023-08-24 11:17:57 +0800 |
commit | c5af6628f4be5d30800233e59ba3842ca19a12e6 (patch) | |
tree | b778ec63140afbe615fd6c9bb883030450f93e02 /target/loongarch/translate.c | |
parent | 34423c01941928974f4854bc23a949789154fee7 (diff) |
target/loongarch: Extract make_address_i() 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-7-philmd@linaro.org>
Diffstat (limited to 'target/loongarch/translate.c')
-rw-r--r-- | target/loongarch/translate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/loongarch/translate.c b/target/loongarch/translate.c index a68a979a55..acc54d7587 100644 --- a/target/loongarch/translate.c +++ b/target/loongarch/translate.c @@ -220,6 +220,12 @@ static TCGv make_address_x(DisasContext *ctx, TCGv base, TCGv addend) return base; } +static TCGv make_address_i(DisasContext *ctx, TCGv base, target_long ofs) +{ + TCGv addend = ofs ? tcg_constant_tl(ofs) : NULL; + return make_address_x(ctx, base, addend); +} + #include "decode-insns.c.inc" #include "insn_trans/trans_arith.c.inc" #include "insn_trans/trans_shift.c.inc" |