Chris Lattner | 7c90f73 | 2006-02-05 05:50:24 +0000 | [diff] [blame] | 1 | //===- SparcSubtarget.cpp - SPARC Subtarget Information -------------------===// |
Chris Lattner | 0d170a7 | 2006-01-26 06:51:21 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Chris Lattner | 0d170a7 | 2006-01-26 06:51:21 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file implements the SPARC specific subclass of TargetSubtarget. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
Chris Lattner | 7c90f73 | 2006-02-05 05:50:24 +0000 | [diff] [blame] | 14 | #include "SparcSubtarget.h" |
| 15 | #include "SparcGenSubtarget.inc" |
Chris Lattner | 0d170a7 | 2006-01-26 06:51:21 +0000 | [diff] [blame] | 16 | using namespace llvm; |
| 17 | |
Chris Lattner | 87c06d6 | 2010-02-04 06:34:01 +0000 | [diff] [blame] | 18 | SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &FS, |
| 19 | bool is64Bit) : |
| 20 | IsV9(false), |
| 21 | V8DeprecatedInsts(false), |
| 22 | IsVIS(false), |
| 23 | Is64Bit(is64Bit) { |
Chris Lattner | 184cc4a | 2006-01-27 22:38:36 +0000 | [diff] [blame] | 24 | |
Chris Lattner | 0d170a7 | 2006-01-26 06:51:21 +0000 | [diff] [blame] | 25 | // Determine default and user specified characteristics |
Chris Lattner | 87c06d6 | 2010-02-04 06:34:01 +0000 | [diff] [blame] | 26 | const char *CPU = "v8"; |
| 27 | if (is64Bit) { |
| 28 | CPU = "v9"; |
| 29 | IsV9 = true; |
| 30 | } |
Chris Lattner | 0d170a7 | 2006-01-26 06:51:21 +0000 | [diff] [blame] | 31 | |
Chris Lattner | 0d170a7 | 2006-01-26 06:51:21 +0000 | [diff] [blame] | 32 | // Parse features string. |
| 33 | ParseSubtargetFeatures(FS, CPU); |
Chris Lattner | d74ea2b | 2006-05-24 17:04:05 +0000 | [diff] [blame] | 34 | } |