2012-02-18 20:03:15 +08:00
|
|
|
//===-- X86InstrVMX.td - VMX Instruction Set Extension -----*- tablegen -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2012-02-18 20:03:15 +08:00
|
|
|
//
|
2010-10-05 14:06:53 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file describes the instructions that make up the Intel VMX instruction
|
|
|
|
// set.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// VMX instructions
|
|
|
|
|
2017-12-07 23:57:32 +08:00
|
|
|
let SchedRW = [WriteSystem] in {
|
2010-10-05 14:06:53 +08:00
|
|
|
// 66 0F 38 80
|
2011-10-02 05:20:14 +08:00
|
|
|
def INVEPT32 : I<0x80, MRMSrcMem, (outs), (ins GR32:$src1, i128mem:$src2),
|
2018-04-12 20:09:24 +08:00
|
|
|
"invept\t{$src2, $src1|$src1, $src2}", []>, T8PD,
|
2013-12-20 10:04:49 +08:00
|
|
|
Requires<[Not64BitMode]>;
|
2011-10-02 05:20:14 +08:00
|
|
|
def INVEPT64 : I<0x80, MRMSrcMem, (outs), (ins GR64:$src1, i128mem:$src2),
|
2018-04-12 20:09:24 +08:00
|
|
|
"invept\t{$src2, $src1|$src1, $src2}", []>, T8PD,
|
2011-10-16 15:05:40 +08:00
|
|
|
Requires<[In64BitMode]>;
|
2017-12-07 23:57:32 +08:00
|
|
|
|
2010-10-05 14:06:53 +08:00
|
|
|
// 66 0F 38 81
|
2011-10-02 05:20:14 +08:00
|
|
|
def INVVPID32 : I<0x81, MRMSrcMem, (outs), (ins GR32:$src1, i128mem:$src2),
|
2018-04-12 20:09:24 +08:00
|
|
|
"invvpid\t{$src2, $src1|$src1, $src2}", []>, T8PD,
|
2013-12-20 10:04:49 +08:00
|
|
|
Requires<[Not64BitMode]>;
|
2011-10-02 05:20:14 +08:00
|
|
|
def INVVPID64 : I<0x81, MRMSrcMem, (outs), (ins GR64:$src1, i128mem:$src2),
|
2018-04-12 20:09:24 +08:00
|
|
|
"invvpid\t{$src2, $src1|$src1, $src2}", []>, T8PD,
|
2011-10-16 15:05:40 +08:00
|
|
|
Requires<[In64BitMode]>;
|
2017-12-07 23:57:32 +08:00
|
|
|
|
2010-10-05 14:06:53 +08:00
|
|
|
// 0F 01 C1
|
2018-04-12 20:09:24 +08:00
|
|
|
def VMCALL : I<0x01, MRM_C1, (outs), (ins), "vmcall", []>, TB;
|
2010-10-05 14:06:53 +08:00
|
|
|
def VMCLEARm : I<0xC7, MRM6m, (outs), (ins i64mem:$vmcs),
|
2014-01-14 15:41:20 +08:00
|
|
|
"vmclear\t$vmcs", []>, PD;
|
2017-12-07 23:57:32 +08:00
|
|
|
|
2012-02-19 09:39:49 +08:00
|
|
|
// OF 01 D4
|
2020-06-12 03:18:52 +08:00
|
|
|
def VMFUNC : I<0x01, MRM_D4, (outs), (ins), "vmfunc", []>, PS;
|
2017-12-07 23:57:32 +08:00
|
|
|
|
2010-10-05 14:06:53 +08:00
|
|
|
// 0F 01 C2
|
2018-04-12 20:09:24 +08:00
|
|
|
def VMLAUNCH : I<0x01, MRM_C2, (outs), (ins), "vmlaunch", []>, TB;
|
2017-12-07 23:57:32 +08:00
|
|
|
|
2010-10-05 14:06:53 +08:00
|
|
|
// 0F 01 C3
|
2018-04-12 20:09:24 +08:00
|
|
|
def VMRESUME : I<0x01, MRM_C3, (outs), (ins), "vmresume", []>, TB;
|
2010-10-05 14:06:53 +08:00
|
|
|
def VMPTRLDm : I<0xC7, MRM6m, (outs), (ins i64mem:$vmcs),
|
2018-04-12 20:09:24 +08:00
|
|
|
"vmptrld\t$vmcs", []>, PS;
|
2016-03-13 10:56:31 +08:00
|
|
|
def VMPTRSTm : I<0xC7, MRM7m, (outs), (ins i64mem:$vmcs),
|
2018-04-12 20:09:24 +08:00
|
|
|
"vmptrst\t$vmcs", []>, PS;
|
2010-10-05 14:06:53 +08:00
|
|
|
def VMREAD64rr : I<0x78, MRMDestReg, (outs GR64:$dst), (ins GR64:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmread{q}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[In64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2010-10-05 14:06:53 +08:00
|
|
|
def VMREAD32rr : I<0x78, MRMDestReg, (outs GR32:$dst), (ins GR32:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmread{l}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[Not64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2017-12-07 23:57:32 +08:00
|
|
|
|
2017-04-13 18:03:45 +08:00
|
|
|
let mayStore = 1 in {
|
|
|
|
def VMREAD64mr : I<0x78, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmread{q}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[In64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2017-04-13 18:03:45 +08:00
|
|
|
def VMREAD32mr : I<0x78, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmread{l}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[Not64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2017-12-07 23:57:32 +08:00
|
|
|
} // mayStore
|
|
|
|
|
2010-10-05 14:06:53 +08:00
|
|
|
def VMWRITE64rr : I<0x79, MRMSrcReg, (outs GR64:$dst), (ins GR64:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmwrite{q}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[In64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2010-10-05 14:06:53 +08:00
|
|
|
def VMWRITE32rr : I<0x79, MRMSrcReg, (outs GR32:$dst), (ins GR32:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmwrite{l}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[Not64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2017-12-07 23:57:32 +08:00
|
|
|
|
2017-04-13 18:03:45 +08:00
|
|
|
let mayLoad = 1 in {
|
|
|
|
def VMWRITE64rm : I<0x79, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmwrite{q}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[In64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2017-04-13 18:03:45 +08:00
|
|
|
def VMWRITE32rm : I<0x79, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$src),
|
2018-06-12 12:34:59 +08:00
|
|
|
"vmwrite{l}\t{$src, $dst|$dst, $src}", []>, PS, Requires<[Not64BitMode]>,
|
|
|
|
NotMemoryFoldable;
|
2017-12-07 23:57:32 +08:00
|
|
|
} // mayLoad
|
|
|
|
|
2010-10-05 14:06:53 +08:00
|
|
|
// 0F 01 C4
|
|
|
|
def VMXOFF : I<0x01, MRM_C4, (outs), (ins), "vmxoff", []>, TB;
|
|
|
|
def VMXON : I<0xC7, MRM6m, (outs), (ins i64mem:$vmxon),
|
2012-01-10 05:32:02 +08:00
|
|
|
"vmxon\t$vmxon", []>, XS;
|
2017-12-07 23:57:32 +08:00
|
|
|
} // SchedRW
|