OSDN Git Service

__i386__, __i386, etc. are not defined for x86-64. Use __x86_64__.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 20 Jun 2006 22:11:12 +0000 (22:11 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 20 Jun 2006 22:11:12 +0000 (22:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28881 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index 692232b..7fdc060 100644 (file)
@@ -937,7 +937,8 @@ static void generateCompilerSpecificCode(std::ostream& Out) {
   Out << "#define CODE_FOR_MAIN() /* Any target-specific code for main()*/\n";
   // On X86, set the FP control word to 64-bits of precision instead of 80 bits.
   Out << "#if defined(__GNUC__) && !defined(__llvm__)\n"
-      << "#if defined(i386) || defined(__i386__) || defined(__i386)\n"
+      << "#if defined(i386) || defined(__i386__) || defined(__i386) || "
+      << "defined(__x86_64__)\n"
       << "#undef CODE_FOR_MAIN\n"
       << "#define CODE_FOR_MAIN() \\\n"
       << "  {short F;__asm__ (\"fnstcw %0\" : \"=m\" (*&F)); \\\n"
index 692232b..7fdc060 100644 (file)
@@ -937,7 +937,8 @@ static void generateCompilerSpecificCode(std::ostream& Out) {
   Out << "#define CODE_FOR_MAIN() /* Any target-specific code for main()*/\n";
   // On X86, set the FP control word to 64-bits of precision instead of 80 bits.
   Out << "#if defined(__GNUC__) && !defined(__llvm__)\n"
-      << "#if defined(i386) || defined(__i386__) || defined(__i386)\n"
+      << "#if defined(i386) || defined(__i386__) || defined(__i386) || "
+      << "defined(__x86_64__)\n"
       << "#undef CODE_FOR_MAIN\n"
       << "#define CODE_FOR_MAIN() \\\n"
       << "  {short F;__asm__ (\"fnstcw %0\" : \"=m\" (*&F)); \\\n"