[Libre-soc-bugs] [Bug 849] binutils: parse macros in SVP64 and refactor code
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri Jun 10 12:45:56 BST 2022
https://bugs.libre-soc.org/show_bug.cgi?id=849
--- Comment #1 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
i honestly thought that the parsing of macro substitution and arithmetic
computation of expressions were a completely separate pre-procesing phase.
what you are saying is that the macro substitution involving register
names is *not* separate, which retrospectively makes sense
it is worthwhile checking that arithmetic pre-processing is separate
or not. i believe it is valid to have this:
addi 8/4, r0, 9-5
because those numbers may come from #defines and .set declarations,
which must be parse out and eventually become:
addi 2, r0, 4
if the arithmetic macro substitution is *not* a pre-processing
phase then there exists the opportunity to ensure that this does not
get borked:
sv.addi/vec2 2, r0, 4
because the "/" is wrongly interpreted as a divide operation
if that cannot be solved then sigh we have to use a different character.
discussed previously, "?" is free and is not used as an arithmetic op.
personally i think this looks silly but hey
sv.addi?vec2?sm=r3?ew=8 2, r0, 4
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list