summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-04 03:21:47 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-04 03:21:47 +0000
commit1c8ac8f027d4a7af830e91513f37a2139c684f19 (patch)
tree55a7d4f84240669759d3fbb0f15e301960e720fb /llvm/lib/Target/X86
parent4fb115d2f3e353f1c3fdba2a2e060c5d7dfb9f40 (diff)
downloadbcm5719-llvm-1c8ac8f027d4a7af830e91513f37a2139c684f19.tar.gz
bcm5719-llvm-1c8ac8f027d4a7af830e91513f37a2139c684f19.zip
There are two reasons why we might want to use
foo = a - b .long foo instead of just .long a - b First, on darwin9 64 bits the assembler produces the wrong result. Second, if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not consider a - b to be a constant but will if the dummy foo is created. Split how we handle these cases. The first one is something MC should take care of. The second one has to be handled by the caller. llvm-svn: 120889
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/X86MCAsmInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86MCAsmInfo.cpp b/llvm/lib/Target/X86/X86MCAsmInfo.cpp
index f45fdf5a3fb..1ac2d7e6c6d 100644
--- a/llvm/lib/Target/X86/X86MCAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86MCAsmInfo.cpp
@@ -56,6 +56,10 @@ X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &Triple) {
if (!is64Bit)
Data64bitsDirective = 0; // we can't emit a 64-bit unit
+ // FIXME: Darwin 10 doesn't need this.
+ if (is64Bit)
+ NeedsSetToChangeDiffSize = true;
+
// Use ## as a comment string so that .s files generated by llvm can go
// through the GCC preprocessor without causing an error. This is needed
// because "clang foo.s" runs the C preprocessor, which is usually reserved
OpenPOWER on IntegriCloud