[llvm-commits] [llvm] r134741 - in /llvm/trunk/lib/Target/X86: MCTargetDesc/X86MCTargetDesc.cpp X86Subtarget.cpp

Yatsina, Marina marina.yatsina at intel.com
Sun Jan 29 23:19:58 PST 2012


Hi,
I did not get a confirmation that my previous mail got distributed to the llvm-commits ML.
I wanted to know the status of my patch.

Thank you,
Marina.

-----Original Message-----
From: Yatsina, Marina 
Sent: Wednesday, January 25, 2012 13:57
To: 'llvm-commits at cs.uiuc.edu'
Subject: RE: [llvm-commits] [llvm] r134741 - in /llvm/trunk/lib/Target/X86: MCTargetDesc/X86MCTargetDesc.cpp X86Subtarget.cpp

Hi,

I have found a bug introduced by commit 134741. 
The commit added use of macros that are not defined on Windows and they are causing X86Subtarget to choose "generic" as the CPUName. 

I've opened Bug #11834 on the problem:
http://www.llvm.org/bugs/show_bug.cgi?id=11834


I've also attached a fix to this mail and to the bug opened in bugzilla.

Thank you,
Marina.




-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Evan Cheng
Sent: Saturday, July 09, 2011 00:14
To: llvm-commits at cs.uiuc.edu
Subject: [llvm-commits] [llvm] r134741 - in /llvm/trunk/lib/Target/X86: MCTargetDesc/X86MCTargetDesc.cpp X86Subtarget.cpp

Author: evancheng
Date: Fri Jul  8 16:14:14 2011
New Revision: 134741

URL: http://llvm.org/viewvc/llvm-project?rev=134741&view=rev
Log:
For non-x86 host, used generic as CPU name.

Modified:
    llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
    llvm/trunk/lib/Target/X86/X86Subtarget.cpp

Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp?rev=134741&r1=134740&r2=134741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp Fri Jul  8 16:14:14 2011
@@ -140,8 +140,13 @@
   }
 
   std::string CPUName = CPU;
-  if (CPUName.empty())
+  if (CPUName.empty()) {
+#if defined (__x86_64__) || defined(__i386__)
     CPUName = sys::getHostCPUName();
+#else
+    CPUName = "generic";
+#endif
+  }
 
   if (ArchFS.empty() && CPUName.empty() && hasX86_64())
     // Auto-detect if host is 64-bit capable, it's the default if true.

Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=134741&r1=134740&r2=134741&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Fri Jul  8 16:14:14 2011
@@ -258,12 +258,17 @@
       ArchFS = FS;
   }
 
-  std::string CPUName = CPU;
-  if (CPUName.empty())
-    CPUName = sys::getHostCPUName();
-
   // Determine default and user specified characteristics
-  if (!CPUName.empty() || !ArchFS.empty()) {
+  if (!ArchFS.empty()) {
+    std::string CPUName = CPU;
+    if (CPUName.empty()) {
+#if defined (__x86_64__) || defined(__i386__)
+      CPUName = sys::getHostCPUName();
+#else
+      CPUName = "generic";
+#endif
+    }
+
     // If feature string is not empty, parse features string.
     ParseSubtargetFeatures(CPUName, ArchFS);
     // All X86-64 CPUs also have SSE2, however user might request no SSE via 


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list