OSDN Git Service

factorize darwin ProtectedDirective and SetDirective.
authorChris Lattner <sabre@nondot.org>
Tue, 11 Aug 2009 22:22:44 +0000 (22:22 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 11 Aug 2009 22:22:44 +0000 (22:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78732 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMTargetAsmInfo.cpp
lib/Target/DarwinTargetAsmInfo.cpp
lib/Target/PowerPC/PPCTargetAsmInfo.cpp
lib/Target/X86/X86TargetAsmInfo.cpp

index 4d9e165..c9c81dc 100644 (file)
@@ -50,8 +50,6 @@ ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo() {
   InlineAsmEnd = "@ InlineAsm End";
   
   
-  SetDirective = "\t.set\t";
-  ProtectedDirective = NULL;
   HasDotTypeDotSizeDirective = false;
   SupportsDebugInformation = true;
 
index 533085a..7221624 100644 (file)
@@ -38,6 +38,8 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo() {
   LCOMMDirective = "\t.lcomm\t";
   ZeroDirective = "\t.space\t";  // ".space N" emits N zeros.
   ZeroFillDirective = "\t.zerofill\t";  // Uses .zerofill
+  SetDirective = "\t.set";
+  ProtectedDirective = "\t.globl\t";
 
   // _foo.eh symbols are currently always exported so that the linker knows
   // about them.  This is not necessary on 10.6 and later, but it
index e20fd4e..4f69f7e 100644 (file)
@@ -31,8 +31,8 @@ PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) {
   const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>();
   bool isPPC64 = Subtarget->isPPC64();
   
-  SetDirective = "\t.set";
-  Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
+  if (!isPPC64)
+    Data64bitsDirective = 0;      // we can't emit a 64-bit unit
   AlignmentIsInBytes = false;
   LCOMMDirective = "\t.lcomm\t";
   InlineAsmStart = "# InlineAsm Start";
index e7f84be..53533ac 100644 (file)
@@ -66,7 +66,6 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM) {
   InlineAsmStart = "## InlineAsm Start";
   InlineAsmEnd = "## InlineAsm End";
   CommentString = "##";
-  SetDirective = "\t.set";
   PCSymbol = ".";
   UsedDirective = "\t.no_dead_strip\t";
   ProtectedDirective = "\t.globl\t";