1 //===- SparcV8Subtarget.cpp - SPARC Subtarget Information -----------------===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Chris Lattner and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the SPARC specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #include "SparcV8Subtarget.h"
15 #include "SparcV8GenSubtarget.inc"
19 #include "llvm/Support/CommandLine.h"
21 cl::opt<bool> EnableV9("enable-sparc-v9-insts", cl::Hidden,
22 cl::desc("Enable V9 instructions in the V8 target"));
25 SparcV8Subtarget::SparcV8Subtarget(const Module &M, const std::string &FS) {
26 // Set the default features.
28 V8DeprecatedInsts = false;
31 // Determine default and user specified characteristics
32 std::string CPU = "generic";
34 // FIXME: autodetect host here!
35 CPU = "v9"; // What is a good way to detect V9?
37 // Parse features string.
38 ParseSubtargetFeatures(FS, CPU);
40 // Unless explicitly enabled, disable the V9 instructions.