]> git.proxmox.com Git - mirror_qemu.git/commit - tcg/tcg.c
tcg: workaround branch instruction overflow in tcg_out_qemu_ld/st
authorLaurent Vivier <lvivier@redhat.com>
Sun, 29 Apr 2018 23:58:40 +0000 (01:58 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 1 May 2018 18:56:55 +0000 (11:56 -0700)
commit6001f7729e12dd1d810291e4cbf83cee8e07441d
tree8462a62c8d969718d68b1b55fea260cdcd1e04bf
parent5bfa803448638a45542441fd6b7cc1241403ea72
tcg: workaround branch instruction overflow in tcg_out_qemu_ld/st

ppc64 uses a BC instruction to call the tcg_out_qemu_ld/st
slow path. BC instruction uses a relative address encoded
on 14 bits.

The slow path functions are added at the end of the generated
instructions buffer, in the reverse order of the callers.
So more we have slow path functions more the distance between
the caller (BC) and the function increases.

This patch changes the behavior to generate the functions in
the same order of the callers.

Cc: qemu-stable@nongnu.org
Fixes: 15fa08f845 ("tcg: Dynamically allocate TCGOps")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20180429235840.16659-1-lvivier@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/tcg-ldst.inc.c
tcg/tcg.c
tcg/tcg.h