1 //===-- MipsBaseInfo.h - Top level definitions for MIPS MC ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains small standalone helper functions and enum definitions for
11 // the Mips target useful for the compiler back-end and the MC libraries.
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSBASEINFO_H
15 #define LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSBASEINFO_H
17 #include "MipsFixupKinds.h"
18 #include "MipsMCTargetDesc.h"
19 #include "llvm/MC/MCExpr.h"
20 #include "llvm/Support/DataTypes.h"
21 #include "llvm/Support/ErrorHandling.h"
25 /// MipsII - This namespace holds all of the target specific flags that
26 /// instruction info tracks.
29 /// Target Operand Flag enum.
31 //===------------------------------------------------------------------===//
32 // Mips Specific MachineOperand flags.
36 /// MO_GOT - Represents the offset into the global offset table at which
37 /// the address the relocation entry symbol resides during execution.
40 /// MO_GOT_CALL - Represents the offset into the global offset table at
41 /// which the address of a call site relocation entry symbol resides
42 /// during execution. This is different from the above since this flag
43 /// can only be present in call instructions.
46 /// MO_GPREL - Represents the offset from the current gp value to be used
47 /// for the relocatable object file being produced.
50 /// MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol
55 /// MO_TLSGD - Represents the offset into the global offset table at which
56 // the module ID and TSL block offset reside during execution (General
60 /// MO_TLSLDM - Represents the offset into the global offset table at which
61 // the module ID and TSL block offset reside during execution (Local
67 /// MO_GOTTPREL - Represents the offset from the thread pointer (Initial
71 /// MO_TPREL_HI/LO - Represents the hi and low part of the offset from
72 // the thread pointer (Local Exec TLS).
83 /// MO_HIGHER/HIGHEST - Represents the highest or higher half word of a
84 /// 64-bit symbol address.
88 /// MO_GOT_HI16/LO16, MO_CALL_HI16/LO16 - Relocations used for large GOTs.
96 //===------------------------------------------------------------------===//
97 // Instruction encodings. These are the standard/most common forms for
101 // Pseudo - This represents an instruction that is a pseudo instruction
102 // or one that has not been implemented yet. It is illegal to code generate
103 // it, but tolerated for intermediate implementation stages.
106 /// FrmR - This form is for instructions of the format R.
108 /// FrmI - This form is for instructions of the format I.
110 /// FrmJ - This form is for instructions of the format J.
112 /// FrmFR - This form is for instructions of the format FR.
114 /// FrmFI - This form is for instructions of the format FI.
116 /// FrmOther - This form is for instructions that have no specific format.
120 /// IsCTI - Instruction is a Control Transfer Instruction.
122 /// HasForbiddenSlot - Instruction has a forbidden slot.
123 HasForbiddenSlot = 1 << 5,
124 /// IsPCRelativeLoad - A Load instruction with implicit source register
125 /// ($pc) with explicit offset and destination register
126 IsPCRelativeLoad = 1 << 6,
127 /// HasFCCRegOperand - Instruction uses an $fcc<x> register.
128 HasFCCRegOperand = 1 << 7