diff options
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/emulate.c | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index c5d2bfcf567a..5fd9cf779be5 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -28,62 +28,7 @@ | |||
28 | #include <asm/time.h> | 28 | #include <asm/time.h> |
29 | #include <asm/byteorder.h> | 29 | #include <asm/byteorder.h> |
30 | #include <asm/kvm_ppc.h> | 30 | #include <asm/kvm_ppc.h> |
31 | 31 | #include <asm/disassemble.h> | |
32 | /* Instruction decoding */ | ||
33 | static inline unsigned int get_op(u32 inst) | ||
34 | { | ||
35 | return inst >> 26; | ||
36 | } | ||
37 | |||
38 | static inline unsigned int get_xop(u32 inst) | ||
39 | { | ||
40 | return (inst >> 1) & 0x3ff; | ||
41 | } | ||
42 | |||
43 | static inline unsigned int get_sprn(u32 inst) | ||
44 | { | ||
45 | return ((inst >> 16) & 0x1f) | ((inst >> 6) & 0x3e0); | ||
46 | } | ||
47 | |||
48 | static inline unsigned int get_dcrn(u32 inst) | ||
49 | { | ||
50 | return ((inst >> 16) & 0x1f) | ((inst >> 6) & 0x3e0); | ||
51 | } | ||
52 | |||
53 | static inline unsigned int get_rt(u32 inst) | ||
54 | { | ||
55 | return (inst >> 21) & 0x1f; | ||
56 | } | ||
57 | |||
58 | static inline unsigned int get_rs(u32 inst) | ||
59 | { | ||
60 | return (inst >> 21) & 0x1f; | ||
61 | } | ||
62 | |||
63 | static inline unsigned int get_ra(u32 inst) | ||
64 | { | ||
65 | return (inst >> 16) & 0x1f; | ||
66 | } | ||
67 | |||
68 | static inline unsigned int get_rb(u32 inst) | ||
69 | { | ||
70 | return (inst >> 11) & 0x1f; | ||
71 | } | ||
72 | |||
73 | static inline unsigned int get_rc(u32 inst) | ||
74 | { | ||
75 | return inst & 0x1; | ||
76 | } | ||
77 | |||
78 | static inline unsigned int get_ws(u32 inst) | ||
79 | { | ||
80 | return (inst >> 11) & 0x1f; | ||
81 | } | ||
82 | |||
83 | static inline unsigned int get_d(u32 inst) | ||
84 | { | ||
85 | return inst & 0xffff; | ||
86 | } | ||
87 | 32 | ||
88 | static void kvmppc_emulate_dec(struct kvm_vcpu *vcpu) | 33 | static void kvmppc_emulate_dec(struct kvm_vcpu *vcpu) |
89 | { | 34 | { |