2005-09-30 00:54:56 +02:00
|
|
|
//===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by Andrew Lenharth and is distributed under the
|
|
|
|
// University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements the Alpha specific subclass of TargetSubtarget.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "AlphaSubtarget.h"
|
|
|
|
#include "Alpha.h"
|
2005-10-24 00:15:34 +02:00
|
|
|
#include "AlphaGenSubtarget.inc"
|
2005-09-30 00:54:56 +02:00
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
AlphaSubtarget::AlphaSubtarget(const Module &M, const std::string &FS)
|
2005-10-24 00:15:34 +02:00
|
|
|
: HasF2I(false), HasCT(false) {
|
2005-09-30 22:24:38 +02:00
|
|
|
std::string CPU = "generic";
|
2005-10-25 17:15:28 +02:00
|
|
|
SubtargetFeatures Features(FS);
|
|
|
|
Features.setCPUIfNone(CPU);
|
|
|
|
uint32_t Bits =Features.getBits(SubTypeKV, SubTypeKVSize,
|
|
|
|
FeatureKV, FeatureKVSize);
|
2005-10-24 00:15:34 +02:00
|
|
|
HasF2I = (Bits & FeatureFIX) != 0;
|
|
|
|
HasCT = (Bits & FeatureCIX) != 0;
|
2005-09-30 00:54:56 +02:00
|
|
|
}
|