Skip to content

Commit ca01a6b

Browse files
committed
[PowerPC] Parse and ignore .machine ppc64
In the wild, kexec-tools purgatory/arch/ppc64/v2wrap.S and hvcall.S use this directive.
1 parent 04776bd commit ca01a6b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,7 @@ bool PPCAsmParser::ParseDirectiveMachine(SMLoc L) {
17371737
// Implement ".machine any" (by doing nothing) for the benefit
17381738
// of existing assembler code. Likewise, we can then implement
17391739
// ".machine push" and ".machine pop" as no-op.
1740-
if (CPU != "any" && CPU != "push" && CPU != "pop")
1740+
if (CPU != "any" && CPU != "push" && CPU != "pop" && CPU != "ppc64")
17411741
return TokError("unrecognized machine type");
17421742

17431743
Parser.Lex();

llvm/test/MC/PowerPC/ppc-machine.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
.machine "any"
1515
.machine "pop"
1616

17+
.machine ppc64

0 commit comments

Comments
 (0)