[PATCH] D85415: [Sparc] Don't use SunStyleELFSectionSwitchSyntax

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 04:00:10 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd9993484ee40: [Sparc] Don't use SunStyleELFSectionSwitchSyntax (authored by ro).

Changed prior to commit:
  https://reviews.llvm.org/D85415?vs=283539&id=453252#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85415/new/

https://reviews.llvm.org/D85415

Files:
  llvm/lib/MC/MCParser/ELFAsmParser.cpp
  llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
  llvm/test/CodeGen/SPARC/2008-10-10-InlineAsmRegOperand.ll
  llvm/test/CodeGen/SPARC/constructor.ll


Index: llvm/test/CodeGen/SPARC/constructor.ll
===================================================================
--- llvm/test/CodeGen/SPARC/constructor.ll
+++ llvm/test/CodeGen/SPARC/constructor.ll
@@ -14,16 +14,16 @@
   ret void
 }
 
-; CTOR:      .section      .ctors,#alloc,#write
+; CTOR:      .section      .ctors,"aw"
 ; CTOR-NEXT: .p2align      2
 ; CTOR-NEXT: .word  f
-; CTOR-NEXT: .section      .ctors.65520,#alloc,#write
+; CTOR-NEXT: .section      .ctors.65520,"aGw"
 ; CTOR-NEXT: .p2align      2
 ; CTOR-NEXT: .word  g
 
-; INIT-ARRAY:    .section  .init_array.15,#alloc,#write
+; INIT-ARRAY:    .section  .init_array.15,"aGw"
 ; INIT-ARRAY-NEXT: .p2align  2
 ; INIT-ARRAY-NEXT: .word g
-; INIT-ARRAY-NEXT: .section  .init_array,#alloc,#write
+; INIT-ARRAY-NEXT: .section  .init_array,"aw"
 ; INIT-ARRAY-NEXT: .p2align  2
 ; INIT-ARRAY-NEXT: .word f
Index: llvm/test/CodeGen/SPARC/2008-10-10-InlineAsmRegOperand.ll
===================================================================
--- llvm/test/CodeGen/SPARC/2008-10-10-InlineAsmRegOperand.ll
+++ llvm/test/CodeGen/SPARC/2008-10-10-InlineAsmRegOperand.ll
@@ -2,8 +2,8 @@
 ; PR 1557
 
 target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-f128:128:128"
-module asm "\09.section\09\22.ctors\22,#alloc,#write"
-module asm "\09.section\09\22.dtors\22,#alloc,#write"
+module asm "\09.section\09.ctors,\22aw\22"
+module asm "\09.section\09.dtors,\22aw\22"
 
 define void @frame_dummy() nounwind {
 entry:
Index: llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
===================================================================
--- llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
+++ llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
@@ -40,7 +40,6 @@
 
   ExceptionsType = ExceptionHandling::DwarfCFI;
 
-  SunStyleELFSectionSwitchSyntax = true;
   UsesELFSectionDirectiveForBSS = true;
 }
 
Index: llvm/lib/MC/MCParser/ELFAsmParser.cpp
===================================================================
--- llvm/lib/MC/MCParser/ELFAsmParser.cpp
+++ llvm/lib/MC/MCParser/ELFAsmParser.cpp
@@ -566,8 +566,7 @@
     }
 
     if (getLexer().isNot(AsmToken::String)) {
-      if (!getContext().getAsmInfo()->usesSunStyleELFSectionSwitchSyntax()
-          || getLexer().isNot(AsmToken::Hash))
+      if (getLexer().isNot(AsmToken::Hash))
         return TokError("expected string in directive");
       extraFlags = parseSunStyleSectionFlags();
     } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85415.453252.patch
Type: text/x-patch
Size: 2509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220817/5a5d87c7/attachment.bin>


More information about the llvm-commits mailing list