mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Added AArch64 support
This commit is contained in:
parent
3c153d27d2
commit
8c18d56c9e
6 changed files with 48 additions and 6 deletions
|
@ -3953,7 +3953,7 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName, const BfCodeGen
|
|||
const llvm::Target *theTarget = llvm::TargetRegistry::lookupTarget(arch.c_str(), theTriple, Error);
|
||||
if (!theTarget)
|
||||
{
|
||||
OutputDebugStrF("Failed to create LLVM Target: %s", Error.c_str());
|
||||
Fail(StrFormat("Failed to create LLVM Target: %s", Error.c_str()));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4057,6 +4057,7 @@ bool BfIRCodeGen::WriteObjectFile(const StringImpl& outFileName, const BfCodeGen
|
|||
//TargetMachine::CGFT_AssemblyFile,
|
||||
noVerify /*, StartAfterID, StopAfterID*/))
|
||||
{
|
||||
Fail("Target does not support generation of this file type");
|
||||
/*errs() << argv[0] << ": target does not support generation of this"
|
||||
<< " file type!\n";*/
|
||||
return false;
|
||||
|
@ -4137,3 +4138,33 @@ int BF_LinuxFixLinkage()
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//#include "aarch64/Disassembler/X86DisassemblerDecoder.h"
|
||||
//#include "X86/MCTargetDesc/X86MCTargetDesc.h"
|
||||
//#include "X86/MCTargetDesc/X86BaseInfo.h"
|
||||
//#include "X86InstrInfo.h"
|
||||
|
||||
#ifdef BF_PLATFORM_MACOS
|
||||
#include "AArch64/MCTargetDesc/AArch64MCTargetDesc.h"
|
||||
//#include "AArch64/MCTargetDesc/AArch64BaseInfo.h"
|
||||
//#include "../X86InstrInfo.h"
|
||||
|
||||
int BF_AARC64_Linkage()
|
||||
{
|
||||
LLVMInitializeAArch64TargetInfo();
|
||||
LLVMInitializeAArch64Target();
|
||||
LLVMInitializeAArch64TargetMC();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void BfIRCodeGen::StaticInit()
|
||||
{
|
||||
LLVMInitializeX86TargetInfo();
|
||||
LLVMInitializeX86Target();
|
||||
LLVMInitializeX86TargetMC();
|
||||
|
||||
LLVMInitializeAArch64TargetInfo();
|
||||
LLVMInitializeAArch64Target();
|
||||
LLVMInitializeAArch64TargetMC();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue