target/i386: implement undocumented "smsw r32" behavior
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Jun 2020 09:53:36 +0000 (05:53 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 22:02:22 +0000 (18:02 -0400)
commitc0c8445255b2b5b440c355431c8b01b7b7b7c8cf
treeb591227a4b9c015ad804c6e0f7fdfcb3d9403aeb
parent6c9cce1ff348709869262e4bd15ad4fedf513f17
target/i386: implement undocumented "smsw r32" behavior

In 32-bit mode, the higher 16 bits of the destination
register are undefined.  In practice CR0[31:0] is stored,
just like in 64-bit mode, so just remove the "if" that
currently differentiates the behavior.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reported-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/translate.c