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"
|
|
|
|
#include "SparcGenSubtarget.inc"
|
2006-01-26 06:51:21 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2010-02-04 06:34:01 +00:00
|
|
|
SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &FS,
|
|
|
|
bool is64Bit) :
|
|
|
|
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
|
2010-02-04 06:34:01 +00:00
|
|
|
const char *CPU = "v8";
|
|
|
|
if (is64Bit) {
|
|
|
|
CPU = "v9";
|
|
|
|
IsV9 = true;
|
|
|
|
}
|
2006-01-26 06:51:21 +00:00
|
|
|
|
|
|
|
// Parse features string.
|
|
|
|
ParseSubtargetFeatures(FS, CPU);
|
2006-05-24 17:04:05 +00:00
|
|
|
}
|