diff options
author | Avi Kivity <avi@redhat.com> | 2011-03-29 05:41:27 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-11 07:56:59 -0400 |
commit | 1253791df91b064c039282feea094e5943294924 (patch) | |
tree | 36cd958089c9f011a1085b3ae82556fa0d16b480 /arch/x86/include | |
parent | 0d7cdee83ad1582eecbf3b4a220e82dcb5ad561c (diff) |
KVM: x86 emulator: SSE support
Add support for marking an instruction as SSE, switching registers used
to the SSE register file.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index 4c0e6822611..48693f0d384 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h | |||
@@ -162,9 +162,11 @@ struct x86_emulate_ops { | |||
162 | void (*put_fpu)(struct x86_emulate_ctxt *ctxt); /* reenables preempt */ | 162 | void (*put_fpu)(struct x86_emulate_ctxt *ctxt); /* reenables preempt */ |
163 | }; | 163 | }; |
164 | 164 | ||
165 | typedef u32 __attribute__((vector_size(16))) sse128_t; | ||
166 | |||
165 | /* Type, address-of, and value of an instruction's operand. */ | 167 | /* Type, address-of, and value of an instruction's operand. */ |
166 | struct operand { | 168 | struct operand { |
167 | enum { OP_REG, OP_MEM, OP_IMM, OP_NONE } type; | 169 | enum { OP_REG, OP_MEM, OP_IMM, OP_XMM, OP_NONE } type; |
168 | unsigned int bytes; | 170 | unsigned int bytes; |
169 | union { | 171 | union { |
170 | unsigned long orig_val; | 172 | unsigned long orig_val; |
@@ -176,11 +178,13 @@ struct operand { | |||
176 | ulong ea; | 178 | ulong ea; |
177 | unsigned seg; | 179 | unsigned seg; |
178 | } mem; | 180 | } mem; |
181 | unsigned xmm; | ||
179 | } addr; | 182 | } addr; |
180 | union { | 183 | union { |
181 | unsigned long val; | 184 | unsigned long val; |
182 | u64 val64; | 185 | u64 val64; |
183 | char valptr[sizeof(unsigned long) + 2]; | 186 | char valptr[sizeof(unsigned long) + 2]; |
187 | sse128_t vec_val; | ||
184 | }; | 188 | }; |
185 | }; | 189 | }; |
186 | 190 | ||