Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 1 | //=-- Hexagon.h - Top-level interface for Hexagon representation --*- 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 contains the entry points for global functions defined in the LLVM |
| 11 | // Hexagon back-end. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Benjamin Kramer | a7c40ef | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 15 | #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGON_H |
| 16 | #define LLVM_LIB_TARGET_HEXAGON_HEXAGON_H |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 17 | |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 18 | #define Hexagon_POINTER_SIZE 4 |
| 19 | |
| 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 |
| 24 | |
| 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 |
| 28 | |
Evandro Menezes | 5cee621 | 2012-04-12 17:55:53 +0000 | [diff] [blame] | 29 | // Normal instruction size (in bytes). |
| 30 | #define HEXAGON_INSTR_SIZE 4 |
| 31 | |
Sirish Pande | f8e5e3c | 2012-05-03 21:52:53 +0000 | [diff] [blame] | 32 | // Maximum number of words and instructions in a packet. |
Evandro Menezes | 5cee621 | 2012-04-12 17:55:53 +0000 | [diff] [blame] | 33 | #define HEXAGON_PACKET_SIZE 4 |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 34 | #define HEXAGON_MAX_PACKET_SIZE (HEXAGON_PACKET_SIZE * HEXAGON_INSTR_SIZE) |
Colin LeMahieu | 68d967d | 2015-05-29 14:44:13 +0000 | [diff] [blame] | 35 | // Minimum number of instructions in an end-loop packet. |
| 36 | #define HEXAGON_PACKET_INNER_SIZE 2 |
| 37 | #define HEXAGON_PACKET_OUTER_SIZE 3 |
Colin LeMahieu | b23c47b | 2015-05-31 21:57:09 +0000 | [diff] [blame] | 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) |
Colin LeMahieu | 68d967d | 2015-05-29 14:44:13 +0000 | [diff] [blame] | 41 | |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 42 | // Name of the global offset table as defined by the Hexagon ABI |
| 43 | #define HEXAGON_GOT_SYM_NAME "_GLOBAL_OFFSET_TABLE_" |
| 44 | |
| 45 | #include "MCTargetDesc/HexagonMCTargetDesc.h" |
David Blaikie | b3bde2e | 2017-11-17 01:07:10 +0000 | [diff] [blame] | 46 | #include "llvm/CodeGen/TargetLowering.h" |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 47 | #include "llvm/Target/TargetMachine.h" |
| 48 | |
| 49 | namespace llvm { |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 50 | class HexagonTargetMachine; |
| 51 | |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 52 | /// \brief Creates a Hexagon-specific Target Transformation Info pass. |
| 53 | ImmutablePass *createHexagonTargetTransformInfoPass(const HexagonTargetMachine *TM); |
Alexander Kornienko | f00654e | 2015-06-23 09:49:53 +0000 | [diff] [blame] | 54 | } // end namespace llvm; |
Colin LeMahieu | 56efafc | 2015-06-15 19:05:35 +0000 | [diff] [blame] | 55 | |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 56 | #endif |