This does not have any functional effect because the only instruction where it would make a difference is VPINSRB/VPINSRW, and they disable high-byte registers even for the non-AVX encoding. However, with APX it becomes a general property of the EVEX prefix and it makes sense to treat VEX the same way since it *does* include REX bits.
Signed-off-by: Paolo Bonzini <[email protected]> --- target/i386/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 7186517239c..83b250056e1 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -208,7 +208,7 @@ typedef struct DisasContext { #endif #ifdef TARGET_X86_64 -#define REX_PREFIX(S) (((S)->prefix & PREFIX_REX) != 0) +#define REX_PREFIX(S) (((S)->prefix & (PREFIX_REX | PREFIX_VEX)) != 0) #define REX_W(S) ((S)->vex_w) #define REX_R(S) ((S)->rex_r + 0) #define REX_X(S) ((S)->rex_x + 0) -- 2.52.0
