Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.0 KiB

  1. //===-- llvm/Target/TargetOpcodes.h - Target Indep Opcodes ------*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file defines the target independent instruction opcodes.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_TARGET_TARGETOPCODES_H
  14. #define LLVM_TARGET_TARGETOPCODES_H
  15. namespace llvm {
  16. /// Invariant opcodes: All instruction sets have these as their low opcodes.
  17. ///
  18. /// Every instruction defined here must also appear in Target.td and the order
  19. /// must be the same as in CodeGenTarget.cpp.
  20. ///
  21. namespace TargetOpcode {
  22. enum {
  23. PHI = 0,
  24. INLINEASM = 1,
  25. PROLOG_LABEL = 2,
  26. EH_LABEL = 3,
  27. GC_LABEL = 4,
  28. /// KILL - This instruction is a noop that is used only to adjust the
  29. /// liveness of registers. This can be useful when dealing with
  30. /// sub-registers.
  31. KILL = 5,
  32. /// EXTRACT_SUBREG - This instruction takes two operands: a register
  33. /// that has subregisters, and a subregister index. It returns the
  34. /// extracted subregister value. This is commonly used to implement
  35. /// truncation operations on target architectures which support it.
  36. EXTRACT_SUBREG = 6,
  37. /// INSERT_SUBREG - This instruction takes three operands: a register that
  38. /// has subregisters, a register providing an insert value, and a
  39. /// subregister index. It returns the value of the first register with the
  40. /// value of the second register inserted. The first register is often
  41. /// defined by an IMPLICIT_DEF, because it is commonly used to implement
  42. /// anyext operations on target architectures which support it.
  43. INSERT_SUBREG = 7,
  44. /// IMPLICIT_DEF - This is the MachineInstr-level equivalent of undef.
  45. IMPLICIT_DEF = 8,
  46. /// SUBREG_TO_REG - This instruction is similar to INSERT_SUBREG except that
  47. /// the first operand is an immediate integer constant. This constant is
  48. /// often zero, because it is commonly used to assert that the instruction
  49. /// defining the register implicitly clears the high bits.
  50. SUBREG_TO_REG = 9,
  51. /// COPY_TO_REGCLASS - This instruction is a placeholder for a plain
  52. /// register-to-register copy into a specific register class. This is only
  53. /// used between instruction selection and MachineInstr creation, before
  54. /// virtual registers have been created for all the instructions, and it's
  55. /// only needed in cases where the register classes implied by the
  56. /// instructions are insufficient. It is emitted as a COPY MachineInstr.
  57. COPY_TO_REGCLASS = 10,
  58. /// DBG_VALUE - a mapping of the llvm.dbg.value intrinsic
  59. DBG_VALUE = 11,
  60. /// REG_SEQUENCE - This variadic instruction is used to form a register that
  61. /// represent a consecutive sequence of sub-registers. It's used as register
  62. /// coalescing / allocation aid and must be eliminated before code emission.
  63. // In SDNode form, the first operand encodes the register class created by
  64. // the REG_SEQUENCE, while each subsequent pair names a vreg + subreg index
  65. // pair. Once it has been lowered to a MachineInstr, the regclass operand
  66. // is no longer present.
  67. /// e.g. v1027 = REG_SEQUENCE v1024, 3, v1025, 4, v1026, 5
  68. /// After register coalescing references of v1024 should be replace with
  69. /// v1027:3, v1025 with v1027:4, etc.
  70. REG_SEQUENCE = 12,
  71. /// COPY - Target-independent register copy. This instruction can also be
  72. /// used to copy between subregisters of virtual registers.
  73. COPY = 13,
  74. /// BUNDLE - This instruction represents an instruction bundle. Instructions
  75. /// which immediately follow a BUNDLE instruction which are marked with
  76. /// 'InsideBundle' flag are inside the bundle.
  77. BUNDLE = 14,
  78. /// Lifetime markers.
  79. LIFETIME_START = 15,
  80. LIFETIME_END = 16
  81. };
  82. } // end namespace TargetOpcode
  83. } // end namespace llvm
  84. #endif