|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86emul: use DstEax where possible
commit c0bc0adf24d6991fad29aa788382d3533b532174
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Aug 12 16:57:32 2016 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Aug 12 16:57:32 2016 +0200
x86emul: use DstEax where possible
While it avoids just a few instructions, we should nevertheless make
use of generic code as much as possible.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/x86_emulate/x86_emulate.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c
b/xen/arch/x86/x86_emulate/x86_emulate.c
index 915cef6..8c82d59 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -124,7 +124,7 @@ static uint8_t opcode_table[256] = {
ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
ImplicitOps|Mov, ImplicitOps|Mov, ImplicitOps, ImplicitOps,
/* 0xA0 - 0xA7 */
- ByteOp|ImplicitOps|Mov, ImplicitOps|Mov,
+ ByteOp|DstEax|SrcImplicit|Mov, DstEax|SrcImplicit|Mov,
ByteOp|ImplicitOps|Mov, ImplicitOps|Mov,
ByteOp|ImplicitOps|Mov, ImplicitOps|Mov,
ByteOp|ImplicitOps, ImplicitOps,
@@ -161,12 +161,12 @@ static uint8_t opcode_table[256] = {
/* 0xE0 - 0xE7 */
DstImplicit|SrcImmByte, DstImplicit|SrcImmByte,
DstImplicit|SrcImmByte, DstImplicit|SrcImmByte,
- DstImplicit|SrcImmByte, DstImplicit|SrcImmByte,
+ DstEax|SrcImmByte, DstEax|SrcImmByte,
DstImplicit|SrcImmByte, DstImplicit|SrcImmByte,
/* 0xE8 - 0xEF */
DstImplicit|SrcImm|Mov, DstImplicit|SrcImm,
ImplicitOps, DstImplicit|SrcImmByte,
- ImplicitOps, ImplicitOps, ImplicitOps, ImplicitOps,
+ DstEax|SrcImplicit, DstEax|SrcImplicit, ImplicitOps, ImplicitOps,
/* 0xF0 - 0xF7 */
0, ImplicitOps, 0, 0,
ImplicitOps, ImplicitOps,
@@ -2617,8 +2617,6 @@ x86_emulate(
case 0xa0 ... 0xa1: /* mov mem.offs,{%al,%ax,%eax,%rax} */
/* Source EA is not encoded via ModRM. */
- dst.type = OP_REG;
- dst.reg = (unsigned long *)&_regs.eax;
dst.bytes = (d & ByteOp) ? 1 : op_bytes;
if ( (rc = read_ulong(ea.mem.seg, insn_fetch_bytes(ad_bytes),
&dst.val, dst.bytes, ctxt, ops)) != 0 )
@@ -3512,9 +3510,7 @@ x86_emulate(
else
{
/* in */
- dst.type = OP_REG;
dst.bytes = op_bytes;
- dst.reg = (unsigned long *)&_regs.eax;
fail_if(ops->read_io == NULL);
rc = ops->read_io(port, dst.bytes, &dst.val, ctxt);
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |