blob: 854d4e457c8d21ef9cef076bad076e43a53024f1 [file] [log] [blame]
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +00001//==-- MSP430.h - Top-level interface for MSP430 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
11// the LLVM MSP430 backend.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_TARGET_MSP430_H
16#define LLVM_TARGET_MSP430_H
17
Anton Korobeynikov60871cb2009-05-03 13:19:42 +000018#include "llvm/Target/TargetMachine.h"
19
Anton Korobeynikov3926fb62009-10-21 19:16:49 +000020namespace MSP430CC {
21 // MSP430 specific condition code.
22 enum CondCodes {
23 COND_E = 0, // aka COND_Z
24 COND_NE = 1, // aka COND_NZ
25 COND_HS = 2, // aka COND_C
26 COND_LO = 3, // aka COND_NC
27 COND_GE = 4,
28 COND_L = 5,
29
30 COND_INVALID = -1
31 };
32}
33
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000034namespace llvm {
35 class MSP430TargetMachine;
36 class FunctionPass;
David Greene71847812009-07-14 20:18:05 +000037 class formatted_raw_ostream;
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000038
Anton Korobeynikov60871cb2009-05-03 13:19:42 +000039 FunctionPass *createMSP430ISelDag(MSP430TargetMachine &TM,
40 CodeGenOpt::Level OptLevel);
Daniel Dunbar4cb1e132009-07-18 23:03:22 +000041
Anton Korobeynikov702adab2010-01-15 21:19:05 +000042 FunctionPass *createMSP430BranchSelectionPass();
43
Daniel Dunbar4cb1e132009-07-18 23:03:22 +000044 extern Target TheMSP430Target;
45
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000046} // end namespace llvm;
47
48// Defines symbolic names for MSP430 registers.
49// This defines a mapping from register name to register number.
Evan Cheng73f50d92011-06-27 18:32:37 +000050#define GET_REGINFO_ENUM
51#include "MSP430GenRegisterInfo.inc"
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000052
53// Defines symbolic names for the MSP430 instructions.
Evan Cheng22fee2d2011-06-28 20:07:07 +000054#define GET_INSTRINFO_ENUM
55#include "MSP430GenInstrInfo.inc"
Anton Korobeynikovf2c3e172009-05-03 12:57:15 +000056
57#endif