Thanks! That should be an easy fix. The documentation is terrible.
What else did I miss?
Re:Parsing RISC-V assembly
by thethirdone on Monday October 26, 2020 @05:43PM
(#24901838)
> Unfortunately, the documentation on legal syntax is absolutely terrible.
I totally agree. Determining the semantics of wierd assembly is even harder. At least for syntax you can just see confirm if gnu-as accepts it.
> Did I miss anything else?
I haven't looked into what is actually parsing at all, but it correctly accepts things like %hi, strings delimited by quotes, @function, labels that are just numbers. I had expected some of those to be rejects based on the post.
I don't know what else might fail because I can't try any auto generated code because of the period label issue. I would recommend trying the assembly generated by compiling this project; it shows a bunch of weird pieces of syntax.
Most notably, labels starting with a period are not accepted, but gcc generated assembly has tons of labels like that.