54 lines · plain
1//===-- X86InstrSNP.td - SNP Instruction Set Extension -----*- tablegen -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file describes the instructions that make up the AMD Secure Nested10// Paging (SNP) instruction set.11//12//===----------------------------------------------------------------------===//13 14//===----------------------------------------------------------------------===//15// SNP instructions16 17let SchedRW = [WriteSystem] in {18// F3 0F 01 FF19let Uses = [RAX], Defs = [EAX, EFLAGS] in20def PSMASH: I<0x01, MRM_FF, (outs), (ins), "psmash", []>, TB, XS,21 Requires<[In64BitMode]>;22 23// F2 0F 01 FF24let Uses = [RAX, RCX, RDX], Defs = [EAX, EFLAGS] in25def PVALIDATE64: I<0x01, MRM_FF, (outs), (ins), "pvalidate",[]>,26 TB, XD, Requires<[In64BitMode]>;27 28let Uses = [EAX, ECX, EDX], Defs = [EAX, EFLAGS] in29def PVALIDATE32: I<0x01, MRM_FF, (outs), (ins), "pvalidate",[]>,30 TB, XD, Requires<[Not64BitMode]>;31 32// F2 0F 01 FE33let Uses = [RAX, RCX], Defs = [EAX, EFLAGS] in34def RMPUPDATE: I<0x01, MRM_FE, (outs), (ins), "rmpupdate", []>, TB, XD,35 Requires<[In64BitMode]>;36 37// F3 0F 01 FE38let Uses = [RAX, RCX, RDX], Defs = [EAX, EFLAGS] in39def RMPADJUST: I<0x01, MRM_FE, (outs), (ins), "rmpadjust", []>, TB, XS,40 Requires<[In64BitMode]>;41 42// F3 0F 01 FD43let Uses = [RAX, RDX], Defs = [RAX, RCX, RDX, EFLAGS] in44def RMPQUERY: I<0x01, MRM_FD, (outs), (ins), "rmpquery", []>, TB, XS,45 Requires<[In64BitMode]>;46} // SchedRW47 48def : InstAlias<"psmash\t{%rax|rax}", (PSMASH)>, Requires<[In64BitMode]>;49def : InstAlias<"pvalidate\t{%rax, %rcx, %rdx|rdx, rcx, rax|}", (PVALIDATE64)>, Requires<[In64BitMode]>;50def : InstAlias<"pvalidate\t{%eax, %ecx, %edx|edx, ecx, eax|}", (PVALIDATE32)>, Requires<[Not64BitMode]>;51def : InstAlias<"rmpupdate\t{%rax, %rcx|rcx, rax|}", (RMPUPDATE)>, Requires<[In64BitMode]>;52def : InstAlias<"rmpadjust\t{%rax, %rcx, %rdx|rdx, rcx, rax|}", (RMPADJUST)>, Requires<[In64BitMode]>;53def : InstAlias<"rmpquery\t{%rax, %rdx|rdx, rax|}", (RMPQUERY)>, Requires<[In64BitMode]>;54