LLVM API Documentation

MipsBaseInfo.h
Go to the documentation of this file.
00001 //===-- MipsBaseInfo.h - Top level definitions for MIPS MC ------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains small standalone helper functions and enum definitions for
00011 // the Mips target useful for the compiler back-end and the MC libraries.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 #ifndef LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSBASEINFO_H
00015 #define LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSBASEINFO_H
00016 
00017 #include "MipsFixupKinds.h"
00018 #include "MipsMCTargetDesc.h"
00019 #include "llvm/MC/MCExpr.h"
00020 #include "llvm/Support/DataTypes.h"
00021 #include "llvm/Support/ErrorHandling.h"
00022 
00023 namespace llvm {
00024 
00025 /// MipsII - This namespace holds all of the target specific flags that
00026 /// instruction info tracks.
00027 ///
00028 namespace MipsII {
00029   /// Target Operand Flag enum.
00030   enum TOF {
00031     //===------------------------------------------------------------------===//
00032     // Mips Specific MachineOperand flags.
00033 
00034     MO_NO_FLAG,
00035 
00036     /// MO_GOT16 - Represents the offset into the global offset table at which
00037     /// the address the relocation entry symbol resides during execution.
00038     MO_GOT16,
00039     MO_GOT,
00040 
00041     /// MO_GOT_CALL - Represents the offset into the global offset table at
00042     /// which the address of a call site relocation entry symbol resides
00043     /// during execution. This is different from the above since this flag
00044     /// can only be present in call instructions.
00045     MO_GOT_CALL,
00046 
00047     /// MO_GPREL - Represents the offset from the current gp value to be used
00048     /// for the relocatable object file being produced.
00049     MO_GPREL,
00050 
00051     /// MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol
00052     /// address.
00053     MO_ABS_HI,
00054     MO_ABS_LO,
00055 
00056     /// MO_TLSGD - Represents the offset into the global offset table at which
00057     // the module ID and TSL block offset reside during execution (General
00058     // Dynamic TLS).
00059     MO_TLSGD,
00060 
00061     /// MO_TLSLDM - Represents the offset into the global offset table at which
00062     // the module ID and TSL block offset reside during execution (Local
00063     // Dynamic TLS).
00064     MO_TLSLDM,
00065     MO_DTPREL_HI,
00066     MO_DTPREL_LO,
00067 
00068     /// MO_GOTTPREL - Represents the offset from the thread pointer (Initial
00069     // Exec TLS).
00070     MO_GOTTPREL,
00071 
00072     /// MO_TPREL_HI/LO - Represents the hi and low part of the offset from
00073     // the thread pointer (Local Exec TLS).
00074     MO_TPREL_HI,
00075     MO_TPREL_LO,
00076 
00077     // N32/64 Flags.
00078     MO_GPOFF_HI,
00079     MO_GPOFF_LO,
00080     MO_GOT_DISP,
00081     MO_GOT_PAGE,
00082     MO_GOT_OFST,
00083 
00084     /// MO_HIGHER/HIGHEST - Represents the highest or higher half word of a
00085     /// 64-bit symbol address.
00086     MO_HIGHER,
00087     MO_HIGHEST,
00088 
00089     /// MO_GOT_HI16/LO16, MO_CALL_HI16/LO16 - Relocations used for large GOTs.
00090     MO_GOT_HI16,
00091     MO_GOT_LO16,
00092     MO_CALL_HI16,
00093     MO_CALL_LO16
00094   };
00095 
00096   enum {
00097     //===------------------------------------------------------------------===//
00098     // Instruction encodings.  These are the standard/most common forms for
00099     // Mips instructions.
00100     //
00101 
00102     // Pseudo - This represents an instruction that is a pseudo instruction
00103     // or one that has not been implemented yet.  It is illegal to code generate
00104     // it, but tolerated for intermediate implementation stages.
00105     Pseudo   = 0,
00106 
00107     /// FrmR - This form is for instructions of the format R.
00108     FrmR  = 1,
00109     /// FrmI - This form is for instructions of the format I.
00110     FrmI  = 2,
00111     /// FrmJ - This form is for instructions of the format J.
00112     FrmJ  = 3,
00113     /// FrmFR - This form is for instructions of the format FR.
00114     FrmFR = 4,
00115     /// FrmFI - This form is for instructions of the format FI.
00116     FrmFI = 5,
00117     /// FrmOther - This form is for instructions that have no specific format.
00118     FrmOther = 6,
00119 
00120     FormMask = 15
00121   };
00122 }
00123 }
00124 
00125 #endif