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 "AlphaGenSubtarget.inc"
19 AlphaSubtarget::AlphaSubtarget(const Module &M, const std::string &FS)
20 : HasF2I(false), HasCT(false) {
21 std::string CPU = "generic";
22 SubtargetFeatures Features(FS);
23 Features.setCPUIfNone(CPU);
24 uint32_t Bits =Features.getBits(SubTypeKV, SubTypeKVSize,
25 FeatureKV, FeatureKVSize);
26 HasF2I = (Bits & FeatureFIX) != 0;
27 HasCT = (Bits & FeatureCIX) != 0;