mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 23:48:56 +00:00
Add Android ABI to Mips backend to handle functions returning vectors of four
floats. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162008 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
385401a325
commit
bb2e1b581a
@ -44,6 +44,8 @@ def FeatureN64 : SubtargetFeature<"n64", "MipsABI", "N64",
|
||||
"Enable n64 ABI">;
|
||||
def FeatureEABI : SubtargetFeature<"eabi", "MipsABI", "EABI",
|
||||
"Enable eabi ABI">;
|
||||
def FeatureAndroid : SubtargetFeature<"android", "IsAndroid", "true",
|
||||
"Target is android">;
|
||||
def FeatureVFPU : SubtargetFeature<"vfpu", "HasVFPU",
|
||||
"true", "Enable vector FPU instructions.">;
|
||||
def FeatureSEInReg : SubtargetFeature<"seinreg", "HasSEInReg", "true",
|
||||
|
@ -144,6 +144,17 @@ def RetCC_MipsEABI : CallingConv<[
|
||||
CCIfType<[f64], CCIfSubtarget<"isNotSingleFloat()", CCAssignToReg<[D0]>>>
|
||||
]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Mips Android Calling Convention
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
def RetCC_MipsAndroid : CallingConv<[
|
||||
// f32 are returned in registers F0, F2, F1, F3
|
||||
CCIfType<[f32], CCAssignToReg<[F0, F2, F1, F3]>>,
|
||||
|
||||
CCDelegateTo<RetCC_MipsO32>
|
||||
]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Mips FastCC Calling Convention
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -210,6 +221,7 @@ def RetCC_Mips : CallingConv<[
|
||||
CCIfSubtarget<"isABI_EABI()", CCDelegateTo<RetCC_MipsEABI>>,
|
||||
CCIfSubtarget<"isABI_N32()", CCDelegateTo<RetCC_MipsN>>,
|
||||
CCIfSubtarget<"isABI_N64()", CCDelegateTo<RetCC_MipsN>>,
|
||||
CCIfSubtarget<"isAndroid()", CCDelegateTo<RetCC_MipsAndroid>>,
|
||||
CCDelegateTo<RetCC_MipsO32>
|
||||
]>;
|
||||
|
||||
|
@ -89,6 +89,9 @@ protected:
|
||||
// InMips16 -- can process Mips16 instructions
|
||||
bool InMips16Mode;
|
||||
|
||||
// IsAndroid -- target is android
|
||||
bool IsAndroid;
|
||||
|
||||
InstrItineraryData InstrItins;
|
||||
|
||||
public:
|
||||
@ -128,6 +131,7 @@ public:
|
||||
bool isNotSingleFloat() const { return !IsSingleFloat; }
|
||||
bool hasVFPU() const { return HasVFPU; }
|
||||
bool inMips16Mode() const { return InMips16Mode; }
|
||||
bool isAndroid() const { return IsAndroid; }
|
||||
bool isLinux() const { return IsLinux; }
|
||||
|
||||
bool hasStandardEncoding() const { return !inMips16Mode(); }
|
||||
|
Loading…
Reference in New Issue
Block a user