X86InstrRAOINT.td 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //===---- X86InstrRAOINT.td -------------------------------*- 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 Intel RAO-INT
  10. // instruction set.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //===----------------------------------------------------------------------===//
  14. // RAO-INT instructions
  15. def SDTRAOBinaryArith : SDTypeProfile<0, 2, [SDTCisPtrTy<0>, SDTCisInt<1>]>;
  16. def X86rao_add : SDNode<"X86ISD::AADD", SDTRAOBinaryArith,
  17. [SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
  18. def X86rao_or : SDNode<"X86ISD::AOR", SDTRAOBinaryArith,
  19. [SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
  20. def X86rao_xor : SDNode<"X86ISD::AXOR", SDTRAOBinaryArith,
  21. [SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
  22. def X86rao_and : SDNode<"X86ISD::AAND", SDTRAOBinaryArith,
  23. [SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
  24. multiclass RAOINT_BASE<string OpcodeStr> {
  25. let Predicates = [HasRAOINT] in
  26. def 32mr : I<0xfc, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src),
  27. !strconcat("a", OpcodeStr, "{l}\t{$src, $dst|$dst, $src}"),
  28. [(!cast<SDNode>("X86rao_" # OpcodeStr) addr:$dst, GR32:$src)]>,
  29. Sched<[WriteALURMW]>;
  30. let Predicates = [HasRAOINT, In64BitMode] in
  31. def 64mr : I<0xfc, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src),
  32. !strconcat("a", OpcodeStr, "{q}\t{$src, $dst|$dst, $src}"),
  33. [(!cast<SDNode>("X86rao_" # OpcodeStr) addr:$dst, GR64:$src)]>,
  34. Sched<[WriteALURMW]>, REX_W;
  35. }
  36. defm AADD : RAOINT_BASE<"add">, T8PS;
  37. defm AAND : RAOINT_BASE<"and">, T8PD;
  38. defm AOR : RAOINT_BASE<"or" >, T8XD;
  39. defm AXOR : RAOINT_BASE<"xor">, T8XS;