delete the fixme too! :)
[oota-llvm.git] / lib / Target / X86 / X86Subtarget.cpp
index 812089546bafe7aa000052bf9989c356d51ecc26..fb76aeb05556a17d4fe5bfc36abbf74a80be3150 100644 (file)
@@ -108,14 +108,7 @@ ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const {
     // normal $non_lazy_ptr stub because this symbol might be resolved late.
     if (!GV->hasHiddenVisibility())  // Non-hidden $non_lazy_ptr reference.
       return X86II::MO_DARWIN_NONLAZY;
-    
-    // If symbol visibility is hidden, we have a stub for common symbol
-    // references and external declarations.
-    if (isDecl || GV->hasCommonLinkage()) {
-      // Hidden $non_lazy_ptr reference.
-      return X86II::MO_DARWIN_HIDDEN_NONLAZY;
-    }
-    
+
     // Otherwise, no stub.
     return X86II::MO_NO_FLAG;
   }
@@ -158,9 +151,8 @@ unsigned X86Subtarget::getSpecialAddressLatency() const {
 
 /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in the
 /// specified arguments.  If we can't run cpuid on the host, return true.
-bool
-X86Subtarget::GetCpuIDAndInfo(unsigned value, unsigned *rEAX,
-                              unsigned *rEBX, unsigned *rECX, unsigned *rEDX) {
+static bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX,
+                            unsigned *rEBX, unsigned *rECX, unsigned *rEDX) {
 #if defined(__x86_64__) || defined(_M_AMD64) || defined (_M_X64)
   #if defined(__GNUC__)
     // gcc doesn't know cpuid would clobber ebx/rbx. Preseve it manually.
@@ -240,7 +232,7 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
   if ((EDX >> 23) & 1) X86SSELevel = MMX;
   if ((EDX >> 25) & 1) X86SSELevel = SSE1;
   if ((EDX >> 26) & 1) X86SSELevel = SSE2;
-  if (ECX & 0x1)         X86SSELevel = SSE3;
+  if (ECX & 0x1)       X86SSELevel = SSE3;
   if ((ECX >> 9)  & 1) X86SSELevel = SSSE3;
   if ((ECX >> 19) & 1) X86SSELevel = SSE41;
   if ((ECX >> 20) & 1) X86SSELevel = SSE42;
@@ -265,7 +257,7 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
   }
 }
 
-const char *X86Subtarget::GetCurrentX86CPU() {
+static const char *GetCurrentX86CPU() {
   unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0;
   if (GetCpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX))
     return "generic";