brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 4c36d42 Raw
45 lines · c
1//===---- MipsCCState.h - CCState with Mips specific extensions -----------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef MIPSCCSTATE_H10#define MIPSCCSTATE_H11 12#include "MipsISelLowering.h"13#include "llvm/ADT/SmallVector.h"14#include "llvm/CodeGen/CallingConvLower.h"15 16namespace llvm {17class SDNode;18class MipsSubtarget;19 20class MipsCCState : public CCState {21public:22  enum SpecialCallingConvType { Mips16RetHelperConv, NoSpecialCallingConv };23 24  /// Determine the SpecialCallingConvType for the given callee25  static SpecialCallingConvType26  getSpecialCallingConvForCallee(const SDNode *Callee,27                                 const MipsSubtarget &Subtarget);28 29private:30  // Used to handle MIPS16-specific calling convention tweaks.31  // FIXME: This should probably be a fully fledged calling convention.32  SpecialCallingConvType SpecialCallingConv;33 34public:35  MipsCCState(CallingConv::ID CC, bool isVarArg, MachineFunction &MF,36              SmallVectorImpl<CCValAssign> &locs, LLVMContext &C,37              SpecialCallingConvType SpecialCC = NoSpecialCallingConv)38      : CCState(CC, isVarArg, MF, locs, C), SpecialCallingConv(SpecialCC) {}39 40  SpecialCallingConvType getSpecialCallingConv() { return SpecialCallingConv; }41};42}43 44#endif45