On 10/21/22 01:01, Philippe Mathieu-Daudé wrote:
Hi Richard,
On 20/10/22 13:52, Richard Henderson wrote:
Allocate the first of a pair at the lower address, and the
second of a pair at the higher address. This will make it
easier to find the beginning of the larger memory block.
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
tcg/tcg-internal.h | 4 ++--
tcg/tcg.c | 60 ++++++++++++++++++++--------------------------
2 files changed, 28 insertions(+), 36 deletions(-)
@@ -4116,18 +4114,12 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const
TCGOp *op)
}
/* If the two inputs form one 64-bit value, try dupm_vec. */
- if (itsl + 1 == itsh && itsl->base_type == TCG_TYPE_I64) {
- if (!itsl->mem_coherent) {
- temp_sync(s, itsl, s->reserved_regs, 0, 0);
- }
- if (!itsh->mem_coherent) {
- temp_sync(s, itsh, s->reserved_regs, 0, 0);
- }
-#if HOST_BIG_ENDIAN
- TCGTemp *its = itsh;
-#else
- TCGTemp *its = itsl;
-#endif
+ if (itsl - itsl->temp_subindex == itsh - itsh->temp_subindex) {
+ TCGTemp *its = itsl - itsl->temp_subindex;
+
+ temp_sync(s, its + 0, s->reserved_regs, 0, 0);
+ temp_sync(s, its + 1, s->reserved_regs, 0, 0);
No mention of dropping the 'mem_coherent' checks?
Hmm. I guess I should split that out as a separate patch.
The first thing that temp_sync does is check mem_coherent...
r~
if (tcg_out_dupm_vec(s, vtype, MO_64, ots->reg,
its->mem_base->reg, its->mem_offset)) {
goto done;