]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tcg/tcg-pool.c.inc
target/hppa: Add BTLB support to hppa TLB functions
[mirror_qemu.git] / tcg / tcg-pool.c.inc
index 82cbcc89bd83e9fe5bff38c6956d3f6a7ebd96d3..90c2e63b7f3fdda27cc6f95f15410edceabc9834 100644 (file)
@@ -140,6 +140,8 @@ static int tcg_out_pool_finalize(TCGContext *s)
 
     for (; p != NULL; p = p->next) {
         size_t size = sizeof(tcg_target_ulong) * p->nlong;
+        uintptr_t value;
+
         if (!l || l->nlong != p->nlong || memcmp(l->data, p->data, size)) {
             if (unlikely(a > s->code_gen_highwater)) {
                 return -1;
@@ -148,7 +150,9 @@ static int tcg_out_pool_finalize(TCGContext *s)
             a += size;
             l = p;
         }
-        if (!patch_reloc(p->label, p->rtype, (intptr_t)a - size, p->addend)) {
+
+        value = (uintptr_t)tcg_splitwx_to_rx(a) - size;
+        if (!patch_reloc(p->label, p->rtype, value, p->addend)) {
             return -2;
         }
     }