blob: ce11af1fa842b006e1be55495bd24c5a1c624a8f [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===- SparcSubtarget.cpp - SPARC Subtarget Information -------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the SPARC specific subclass of TargetSubtarget.
11//
12//===----------------------------------------------------------------------===//
13
14#include "SparcSubtarget.h"
15#include "SparcGenSubtarget.inc"
16using namespace llvm;
17
Chris Lattner58957cd2010-02-04 06:34:01 +000018SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &FS,
19 bool is64Bit) :
20 IsV9(false),
21 V8DeprecatedInsts(false),
22 IsVIS(false),
23 Is64Bit(is64Bit) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024
25 // Determine default and user specified characteristics
Chris Lattner58957cd2010-02-04 06:34:01 +000026 const char *CPU = "v8";
27 if (is64Bit) {
28 CPU = "v9";
29 IsV9 = true;
30 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +000031
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032 // Parse features string.
33 ParseSubtargetFeatures(FS, CPU);
Dan Gohmanf17a25c2007-07-18 16:29:46 +000034}