diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-10-30 15:55:28 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-01-07 05:09:41 -1000 |
commit | ffd0e507369cd65de5a07b324a2fab03678aeae1 (patch) | |
tree | 892fa9cde3a05b2887380562a5dae3ac12167cc2 /tcg/mips | |
parent | db0c51a380394b21b33a6294367aff03ab06b286 (diff) | |
download | qemu-ffd0e507369cd65de5a07b324a2fab03678aeae1.zip qemu-ffd0e507369cd65de5a07b324a2fab03678aeae1.tar.gz qemu-ffd0e507369cd65de5a07b324a2fab03678aeae1.tar.bz2 |
tcg: Adjust TCGLabel for const
Change TCGLabel.u.value_ptr to const, and initialize it with
tcg_splitwx_to_rx. Propagate const through tcg/host/ only
as far as needed to avoid errors from the value_ptr change.
Reviewed-by: Joelle van Dyne <j@getutm.app>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/mips')
-rw-r--r-- | tcg/mips/tcg-target.c.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index f641105..a3f838f 100644 --- a/tcg/mips/tcg-target.c.inc +++ b/tcg/mips/tcg-target.c.inc @@ -144,7 +144,8 @@ static tcg_insn_unit *bswap32_addr; static tcg_insn_unit *bswap32u_addr; static tcg_insn_unit *bswap64_addr; -static inline uint32_t reloc_pc16_val(tcg_insn_unit *pc, tcg_insn_unit *target) +static inline uint32_t reloc_pc16_val(tcg_insn_unit *pc, + const tcg_insn_unit *target) { /* Let the compiler perform the right-shift as part of the arithmetic. */ ptrdiff_t disp = target - (pc + 1); @@ -152,7 +153,7 @@ static inline uint32_t reloc_pc16_val(tcg_insn_unit *pc, tcg_insn_unit *target) return disp & 0xffff; } -static inline void reloc_pc16(tcg_insn_unit *pc, tcg_insn_unit *target) +static inline void reloc_pc16(tcg_insn_unit *pc, const tcg_insn_unit *target) { *pc = deposit32(*pc, 0, 16, reloc_pc16_val(pc, target)); } |