[PATCH] target/i386: Fix decode of cr8

Richard Henderson posted 1 patch 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/next-importer-push tags/patchew/20210602035511.96834-1-richard.henderson@linaro.org
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/translate.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] target/i386: Fix decode of cr8
Posted by Richard Henderson 2 years, 10 months ago
A recent cleanup did not recognize that there are two ways
to encode cr8: one via the LOCK and the other via REX.

Fixes: 7eff2e7c
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/380
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/i386/tcg/translate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 834186bcae..a7f5c0c8f2 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -8091,6 +8091,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
         case 2:
         case 3:
         case 4:
+        case 8:
             break;
         default:
             goto unknown_op;
-- 
2.25.1


Re: [PATCH] target/i386: Fix decode of cr8
Posted by Paolo Bonzini 2 years, 9 months ago
On 02/06/21 05:55, Richard Henderson wrote:
> A recent cleanup did not recognize that there are two ways
> to encode cr8: one via the LOCK and the other via REX.
> 
> Fixes: 7eff2e7c
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/380
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/i386/tcg/translate.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
> index 834186bcae..a7f5c0c8f2 100644
> --- a/target/i386/tcg/translate.c
> +++ b/target/i386/tcg/translate.c
> @@ -8091,6 +8091,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
>           case 2:
>           case 3:
>           case 4:
> +        case 8:
>               break;
>           default:
>               goto unknown_op;
> 

Queued, thanks.

Paolo