Re: [PATCH] target/i386: fix operand size for DATA16 REX.W POPCNT

2024-05-10 Thread Zhao Liu
On Thu, May 09, 2024 at 05:25:26PM +0200, Paolo Bonzini wrote: > Date: Thu, 9 May 2024 17:25:26 +0200 > From: Paolo Bonzini > Subject: [PATCH] target/i386: fix operand size for DATA16 REX.W POPCNT > X-Mailer: git-send-email 2.45.0 > > According to the manual, 32-bit vs

Re: [PATCH] target/i386: fix operand size for DATA16 REX.W POPCNT

2024-05-10 Thread Richard Henderson
On 5/9/24 17:25, Paolo Bonzini wrote: According to the manual, 32-bit vs 64-bit is governed by REX.W and REX ignores the 0x66 prefix. This can be confirmed with this program: #include int main() { int x = 0x1234; int y; asm("popcntl %1, %0" : "=r"

[PATCH] target/i386: fix operand size for DATA16 REX.W POPCNT

2024-05-09 Thread Paolo Bonzini
According to the manual, 32-bit vs 64-bit is governed by REX.W and REX ignores the 0x66 prefix. This can be confirmed with this program: #include int main() { int x = 0x1234; int y; asm("popcntl %1, %0" : "=r" (y) : "r" (x)); printf("%x\n", y);