public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v2 6/8] KVM: x86 emulator: simplify instruction decode flags for opcodes C0-DF
Date: Thu, 26 Aug 2010 16:48:43 +0800	[thread overview]
Message-ID: <4C762A6B.2040403@cn.fujitsu.com> (raw)
In-Reply-To: <4C762A04.6020304@cn.fujitsu.com>


>   
>> Use the new byte/word dual opcode decode.
>>
>> Signed-off-by: Avi Kivity <avi@redhat.com>
>> ---
>>  arch/x86/kvm/emulate.c |    7 +++----
>>  1 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
>> index 935f98e..2610fc5 100644
>> --- a/arch/x86/kvm/emulate.c
>> +++ b/arch/x86/kvm/emulate.c
>> @@ -2466,17 +2466,16 @@ static struct opcode opcode_table[256] = {
>>  	/* 0xB8 - 0xBF */
>>  	X8(D(DstReg | SrcImm | Mov)),
>>  	/* 0xC0 - 0xC7 */
>> -	D(ByteOp | DstMem | SrcImm | ModRM), D(DstMem | SrcImmByte | ModRM),
>> +	D2bv(DstMem | SrcImm | ModRM),
>>   
>>     
> 0xC1 takes imm8 as the source operand. So D2bv can not be used here.
>   

Maybe we can used D2bv(DstMem | SrcImmByte | ModRM).

>   
>>  	I(ImplicitOps | Stack | SrcImmU16, em_ret_near_imm),
>>  	D(ImplicitOps | Stack),
>>  	D(DstReg | SrcMemFAddr | ModRM | No64), D(DstReg | SrcMemFAddr | ModRM | No64),
>> -	D(ByteOp | DstMem | SrcImm | ModRM | Mov), D(DstMem | SrcImm | ModRM | Mov),
>> +	D2bv(DstMem | SrcImm | ModRM | Mov),
>>  	/* 0xC8 - 0xCF */
>>  	N, N, N, D(ImplicitOps | Stack),
>>  	D(ImplicitOps), D(SrcImmByte), D(ImplicitOps | No64), D(ImplicitOps),
>>  	/* 0xD0 - 0xD7 */
>> -	D(ByteOp | DstMem | SrcOne | ModRM), D(DstMem | SrcOne | ModRM),
>> -	D(ByteOp | DstMem | ModRM), D(DstMem | ModRM),
>> +	D2bv(DstMem | SrcOne | ModRM), D2bv(DstMem | ModRM),
>>  	N, N, N, N,
>>  	/* 0xD8 - 0xDF */
>>  	N, N, N, N, N, N, N, N,
>>   
>>     
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>   

  reply	other threads:[~2010-08-26  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26  8:36 [PATCH v2 0/8] Simplify byte/word opcode pair decode Avi Kivity
2010-08-26  8:36 ` [PATCH v2 1/8] KVM: x86 emulator: support byte/word opcode pairs Avi Kivity
2010-08-26  8:36 ` [PATCH v2 2/8] KVM: x86 emulator: simplify ALU block (opcodes 00-3F) decode flags Avi Kivity
2010-08-26  8:36 ` [PATCH v2 3/8] KVM: x86 emulator: simplify string instruction " Avi Kivity
2010-08-26  8:36 ` [PATCH v2 4/8] KVM: x86 emulator: simplify instruction decode flags for opcodes 80-8F Avi Kivity
2010-08-26  8:36 ` [PATCH v2 5/8] KVM: x86 emulator: simplify instruction decode flags for opcodes A0-AF Avi Kivity
2010-08-26  8:36 ` [PATCH v2 6/8] KVM: x86 emulator: simplify instruction decode flags for opcodes C0-DF Avi Kivity
2010-08-26  8:47   ` Wei Yongjun
2010-08-26  8:48     ` Wei Yongjun [this message]
2010-08-26  8:50     ` Avi Kivity
2010-08-26  8:36 ` [PATCH v2 7/8] KVM: x86 emulator: simplify instruction decode flags for opcodes E0-FF Avi Kivity
2010-08-26  8:36 ` [PATCH v2 8/8] KVM: x86 emulator: simplify instruction decode flags for opcodes 0F 00-FF Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C762A6B.2040403@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox