mirror of
				https://git.proxmox.com/git/llvm-toolchain
				synced 2025-11-04 07:14:33 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
Index: llvm-toolchain-snapshot_3.5~svn205090/clang/lib/Basic/Targets.cpp
 | 
						|
===================================================================
 | 
						|
--- llvm-toolchain-snapshot_3.5~svn205090.orig/clang/lib/Basic/Targets.cpp	2014-03-29 12:15:16.884486206 +0100
 | 
						|
+++ llvm-toolchain-snapshot_3.5~svn205090/clang/lib/Basic/Targets.cpp	2014-03-29 12:15:16.884486206 +0100
 | 
						|
@@ -3843,33 +3843,6 @@
 | 
						|
     // FIXME: Override "preferred align" for double and long long.
 | 
						|
   }
 | 
						|
 
 | 
						|
-  static bool shouldUseInlineAtomic(const llvm::Triple &T) {
 | 
						|
-    // On linux, binaries targeting old cpus call functions in libgcc to
 | 
						|
-    // perform atomic operations. The implementation in libgcc then calls into
 | 
						|
-    // the kernel which on armv6 and newer uses ldrex and strex. The net result
 | 
						|
-    // is that if we assume the kernel is at least as recent as the hardware,
 | 
						|
-    // it is safe to use atomic instructions on armv6 and newer.
 | 
						|
-    if (T.getOS() != llvm::Triple::Linux)
 | 
						|
-     return false;
 | 
						|
-    StringRef ArchName = T.getArchName();
 | 
						|
-    if (T.getArch() == llvm::Triple::arm) {
 | 
						|
-      if (!ArchName.startswith("armv"))
 | 
						|
-        return false;
 | 
						|
-      StringRef VersionStr = ArchName.substr(4);
 | 
						|
-      unsigned Version;
 | 
						|
-      if (VersionStr.getAsInteger(10, Version))
 | 
						|
-        return false;
 | 
						|
-      return Version >= 6;
 | 
						|
-    }
 | 
						|
-    assert(T.getArch() == llvm::Triple::thumb);
 | 
						|
-    if (!ArchName.startswith("thumbv"))
 | 
						|
-      return false;
 | 
						|
-    StringRef VersionStr = ArchName.substr(6);
 | 
						|
-    unsigned Version;
 | 
						|
-    if (VersionStr.getAsInteger(10, Version))
 | 
						|
-      return false;
 | 
						|
-    return Version >= 7;
 | 
						|
-  }
 | 
						|
 
 | 
						|
 public:
 | 
						|
   ARMTargetInfo(const llvm::Triple &Triple, bool IsBigEndian)
 |