[llvm] ca01a6b - [PowerPC] Parse and ignore .machine ppc64
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 16:50:05 PST 2020
Author: Fangrui Song
Date: 2020-11-02T16:49:57-08:00
New Revision: ca01a6b3aceb74134fed6a177165c040ee2703de
URL: https://github.com/llvm/llvm-project/commit/ca01a6b3aceb74134fed6a177165c040ee2703de
DIFF: https://github.com/llvm/llvm-project/commit/ca01a6b3aceb74134fed6a177165c040ee2703de.diff
LOG: [PowerPC] Parse and ignore .machine ppc64
In the wild, kexec-tools purgatory/arch/ppc64/v2wrap.S and hvcall.S
use this directive.
Added:
Modified:
llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
llvm/test/MC/PowerPC/ppc-machine.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp b/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
index 5d0f93704fc9..458edf71d6c8 100644
--- a/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
+++ b/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
@@ -1737,7 +1737,7 @@ bool PPCAsmParser::ParseDirectiveMachine(SMLoc L) {
// Implement ".machine any" (by doing nothing) for the benefit
// of existing assembler code. Likewise, we can then implement
// ".machine push" and ".machine pop" as no-op.
- if (CPU != "any" && CPU != "push" && CPU != "pop")
+ if (CPU != "any" && CPU != "push" && CPU != "pop" && CPU != "ppc64")
return TokError("unrecognized machine type");
Parser.Lex();
diff --git a/llvm/test/MC/PowerPC/ppc-machine.s b/llvm/test/MC/PowerPC/ppc-machine.s
index 119fde6f8df6..22a6cd7ef73a 100644
--- a/llvm/test/MC/PowerPC/ppc-machine.s
+++ b/llvm/test/MC/PowerPC/ppc-machine.s
@@ -14,3 +14,4 @@
.machine "any"
.machine "pop"
+ .machine ppc64
More information about the llvm-commits
mailing list