X86InstrSNP.td 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file describes the instructions that make up the AMD Secure Nested
  10. // Paging (SNP) instruction set.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //===----------------------------------------------------------------------===//
  14. // SNP instructions
  15. let SchedRW = [WriteSystem] in {
  16. // F3 0F 01 FF
  17. let Uses = [RAX] in
  18. def PSMASH: I<0x01, MRM_FF, (outs), (ins), "psmash", []>, XS,
  19. Requires<[In64BitMode]>;
  20. // F2 0F 01 FF
  21. let Uses = [RAX] in
  22. def PVALIDATE64: I<0x01, MRM_FF, (outs), (ins), "pvalidate",[]>,
  23. XD, Requires<[In64BitMode]>;
  24. let Uses = [EAX] in
  25. def PVALIDATE32: I<0x01, MRM_FF, (outs), (ins), "pvalidate",[]>,
  26. XD, Requires<[Not64BitMode]>;
  27. // F2 0F 01 FE
  28. let Uses = [RAX] in
  29. def RMPUPDATE: I<0x01, MRM_FE, (outs), (ins), "rmpupdate", []>, XD,
  30. Requires<[In64BitMode]>;
  31. // F3 0F 01 FE
  32. let Uses = [RAX] in
  33. def RMPADJUST: I<0x01, MRM_FE, (outs), (ins), "rmpadjust", []>, XS,
  34. Requires<[In64BitMode]>;
  35. } // SchedRW
  36. def : InstAlias<"psmash\t{%rax|rax}", (PSMASH)>, Requires<[In64BitMode]>;
  37. def : InstAlias<"pvalidate\t{%rax|rax}", (PVALIDATE64)>, Requires<[In64BitMode]>;
  38. def : InstAlias<"pvalidate\t{%eax|eax}", (PVALIDATE32)>, Requires<[Not64BitMode]>;
  39. def : InstAlias<"rmpupdate\t{%rax|rax}", (RMPUPDATE)>, Requires<[In64BitMode]>;
  40. def : InstAlias<"rmpadjust\t{%rax|rax}", (RMPADJUST)>, Requires<[In64BitMode]>;