Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tcg/i386: Output %gs prefix in tcg_out_vex_opc
Missing the segment prefix means that user-only fails
to add guest_base for some 128-bit load/store.

Fixes: 098d0fc ("tcg/i386: Support 128-bit load/store")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1763
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Aug 12, 2023
1 parent bb5f142 commit d3b4112
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tcg/i386/tcg-target.c.inc
Expand Up @@ -595,6 +595,9 @@ static void tcg_out_vex_opc(TCGContext *s, int opc, int r, int v,
{
int tmp;

if (opc & P_GS) {
tcg_out8(s, 0x65);
}
/* Use the two byte form if possible, which cannot encode
VEX.W, VEX.B, VEX.X, or an m-mmmm field other than P_EXT. */
if ((opc & (P_EXT | P_EXT38 | P_EXT3A | P_VEXW)) == P_EXT
Expand Down

0 comments on commit d3b4112

Please sign in to comment.