[PowerPC] Parse and ignore .machine

glibc/sysdeps/powerpc/powerpc64 has .machine
{altivec,power4,power5,power6,power7,power8} (.machine power9 is planned in
sysdeps/powerpc/powerpc64/power9/strcmp.S).
The diagnostic is not useful anyway so just delete it.
This commit is contained in:
Fangrui Song 2020-12-28 12:20:39 -08:00
parent 6d02d12e17
commit f931290308
2 changed files with 6 additions and 5 deletions

View File

@ -1656,11 +1656,7 @@ bool PPCAsmParser::ParseDirectiveMachine(SMLoc L) {
// FIXME: Right now, the parser always allows any available
// instruction, so the .machine directive is not useful.
// 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" && CPU != "ppc64")
return TokError("unrecognized machine type");
// In the wild, any/push/pop/ppc64/altivec/power[4-9] are seen.
Parser.Lex();

View File

@ -15,3 +15,8 @@
.machine "pop"
.machine ppc64
# Used in glibc.
.machine altivec
.machine power4
.machine power8