[RFC] SVP64 Cray-style Vectorisation of the OpenPOWER scalar ISA

Alan Modra amodra@gmail.com
Fri Mar 19 01:23:40 GMT 2021

On Mon, Mar 15, 2021 at 02:13:27PM +0000, lkcl via Binutils wrote:
>     sv.{v3.0Bopcode} / augmentation=x / augmentation=y  r0.v, r30.s, r75.v
> with "=" and "/" already being used in gcc/binutils macro expressions,
> what could be used instead?

I don't see anything particularly wrong with the syntax you have
chosen, except that someone using gas macros might have some
difficulty passing a string like pr=eq when invoking a macro since
that is likely to hit "Parameter named `pr' does not exist for
macro".  Someone trying to do that will figure a way around that
problem, I guess.

I'm assuming that you would implement support for this extension by
scanning and consuming the "sv.", any augmentation strings, and the
".v" or ".s" suffixes before passing the rest of the line to the
existing md_assemble opcode lookup and parameter handling.  ie. much
the same as you already do using python.  That should work so long as
you are flexible with white-space and the augmentation specifiers
don't so anything silly like start with '*'.  Also, I think it would
be a good idea to not accept a plain '.' suffix for scalars.
Something like "1." could be a floating point constant.  Regarding
white-space, this user input:
 sv.add / xx = 1 / yy = foo 3 .v, 4 .v, 5
is turned into this input to md_assemble by app.c:do_scrub_chars
 sv.add/ xx=1/yy=foo 3 .v,4 .v,5

The fact that the first '/' is pasted onto the "sv.add" is probably a
bug in '/*' comment handling code.  :-(

If you want a replacement for '=' in your augmentation syntax to avoid
the clash with macro args, '?' might be a better choice.

Alan Modra
Australia Development Lab, IBM

More information about the Binutils mailing list