diff options
| author | Richard Henderson | 2020-10-30 23:55:28 +0100 |
|---|---|---|
| committer | Richard Henderson | 2021-01-07 16:09:41 +0100 |
| commit | ffd0e507369cd65de5a07b324a2fab03678aeae1 (patch) | |
| tree | 892fa9cde3a05b2887380562a5dae3ac12167cc2 /tcg/mips | |
| parent | tcg: Introduce tcg_splitwx_to_{rx,rw} (diff) | |
| download | qemu-ffd0e507369cd65de5a07b324a2fab03678aeae1.tar.gz qemu-ffd0e507369cd65de5a07b324a2fab03678aeae1.tar.xz qemu-ffd0e507369cd65de5a07b324a2fab03678aeae1.zip | |
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 f641105f9a..a3f838fa51 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)); } |
