mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-03 14:08:57 +00:00
eaa221a23e
sret arguments can never originate from an f128 argument so we detect sret arguments and push false into OriginalArgWasF128. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221102 91177308-0d34-0410-b5e6-96231b3b80d8
53 lines
1.5 KiB
C++
53 lines
1.5 KiB
C++
//===---- MipsABIInfo.h - Information about MIPS ABI's --------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef MIPSABIINFO_H
|
|
#define MIPSABIINFO_H
|
|
|
|
#include "llvm/ADT/ArrayRef.h"
|
|
#include "llvm/MC/MCRegisterInfo.h"
|
|
|
|
namespace llvm {
|
|
|
|
class MipsABIInfo {
|
|
public:
|
|
enum class ABI { Unknown, O32, N32, N64, EABI };
|
|
|
|
protected:
|
|
ABI ThisABI;
|
|
|
|
public:
|
|
MipsABIInfo(ABI ThisABI) : ThisABI(ThisABI) {}
|
|
|
|
static MipsABIInfo Unknown() { return MipsABIInfo(ABI::Unknown); }
|
|
static MipsABIInfo O32() { return MipsABIInfo(ABI::O32); }
|
|
static MipsABIInfo N32() { return MipsABIInfo(ABI::N32); }
|
|
static MipsABIInfo N64() { return MipsABIInfo(ABI::N64); }
|
|
static MipsABIInfo EABI() { return MipsABIInfo(ABI::EABI); }
|
|
|
|
bool IsKnown() const { return ThisABI != ABI::Unknown; }
|
|
bool IsO32() const { return ThisABI == ABI::O32; }
|
|
bool IsN32() const { return ThisABI == ABI::N32; }
|
|
bool IsN64() const { return ThisABI == ABI::N64; }
|
|
bool IsEABI() const { return ThisABI == ABI::EABI; }
|
|
ABI GetEnumValue() const { return ThisABI; }
|
|
|
|
const ArrayRef<MCPhysReg> GetByValArgRegs() const;
|
|
|
|
/// Ordering of ABI's
|
|
/// MipsGenSubtargetInfo.inc will use this to resolve conflicts when given
|
|
/// multiple ABI options.
|
|
bool operator<(const MipsABIInfo Other) const {
|
|
return ThisABI < Other.GetEnumValue();
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif
|