public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [patch] (big) real mode emulation - mov rl/rh/r
Date: Wed, 31 Oct 2007 10:04:30 +0200	[thread overview]
Message-ID: <4728370E.3030401@qumranet.com> (raw)
In-Reply-To: <1193798626.9258.34.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>

Nitin A Kamble wrote:
> On Tue, 2007-10-30 at 18:06 -0700, Avi Kivity wrote:
>   
>> Nitin A Kamble wrote:
>>     
>>> Hi Avi,
>>>   Attached is the patch to implement emulation of instructions
>>>   mov rl, imm8 (opcodes 0xb0-0xb3)
>>>   mov rh, imm8 (opcodes 0xb4-0xb7)
>>>   mov r, imm (opcodes0xb8-0xbf)
>>>
>>>  
>>> @@ -146,8 +146,12 @@ static u16 opcode_table[256] = {
>>>         0, 0, ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
>>>         ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
>>>         ByteOp | ImplicitOps, ImplicitOps,
>>> -       /* 0xB0 - 0xBF */
>>> -       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
>>> +       /* 0xB0 - 0xB7 */
>>> +       Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov |
>>> SrcImmByte,
>>> +       Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov |
>>> SrcImmByte,
>>> +       /* 0xB8 - 0xBF */
>>> +       Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
>>> +       Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
>>>         /* 0xC0 - 0xC7 */
>>>       
>> Perhaps adding DstReg would reduce the decoding code later on?
>>     
>
> Avi,
> The decoding of register is significantly different for these
> instructions. It will be just moving code from one place to other place.
>
>   

Right.

But perhaps we can have a ShortReg modifier to make the decoding 
common.  There are several instructions which can use this (inc, dec, 
xchg, push, mov).

I'll look into this.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

  parent reply	other threads:[~2007-10-31  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  0:43 [patch] (big) real mode emulation - mov rl/rh/r Nitin A Kamble
     [not found] ` <1193791385.9258.17.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-10-31  1:06   ` Avi Kivity
     [not found]     ` <4727D531.7090401-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-31  2:43       ` Nitin A Kamble
     [not found]         ` <1193798626.9258.34.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-10-31  8:04           ` Avi Kivity [this message]
     [not found]             ` <4728370E.3030401-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-31  9:38               ` 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=4728370E.3030401@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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