diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp | 6 | ||||
-rw-r--r-- | llvm/test/MC/Sparc/sparc-directives.s | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp b/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp index 37410c9dcd8..59a7394d68c 100644 --- a/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp +++ b/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp @@ -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; diff --git a/llvm/test/MC/Sparc/sparc-directives.s b/llvm/test/MC/Sparc/sparc-directives.s index 9185e4bc9b2..d804c1afe9b 100644 --- a/llvm/test/MC/Sparc/sparc-directives.s +++ b/llvm/test/MC/Sparc/sparc-directives.s @@ -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 |