mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	This patch provides basic support for powerpc64le as an LLVM target. However, use of this target will not actually generate little-endian code. Instead, use of the target will cause the correct little-endian built-in defines to be generated, so that code that tests for __LITTLE_ENDIAN__, for example, will be correctly parsed for syntax-only testing. Code generation will otherwise be the same as powerpc64 (big-endian), for now. The patch leaves open the possibility of creating a little-endian PowerPC64 back end, but there is no immediate intent to create such a thing. The LLVM portions of this patch simply add ppc64le coverage everywhere that ppc64 coverage currently exists. There is nothing of any import worth testing until such time as little-endian code generation is implemented. In the corresponding Clang patch, there is a new test case variant to ensure that correct built-in defines for little-endian code are generated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187179 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			27 lines
		
	
	
		
			876 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			876 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| //===-- PowerPCTargetInfo.cpp - PowerPC Target Implementation -------------===//
 | |
| //
 | |
| //                     The LLVM Compiler Infrastructure
 | |
| //
 | |
| // This file is distributed under the University of Illinois Open Source
 | |
| // License. See LICENSE.TXT for details.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #include "PPC.h"
 | |
| #include "llvm/IR/Module.h"
 | |
| #include "llvm/Support/TargetRegistry.h"
 | |
| using namespace llvm;
 | |
| 
 | |
| Target llvm::ThePPC32Target, llvm::ThePPC64Target, llvm::ThePPC64LETarget;
 | |
| 
 | |
| extern "C" void LLVMInitializePowerPCTargetInfo() { 
 | |
|   RegisterTarget<Triple::ppc, /*HasJIT=*/true>
 | |
|     X(ThePPC32Target, "ppc32", "PowerPC 32");
 | |
| 
 | |
|   RegisterTarget<Triple::ppc64, /*HasJIT=*/true>
 | |
|     Y(ThePPC64Target, "ppc64", "PowerPC 64");
 | |
| 
 | |
|   RegisterTarget<Triple::ppc64le, /*HasJIT=*/true>
 | |
|     Z(ThePPC64LETarget, "ppc64le", "PowerPC 64 LE");
 | |
| }
 |