diff options
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 3 | ||||
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 692232b78e..7fdc06008d 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -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" diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 692232b78e..7fdc06008d 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -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" |