Hacker News new | ask | show | jobs
by epcoa 868 days ago
> there's no official grammar

Most architectures have something. Sparc had one (I still have the manual), PPC, 68k. I would even say x86 does as well but you can’t force its adoption, what AT&T and GNU wants to do on their own can’t be prevented. AT&T I suppose had the goal of making it all consistent, but I’m not sure if that was an improvement. Though I know of its vocal defendants.

RISC-V might be the exception more than anything, but they have a defacto syntax used throughout the spec.

Analog Devices DSPs and Itanium are examples with the = token.

http://laplace.physics.ubc.ca/vnp4/intel/docs/asm_lan.pdf

https://www.nxp.com/docs/en/reference-manual/M68000PRM.pdf

1 comments

That's not a specification for the grammar at all. It's just a guide for how to use RISC-V assembly. Not what we're talking about.
That document is grossly unfinished and doesn’t even appear to specify syntax outside pseudo ops and a few other things. In a few places it refers to the output of objdump, which I think is close enough to saying “whatever gcc does”.