From: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
To: kvm <kvm@vger.kernel.org>
Cc: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>,
Avi Kivity <avi@redhat.com>
Subject: [Patch 3/5] x86_emulator: add a new "implied 1" Src decode type
Date: Thu, 4 Dec 2008 14:27:38 +0100 [thread overview]
Message-ID: <20081204142738.04c909c6@frecb000711> (raw)
In-Reply-To: <20081204142418.709d321d@frecb000711>
Add SrcOne operand type when we need to decode an implied '1' like with
regular shift instruction
Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
---
arch/x86/kvm/x86_emulate.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 7f5cd62..0c75306 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -58,6 +58,7 @@
#define SrcMem32 (4<<4) /* Memory operand (32-bit). */
#define SrcImm (5<<4) /* Immediate operand. */
#define SrcImmByte (6<<4) /* 8-bit sign-extended immediate operand. */
+#define SrcOne (7<<4) /* Implied '1' */
#define SrcMask (7<<4)
/* Generic ModRM decode. */
#define ModRM (1<<7)
@@ -1004,6 +1005,10 @@ done_prefixes:
c->src.bytes = 1;
c->src.val = insn_fetch(s8, 1, c->eip);
break;
+ case SrcOne:
+ c->src.bytes = 1;
+ c->src.val = 1;
+ break;
}
/*
--
1.6.0.4.623.g171d7
next prev parent reply other threads:[~2008-12-04 13:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 13:24 [Patch 0/5] x86_emulator: emulate shld and shrd instructions Guillaume Thouvenin
2008-12-04 13:25 ` [Patch 1/5] x86_emulator: Extend the opcode descriptor Guillaume Thouvenin
2008-12-04 13:26 ` [Patch 2/5] x86_emulator: add Src2 decode set Guillaume Thouvenin
2008-12-04 13:27 ` Guillaume Thouvenin [this message]
2008-12-04 13:29 ` [Patch 4/5] x86_emulator: add the assembler code for three operands Guillaume Thouvenin
2008-12-04 13:30 ` [Patch 5/5] x86_emulator: add the emulation of shld and shrd instructions Guillaume Thouvenin
2008-12-05 17:16 ` [Patch 0/5] x86_emulator: emulate " Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2008-11-03 15:00 [RFC Patch 0/5] x86_emulator: emulate shld and shrd instruction Guillaume Thouvenin
2008-11-03 15:03 ` [Patch 3/5] x86_emulator: add a new "implied 1" Src decode type Guillaume Thouvenin
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=20081204142738.04c909c6@frecb000711 \
--to=guillaume.thouvenin@ext.bull.net \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.