blob: cf8401faecb3dd77e632d0be7aeab39da0a746b1 [file] [log] [blame]
Jia Liubb481f82012-02-28 07:46:26 +00001//===-- MipsFrameLowering.h - Define frame lowering for Mips ----*- C++ -*-===//
Anton Korobeynikov33464912010-11-15 00:06:54 +00002//
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//
Akira Hatanaka4552c9a2011-04-15 21:51:11 +00008//===----------------------------------------------------------------------===//
Anton Korobeynikov33464912010-11-15 00:06:54 +00009//
10//
11//
Akira Hatanaka4552c9a2011-04-15 21:51:11 +000012//===----------------------------------------------------------------------===//
Anton Korobeynikov33464912010-11-15 00:06:54 +000013
Bruno Cardoso Lopes49eaf762011-03-04 19:20:24 +000014#ifndef MIPS_FRAMEINFO_H
15#define MIPS_FRAMEINFO_H
Anton Korobeynikov33464912010-11-15 00:06:54 +000016
17#include "Mips.h"
18#include "MipsSubtarget.h"
Anton Korobeynikov16c29b52011-01-10 12:39:04 +000019#include "llvm/Target/TargetFrameLowering.h"
Anton Korobeynikov33464912010-11-15 00:06:54 +000020
21namespace llvm {
22 class MipsSubtarget;
23
Anton Korobeynikov16c29b52011-01-10 12:39:04 +000024class MipsFrameLowering : public TargetFrameLowering {
Anton Korobeynikov33464912010-11-15 00:06:54 +000025protected:
26 const MipsSubtarget &STI;
27
28public:
Anton Korobeynikov16c29b52011-01-10 12:39:04 +000029 explicit MipsFrameLowering(const MipsSubtarget &sti)
Akira Hatanaka459cad22011-09-22 02:53:37 +000030 : TargetFrameLowering(StackGrowsDown, sti.hasMips64() ? 16 : 8, 0),
31 STI(sti) {
Anton Korobeynikov33464912010-11-15 00:06:54 +000032 }
33
Anton Korobeynikovd0c38172010-11-18 21:19:35 +000034 bool hasFP(const MachineFunction &MF) const;
Anton Korobeynikov33464912010-11-15 00:06:54 +000035};
36
37} // End llvm namespace
38
39#endif