[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86emul: fold SrcImmByte fetching
commit d9a40cea32faf6cf696f42537e95a4759a2924d0 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Mon Aug 15 12:21:24 2016 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Aug 15 12:21:24 2016 +0200 x86emul: fold SrcImmByte fetching There's no need for having identical code spelled out twice. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/x86_emulate/x86_emulate.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 8c82d59..85e20b6 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -1979,9 +1979,14 @@ x86_emulate( goto done; break; case SrcImm: + if ( !(d & ByteOp) ) + src.bytes = op_bytes != 8 ? op_bytes : 4; + else + { + case SrcImmByte: + src.bytes = 1; + } src.type = OP_IMM; - src.bytes = (d & ByteOp) ? 1 : op_bytes; - if ( src.bytes == 8 ) src.bytes = 4; /* NB. Immediates are sign-extended as necessary. */ switch ( src.bytes ) { @@ -1990,11 +1995,6 @@ x86_emulate( case 4: src.val = insn_fetch_type(int32_t); break; } break; - case SrcImmByte: - src.type = OP_IMM; - src.bytes = 1; - src.val = insn_fetch_type(int8_t); - break; } /* Decode and fetch the destination operand: register or memory. */ -- 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 |