Add predefined macros to identify x86_64h architectures.
Patch by Jim Grosbach. llvm-svn: 215260
This commit is contained in:
		
							parent
							
								
									7400e596a3
								
							
						
					
					
						commit
						a2acb1e84e
					
				| 
						 | 
				
			
			@ -2668,6 +2668,10 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
 | 
			
		|||
    Builder.defineMacro("__amd64");
 | 
			
		||||
    Builder.defineMacro("__x86_64");
 | 
			
		||||
    Builder.defineMacro("__x86_64__");
 | 
			
		||||
    if (getTriple().getArchName() == "x86_64h") {
 | 
			
		||||
      Builder.defineMacro("__x86_64h");
 | 
			
		||||
      Builder.defineMacro("__x86_64h__");
 | 
			
		||||
    }
 | 
			
		||||
  } else {
 | 
			
		||||
    DefineStd(Builder, "i386", Opts);
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6230,6 +6230,13 @@
 | 
			
		|||
// X86_64:#define __x86_64 1
 | 
			
		||||
// X86_64:#define __x86_64__ 1
 | 
			
		||||
//
 | 
			
		||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64h-none-none < /dev/null | FileCheck -check-prefix X86_64H %s
 | 
			
		||||
//
 | 
			
		||||
// X86_64H:#define __x86_64 1
 | 
			
		||||
// X86_64H:#define __x86_64__ 1
 | 
			
		||||
// X86_64H:#define __x86_64h 1
 | 
			
		||||
// X86_64H:#define __x86_64h__ 1
 | 
			
		||||
 | 
			
		||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-none-none-gnux32 < /dev/null | FileCheck -check-prefix X32 %s
 | 
			
		||||
//
 | 
			
		||||
// X32:#define _ILP32 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue