mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
add support for the sparcv9-*-* target triple to turn on
64-bit sparc codegen. Patch by Nathan Keynes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -15,29 +15,20 @@
|
||||
#include "SparcGenSubtarget.inc"
|
||||
using namespace llvm;
|
||||
|
||||
// FIXME: temporary.
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
namespace {
|
||||
cl::opt<bool> EnableV9("enable-sparc-v9-insts", cl::Hidden,
|
||||
cl::desc("Enable V9 instructions in the V8 target"));
|
||||
}
|
||||
|
||||
SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &FS) {
|
||||
// Set the default features.
|
||||
IsV9 = false;
|
||||
V8DeprecatedInsts = false;
|
||||
IsVIS = false;
|
||||
SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &FS,
|
||||
bool is64Bit) :
|
||||
IsV9(false),
|
||||
V8DeprecatedInsts(false),
|
||||
IsVIS(false),
|
||||
Is64Bit(is64Bit) {
|
||||
|
||||
// Determine default and user specified characteristics
|
||||
std::string CPU = "generic";
|
||||
const char *CPU = "v8";
|
||||
if (is64Bit) {
|
||||
CPU = "v9";
|
||||
IsV9 = true;
|
||||
}
|
||||
|
||||
// FIXME: autodetect host here!
|
||||
CPU = "v9"; // What is a good way to detect V9?
|
||||
|
||||
// Parse features string.
|
||||
ParseSubtargetFeatures(FS, CPU);
|
||||
|
||||
// Unless explicitly enabled, disable the V9 instructions.
|
||||
if (!EnableV9)
|
||||
IsV9 = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user