[llvm] r264579 - Sparc: silently ignore .proc assembler directive
Douglas Katzman via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 07:00:11 PDT 2016
Author: dougk
Date: Mon Mar 28 09:00:11 2016
New Revision: 264579
URL: http://llvm.org/viewvc/llvm-project?rev=264579&view=rev
Log:
Sparc: silently ignore .proc assembler directive
Differential Revision: http://reviews.llvm.org/D18463
Modified:
llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
llvm/trunk/test/MC/Sparc/sparc-directives.s
Modified: llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp?rev=264579&r1=264578&r2=264579&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp Mon Mar 28 09:00:11 2016
@@ -684,6 +684,12 @@ ParseDirective(AsmToken DirectiveID)
Parser.eatToEndOfStatement();
return false;
}
+ if (IDVal == ".proc") {
+ // For compatibility, ignore this directive.
+ // (It's supposed to be an "optimization" in the Sun assembler)
+ Parser.eatToEndOfStatement();
+ return false;
+ }
// Let the MC layer to handle other directives.
return true;
Modified: llvm/trunk/test/MC/Sparc/sparc-directives.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Sparc/sparc-directives.s?rev=264579&r1=264578&r2=264579&view=diff
==============================================================================
--- llvm/trunk/test/MC/Sparc/sparc-directives.s (original)
+++ llvm/trunk/test/MC/Sparc/sparc-directives.s Mon Mar 28 09:00:11 2016
@@ -1,6 +1,10 @@
! RUN: llvm-mc %s -arch=sparc -show-encoding | FileCheck %s --check-prefix=SPARC32
! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s --check-prefix=SPARC64
+ ! '.proc' is documented to do nothing in the binutils assembler.
+ ! so it should do nothing for clang either, i.e. not be an error.
+ .proc 1
+
! SPARC32: .byte 24
! SPARC64: .byte 24
.byte 24
More information about the llvm-commits
mailing list