1 //===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Andrew Lenharth and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the Alpha specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #include "AlphaSubtarget.h"
16 #include "llvm/Module.h"
17 #include "llvm/Support/CommandLine.h"
18 #include "llvm/Target/SubtargetFeature.h"
19 #include "AlphaGenSubtarget.inc"
24 FeatureKVSize = sizeof(FeatureKV) / sizeof(SubtargetFeatureKV),
25 SubTypeKVSize = sizeof(SubTypeKV) / sizeof(SubtargetFeatureKV)
28 AlphaSubtarget::AlphaSubtarget(const Module &M, const std::string &FS)
29 : HasF2I(false), HasCT(false) {
30 std::string CPU = "generic";
32 SubtargetFeatures::Parse(FS, CPU,
33 SubTypeKV, SubTypeKVSize,
34 FeatureKV, FeatureKVSize);
35 HasF2I = (Bits & FeatureFIX) != 0;
36 HasCT = (Bits & FeatureCIX) != 0;