2006-02-05 05:50:24 +00:00
|
|
|
//===- SparcSubtarget.cpp - SPARC Subtarget Information -------------------===//
|
2006-01-26 06:51:21 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-01-26 06:51:21 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements the SPARC specific subclass of TargetSubtarget.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
#include "SparcSubtarget.h"
|
2011-07-01 20:45:01 +00:00
|
|
|
|
|
|
|
#define GET_SUBTARGETINFO_CTOR
|
|
|
|
#define GET_SUBTARGETINFO_MC_DESC
|
|
|
|
#define GET_SUBTARGETINFO_TARGET_DESC
|
2006-02-05 05:50:24 +00:00
|
|
|
#include "SparcGenSubtarget.inc"
|
2011-07-01 20:45:01 +00:00
|
|
|
|
2006-01-26 06:51:21 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2011-06-30 01:53:36 +00:00
|
|
|
SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &CPU,
|
|
|
|
const std::string &FS, bool is64Bit) :
|
2011-07-01 20:45:01 +00:00
|
|
|
SparcGenSubtargetInfo(),
|
2010-02-04 06:34:01 +00:00
|
|
|
IsV9(false),
|
|
|
|
V8DeprecatedInsts(false),
|
|
|
|
IsVIS(false),
|
|
|
|
Is64Bit(is64Bit) {
|
2006-01-27 22:38:36 +00:00
|
|
|
|
2006-01-26 06:51:21 +00:00
|
|
|
// Determine default and user specified characteristics
|
2011-06-30 01:53:36 +00:00
|
|
|
std::string CPUName = CPU;
|
|
|
|
if (CPUName.empty()) {
|
|
|
|
if (is64Bit)
|
|
|
|
CPUName = "v9";
|
|
|
|
else
|
|
|
|
CPUName = "v8";
|
2010-02-04 06:34:01 +00:00
|
|
|
}
|
2011-06-30 01:53:36 +00:00
|
|
|
IsV9 = CPUName == "v9";
|
2006-01-26 06:51:21 +00:00
|
|
|
|
|
|
|
// Parse features string.
|
2011-06-30 01:53:36 +00:00
|
|
|
ParseSubtargetFeatures(FS, CPUName);
|
2006-05-24 17:04:05 +00:00
|
|
|
}
|