1 //===- MipsSubtarget.cpp - Mips Subtarget Information -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the Mips specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #include "MipsSubtarget.h"
16 #include "MipsGenSubtarget.inc"
19 MipsSubtarget::MipsSubtarget(const std::string
&TT
, const std::string
&FS
,
21 MipsArchVersion(Mips1
), MipsABI(O32
), IsLittle(little
), IsSingleFloat(false),
22 IsFP64bit(false), IsGP64bit(false), HasVFPU(false), IsLinux(true),
23 HasSEInReg(false), HasCondMov(false), HasMulDivAdd(false), HasMinMax(false),
24 HasSwap(false), HasBitCount(false)
26 std::string CPU
= "mips1";
27 MipsArchVersion
= Mips1
;
29 // Parse features string.
30 ParseSubtargetFeatures(FS
, CPU
);
32 // Is the target system Linux ?
33 if (TT
.find("linux") == std::string::npos
)
36 // When only the target triple is specified and is
37 // a allegrex target, set the features. We also match
38 // big and little endian allegrex cores (dont really
39 // know if a big one exists)
40 if (TT
.find("mipsallegrex") != std::string::npos
||
41 TT
.find("psp") != std::string::npos
) {
44 MipsArchVersion
= Mips2
;
45 HasVFPU
= true; // Enables Allegrex Vector FPU (not supported yet)