1 //=-- Hexagon.h - Top-level interface for Hexagon representation --*- 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 the entry points for global functions defined in the LLVM
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
16 #define LLVM_LIB_TARGET_HEXAGON_HEXAGON_H
18 #define Hexagon_POINTER_SIZE 4
20 #define Hexagon_PointerSize (Hexagon_POINTER_SIZE)
21 #define Hexagon_PointerSize_Bits (Hexagon_POINTER_SIZE * 8)
22 #define Hexagon_WordSize Hexagon_PointerSize
23 #define Hexagon_WordSize_Bits Hexagon_PointerSize_Bits
25 // allocframe saves LR and FP on stack before allocating
26 // a new stack frame. This takes 8 bytes.
27 #define HEXAGON_LRFP_SIZE 8
29 // Normal instruction size (in bytes).
30 #define HEXAGON_INSTR_SIZE 4
32 // Maximum number of words and instructions in a packet.
33 #define HEXAGON_PACKET_SIZE 4
34 #define HEXAGON_MAX_PACKET_SIZE (HEXAGON_PACKET_SIZE * HEXAGON_INSTR_SIZE)
35 // Minimum number of instructions in an end-loop packet.
36 #define HEXAGON_PACKET_INNER_SIZE 2
37 #define HEXAGON_PACKET_OUTER_SIZE 3
38 // Maximum number of instructions in a packet before shuffling,
39 // including a compound one or a duplex or an extender.
40 #define HEXAGON_PRESHUFFLE_PACKET_SIZE (HEXAGON_PACKET_SIZE + 3)
42 // Name of the global offset table as defined by the Hexagon ABI
43 #define HEXAGON_GOT_SYM_NAME "_GLOBAL_OFFSET_TABLE_"
45 #include "MCTargetDesc/HexagonMCTargetDesc.h"
46 #include "llvm/Target/TargetLowering.h"
47 #include "llvm/Target/TargetMachine.h"
50 class HexagonTargetMachine;
52 /// \brief Creates a Hexagon-specific Target Transformation Info pass.
53 ImmutablePass *createHexagonTargetTransformInfoPass(const HexagonTargetMachine *TM);
54 } // end namespace llvm;