tcg: Constify TCGLabelQemuLdst.raddr

Now that all native tcg hosts support splitwx,
make this pointer const.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201214140314.18544-44-richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson
2020-12-14 08:03:14 -06:00
committed by Patchew Applier
parent 8b66138f4c
commit 5861ba146e
8 changed files with 8 additions and 15 deletions
+1 -2
View File
@@ -1636,8 +1636,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi,
label->type = ext;
label->datalo_reg = data_reg;
label->addrlo_reg = addr_reg;
/* TODO: Cast goes away when all hosts converted */
label->raddr = (void *)tcg_splitwx_to_rx(raddr);
label->raddr = tcg_splitwx_to_rx(raddr);
label->label_ptr[0] = label_ptr;
}
+1 -2
View File
@@ -1340,8 +1340,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi,
label->datahi_reg = datahi;
label->addrlo_reg = addrlo;
label->addrhi_reg = addrhi;
/* TODO: Cast goes away when all hosts converted */
label->raddr = (void *)tcg_splitwx_to_rx(raddr);
label->raddr = tcg_splitwx_to_rx(raddr);
label->label_ptr[0] = label_ptr;
}
+1 -2
View File
@@ -1786,8 +1786,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, bool is_64,
label->datahi_reg = datahi;
label->addrlo_reg = addrlo;
label->addrhi_reg = addrhi;
/* TODO: Cast goes away when all hosts converted */
label->raddr = (void *)tcg_splitwx_to_rx(raddr);
label->raddr = tcg_splitwx_to_rx(raddr);
label->label_ptr[0] = label_ptr[0];
if (TARGET_LONG_BITS > TCG_TARGET_REG_BITS) {
label->label_ptr[1] = label_ptr[1];
+1 -2
View File
@@ -1283,8 +1283,7 @@ static void add_qemu_ldst_label(TCGContext *s, int is_ld, TCGMemOpIdx oi,
label->datahi_reg = datahi;
label->addrlo_reg = addrlo;
label->addrhi_reg = addrhi;
/* TODO: Cast goes away when all hosts converted */
label->raddr = (void *)tcg_splitwx_to_rx(raddr);
label->raddr = tcg_splitwx_to_rx(raddr);
label->label_ptr[0] = label_ptr[0];
if (TCG_TARGET_REG_BITS < TARGET_LONG_BITS) {
label->label_ptr[1] = label_ptr[1];
+1 -2
View File
@@ -2001,8 +2001,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi,
label->datahi_reg = datahi_reg;
label->addrlo_reg = addrlo_reg;
label->addrhi_reg = addrhi_reg;
/* TODO: Cast goes away when all hosts converted */
label->raddr = (void *)tcg_splitwx_to_rx(raddr);
label->raddr = tcg_splitwx_to_rx(raddr);
label->label_ptr[0] = lptr;
}
+1 -2
View File
@@ -996,8 +996,7 @@ static void add_qemu_ldst_label(TCGContext *s, int is_ld, TCGMemOpIdx oi,
label->datahi_reg = datahi;
label->addrlo_reg = addrlo;
label->addrhi_reg = addrhi;
/* TODO: Cast goes away when all hosts converted */
label->raddr = (void *)tcg_splitwx_to_rx(raddr);
label->raddr = tcg_splitwx_to_rx(raddr);
label->label_ptr[0] = label_ptr[0];
}
+1 -2
View File
@@ -1587,8 +1587,7 @@ static void add_qemu_ldst_label(TCGContext *s, bool is_ld, TCGMemOpIdx oi,
label->oi = oi;
label->datalo_reg = data;
label->addrlo_reg = addr;
/* TODO: Cast goes away when all hosts converted */
label->raddr = (void *)tcg_splitwx_to_rx(raddr);
label->raddr = tcg_splitwx_to_rx(raddr);
label->label_ptr[0] = label_ptr;
}
+1 -1
View File
@@ -28,7 +28,7 @@ typedef struct TCGLabelQemuLdst {
TCGReg addrhi_reg; /* reg index for high word of guest virtual addr */
TCGReg datalo_reg; /* reg index for low word to be loaded or stored */
TCGReg datahi_reg; /* reg index for high word to be loaded or stored */
tcg_insn_unit *raddr; /* gen code addr of the next IR of qemu_ld/st IR */
const tcg_insn_unit *raddr; /* addr of the next IR of qemu_ld/st IR */
tcg_insn_unit *label_ptr[2]; /* label pointers to be updated */
QSIMPLEQ_ENTRY(TCGLabelQemuLdst) next;
} TCGLabelQemuLdst;