diff options
author | Avi Kivity <[email protected]> | 2010-07-26 14:37:39 +0300 |
---|---|---|
committer | Avi Kivity <[email protected]> | 2010-10-24 10:49:48 +0200 |
commit | 83babbca4617ab086621fe65a71a2168420f1d88 (patch) | |
tree | 4fba3ab55701cba79ed4916e7a5e2c1b0e4279c4 | |
parent | 91269b8f94eedce1767b2f208d656e5a5683326a (diff) |
KVM: x86 emulator: add macros for repetitive instructions
Some instructions are repetitive in the opcode space, add macros for
consolidating them.
Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
-rw-r--r-- | arch/x86/kvm/emulate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 70e47d3593d8..c5c42e041e48 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -94,6 +94,15 @@ #define Src2One (3<<29) #define Src2Mask (7<<29) +#define X2(x) (x), (x) +#define X3(x) X2(x), (x) +#define X4(x) X2(x), X2(x) +#define X5(x) X4(x), (x) +#define X6(x) X4(x), X2(x) +#define X7(x) X4(x), X3(x) +#define X8(x) X4(x), X4(x) +#define X16(x) X8(x), X8(x) + enum { Group1_80, Group1_81, Group1_82, Group1_83, Group1A, Group3_Byte, Group3, Group4, Group5, Group7, |