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:
|
public:
|
||||||
WDC65816TargetInfo(const llvm::Triple &Triple) : TargetInfo(Triple) {
|
WDC65816TargetInfo(const llvm::Triple &Triple) : TargetInfo(Triple) {
|
||||||
BigEndian = false;
|
BigEndian = false;
|
||||||
NoAsmVariants = true;
|
TLSSupported = false;
|
||||||
LongLongAlign = 8;
|
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;
|
SuitableAlign = 8;
|
||||||
DoubleAlign = LongDoubleAlign = 8;
|
|
||||||
|
NoAsmVariants = true;
|
||||||
|
|
||||||
SizeType = UnsignedLong;
|
SizeType = UnsignedLong;
|
||||||
PtrDiffType = SignedLong;
|
PtrDiffType = SignedLong;
|
||||||
IntPtrType = UnsignedLong;
|
IntPtrType = SignedLong;
|
||||||
WCharType = UnsignedChar;
|
WCharType = UnsignedChar;
|
||||||
WIntType = UnsignedInt;
|
WIntType = UnsignedInt;
|
||||||
UseZeroLengthBitfieldAlignment = true;
|
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
|
// MIPS ABI Implementation. This works for both little-endian and
|
||||||
// big-endian variants.
|
// big-endian variants.
|
||||||
|
@ -5564,6 +5586,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
|
||||||
|
|
||||||
case llvm::Triple::msp430:
|
case llvm::Triple::msp430:
|
||||||
return *(TheTargetCodeGenInfo = new MSP430TargetCodeGenInfo(Types));
|
return *(TheTargetCodeGenInfo = new MSP430TargetCodeGenInfo(Types));
|
||||||
|
|
||||||
|
case llvm::Triple::wdc65816:
|
||||||
|
return *(TheTargetCodeGenInfo = new WDC65816TargetCodeGenInfo(Types));
|
||||||
|
|
||||||
case llvm::Triple::systemz:
|
case llvm::Triple::systemz:
|
||||||
return *(TheTargetCodeGenInfo = new SystemZTargetCodeGenInfo(Types));
|
return *(TheTargetCodeGenInfo = new SystemZTargetCodeGenInfo(Types));
|
||||||
|
|
Loading…
Reference in New Issue