aboutsummaryrefslogtreecommitdiff
path: root/tcg/i386
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-08-12 08:48:18 -0700
committerRichard Henderson <richard.henderson@linaro.org>2023-08-12 08:51:12 -0700
commitd3b41127c205062ca6c29c89c9542c4112c39ca0 (patch)
tree5cbbe73c0e9b452336b12c3971f557bb373cfdb8 /tcg/i386
parentbb5f142cb320d45d3d8dee2c82dae003cad39da8 (diff)
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: 098d0fc10d2 ("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>
Diffstat (limited to 'tcg/i386')
-rw-r--r--tcg/i386/tcg-target.c.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index 77482da070..a6b2eae995 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -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