Adjust the target and ABI info for WDC65816 in clang.
This commit is contained in:
parent
5d8601e987
commit
e7deb74a84
|
@ -5542,13 +5542,20 @@ namespace {
|
|||
public:
|
||||
WDC65816TargetInfo(const llvm::Triple &Triple) : TargetInfo(Triple) {
|
||||
BigEndian = false;
|
||||
NoAsmVariants = true;
|
||||
LongLongAlign = 8;
|
||||
TLSSupported = false;
|
||||
PointerWidth = 32; PointerAlign = 8;
|
||||
IntWidth = 16; IntAlign = 8;
|
||||
FloatWidth = 32; FloatAlign = 8;
|
||||
DoubleWidth = 64; DoubleAlign = 8;
|
||||
LongWidth = 32; LongAlign = 8;
|
||||
LongLongWidth = 64; LongLongAlign = 8;
|
||||
SuitableAlign = 8;
|
||||
DoubleAlign = LongDoubleAlign = 8;
|
||||
|
||||
NoAsmVariants = true;
|
||||
|
||||
SizeType = UnsignedLong;
|
||||
PtrDiffType = SignedLong;
|
||||
IntPtrType = UnsignedLong;
|
||||
IntPtrType = SignedLong;
|
||||
WCharType = UnsignedChar;
|
||||
WIntType = UnsignedInt;
|
||||
UseZeroLengthBitfieldAlignment = true;
|
||||
|
|
|
@ -4642,6 +4642,28 @@ void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
|
|||
}
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// WDC65816 ABI Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
namespace {
|
||||
|
||||
class WDC65816TargetCodeGenInfo : public TargetCodeGenInfo {
|
||||
public:
|
||||
WDC65816TargetCodeGenInfo(CodeGenTypes &CGT)
|
||||
: TargetCodeGenInfo(new DefaultABIInfo(CGT)) {}
|
||||
void SetTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
|
||||
CodeGen::CodeGenModule &M) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
void WDC65816TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
|
||||
llvm::GlobalValue *GV,
|
||||
CodeGen::CodeGenModule &M) const {
|
||||
// WDC_TODO - Do I need anything here?
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// MIPS ABI Implementation. This works for both little-endian and
|
||||
// big-endian variants.
|
||||
|
@ -5564,6 +5586,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
|
|||
|
||||
case llvm::Triple::msp430:
|
||||
return *(TheTargetCodeGenInfo = new MSP430TargetCodeGenInfo(Types));
|
||||
|
||||
case llvm::Triple::wdc65816:
|
||||
return *(TheTargetCodeGenInfo = new WDC65816TargetCodeGenInfo(Types));
|
||||
|
||||
case llvm::Triple::systemz:
|
||||
return *(TheTargetCodeGenInfo = new SystemZTargetCodeGenInfo(Types));
|
||||
|
|
Loading…
Reference in New Issue