Eric Richter erichte@linux.ibm.com writes:
Thanks for the suggestion! I moved the "% 16" into that eval to clean up those load calls.
After a bit of fiddling with m4 though, it appears that this emits something like "v16" without applying the translation of v16 -> 16, causing the assembler to choke. I did manage to get it to work with a naive concatenation macro like this:
define(`CONCAT', `$1$2') define(`IV', `CONCAT(v, eval((($1) % 16) + 16))')
though I feel like there is a more elegant and clear solution.
I think m4_unquote (defined and briefly documented in m4-utils.m4) might solve this problem. Not tested, but something like
define(`IV', `m4_unquote(v`'eval((($1) % 16) + 16))')
Regards, /Niels