summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDouglas Katzman <dougk@google.com>2016-03-28 14:00:11 +0000
committerDouglas Katzman <dougk@google.com>2016-03-28 14:00:11 +0000
commitd0c11cf7adb0bd2d9fdaca5eba50cd637c8f5ebc (patch)
tree922ef1b9f58bfaa36489e0da3a0d9f2da26ae653 /llvm
parentfcef3e46172bdb8ef0d9e9d08bdd9bf886c16d3d (diff)
downloadbcm5719-llvm-d0c11cf7adb0bd2d9fdaca5eba50cd637c8f5ebc.tar.gz
bcm5719-llvm-d0c11cf7adb0bd2d9fdaca5eba50cd637c8f5ebc.zip
Sparc: silently ignore .proc assembler directive
Differential Revision: http://reviews.llvm.org/D18463 llvm-svn: 264579
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp6
-rw-r--r--llvm/test/MC/Sparc/sparc-directives.s4
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
OpenPOWER on IntegriCloud