From: Avi Kivity <avi@qumranet.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: kvm@vger.kernel.org, riel@surriel.com
Subject: Re: [PATCH] x86_emulate: Use DstReg when emulating xchg instructions
Date: Sun, 15 Jun 2008 21:10:48 -0700 [thread overview]
Message-ID: <4855E7C8.6020406@qumranet.com> (raw)
In-Reply-To: <52d4a3890806150937g272f8848ydfa5711ddaf7a985@mail.gmail.com>
Mohammed Gamal wrote:
> As per Avi's recommendation, this patch uses DstReg to autodecode destination
> registers when emulating xchg instructions
>
>
Applied, thanks. I had to fix some coding style errors, please read
Documentation/CodingStyle (or just follow the style in the surrounding
code).
> + case 0x91 ... 0x97: /* xchg reg,rax */
> + c->src.type = c->dst.type = OP_REG;
> + c->src.bytes = c->dst.bytes = c->op_bytes;
> + c->src.ptr = (unsigned long *) &c->regs[VCPU_REGS_RAX];
> + c->src.val = *(c->src.ptr);
> + goto xchg;
>
How about SrcAcc and DstAcc so this code doesn't have to be repeated?
There are many potential use cases.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
prev parent reply other threads:[~2008-06-16 4:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-15 16:37 [PATCH] x86_emulate: Use DstReg when emulating xchg instructions Mohammed Gamal
2008-06-16 4:10 ` Avi Kivity [this message]
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=4855E7C8.6020406@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=m.gamal005@gmail.com \
--cc=riel@surriel.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