RISCV.td 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //===-- RISCV.td - Describe the RISCV Target Machine -------*- 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. include "llvm/Target/Target.td"
  9. //===----------------------------------------------------------------------===//
  10. // RISC-V subtarget features and instruction predicates.
  11. //===----------------------------------------------------------------------===//
  12. include "RISCVFeatures.td"
  13. //===----------------------------------------------------------------------===//
  14. // Named operands for CSR instructions.
  15. //===----------------------------------------------------------------------===//
  16. include "RISCVSystemOperands.td"
  17. //===----------------------------------------------------------------------===//
  18. // Registers, calling conventions, instruction descriptions.
  19. //===----------------------------------------------------------------------===//
  20. include "RISCVSchedule.td"
  21. include "RISCVRegisterInfo.td"
  22. include "RISCVCallingConv.td"
  23. include "RISCVInstrInfo.td"
  24. include "GISel/RISCVRegisterBanks.td"
  25. //===----------------------------------------------------------------------===//
  26. // RISC-V Scheduling Models
  27. //===----------------------------------------------------------------------===//
  28. include "RISCVSchedRocket.td"
  29. include "RISCVSchedSiFive7.td"
  30. include "RISCVSchedSyntacoreSCR1.td"
  31. //===----------------------------------------------------------------------===//
  32. // RISC-V processors supported.
  33. //===----------------------------------------------------------------------===//
  34. include "RISCVProcessors.td"
  35. //===----------------------------------------------------------------------===//
  36. // Define the RISC-V target.
  37. //===----------------------------------------------------------------------===//
  38. def RISCVInstrInfo : InstrInfo {
  39. let guessInstructionProperties = 0;
  40. }
  41. def RISCVAsmParser : AsmParser {
  42. let ShouldEmitMatchRegisterAltName = 1;
  43. let AllowDuplicateRegisterNames = 1;
  44. }
  45. def RISCVAsmWriter : AsmWriter {
  46. int PassSubtarget = 1;
  47. }
  48. def RISCV : Target {
  49. let InstructionSet = RISCVInstrInfo;
  50. let AssemblyParsers = [RISCVAsmParser];
  51. let AssemblyWriters = [RISCVAsmWriter];
  52. let AllowRegisterRenaming = 1;
  53. }