blob: cc3a6b11f9359eafcc6328a81f2b489959420f41 [file] [log] [blame]
Andrew Lenharth120ab482005-09-29 22:54:56 +00001//===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
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.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the Alpha specific subclass of TargetSubtarget.
11//
12//===----------------------------------------------------------------------===//
13
14#include "AlphaSubtarget.h"
15#include "Alpha.h"
Chris Lattnered465f52005-10-23 22:15:34 +000016#include "AlphaGenSubtarget.inc"
Andrew Lenharth120ab482005-09-29 22:54:56 +000017using namespace llvm;
18
Andrew Lenharth120ab482005-09-29 22:54:56 +000019AlphaSubtarget::AlphaSubtarget(const Module &M, const std::string &FS)
Chris Lattnered465f52005-10-23 22:15:34 +000020 : HasF2I(false), HasCT(false) {
Andrew Lenharthac35cd22005-09-30 20:24:38 +000021 std::string CPU = "generic";
Jim Laskey34bd5d52005-10-25 15:15:28 +000022 SubtargetFeatures Features(FS);
23 Features.setCPUIfNone(CPU);
24 uint32_t Bits =Features.getBits(SubTypeKV, SubTypeKVSize,
25 FeatureKV, FeatureKVSize);
Chris Lattnered465f52005-10-23 22:15:34 +000026 HasF2I = (Bits & FeatureFIX) != 0;
27 HasCT = (Bits & FeatureCIX) != 0;
Andrew Lenharth120ab482005-09-29 22:54:56 +000028}