mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-14 09:26:22 +00:00

to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
62 lines
2.1 KiB
C++
62 lines
2.1 KiB
C++
//===-- MSP430Subtarget.cpp - MSP430 Subtarget Information ----------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file implements the MSP430 specific subclass of TargetSubtargetInfo.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "MSP430Subtarget.h"
|
|
#include "MSP430.h"
|
|
#include "llvm/Support/TargetRegistry.h"
|
|
|
|
using namespace llvm;
|
|
|
|
#define DEBUG_TYPE "msp430-subtarget"
|
|
|
|
static cl::opt<MSP430Subtarget::HWMultEnum>
|
|
HWMultModeOption("mhwmult", cl::Hidden,
|
|
cl::desc("Hardware multiplier use mode for MSP430"),
|
|
cl::init(MSP430Subtarget::NoHWMult),
|
|
cl::values(
|
|
clEnumValN(MSP430Subtarget::NoHWMult, "none",
|
|
"Do not use hardware multiplier"),
|
|
clEnumValN(MSP430Subtarget::HWMult16, "16bit",
|
|
"Use 16-bit hardware multiplier"),
|
|
clEnumValN(MSP430Subtarget::HWMult32, "32bit",
|
|
"Use 32-bit hardware multiplier"),
|
|
clEnumValN(MSP430Subtarget::HWMultF5, "f5series",
|
|
"Use F5 series hardware multiplier")));
|
|
|
|
#define GET_SUBTARGETINFO_TARGET_DESC
|
|
#define GET_SUBTARGETINFO_CTOR
|
|
#include "MSP430GenSubtargetInfo.inc"
|
|
|
|
void MSP430Subtarget::anchor() { }
|
|
|
|
MSP430Subtarget &
|
|
MSP430Subtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) {
|
|
ExtendedInsts = false;
|
|
HWMultMode = NoHWMult;
|
|
|
|
std::string CPUName = CPU;
|
|
if (CPUName.empty())
|
|
CPUName = "msp430";
|
|
|
|
ParseSubtargetFeatures(CPUName, FS);
|
|
|
|
if (HWMultModeOption != NoHWMult)
|
|
HWMultMode = HWMultModeOption;
|
|
|
|
return *this;
|
|
}
|
|
|
|
MSP430Subtarget::MSP430Subtarget(const Triple &TT, const std::string &CPU,
|
|
const std::string &FS, const TargetMachine &TM)
|
|
: MSP430GenSubtargetInfo(TT, CPU, FS), FrameLowering(),
|
|
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this) {}
|