If these registers are used explicitly, GAS will yield a bunch of errors like "Error: unsupported relocation against r1" unless "-mregnames" is passed to the assembler. I can add "-Wa,-mregnames" to CFLAGS in configure.ac and modify the assembly files to improve the syntax.
On Fri, Sep 4, 2020 at 1:07 PM Niels Möller nisse@lysator.liu.se wrote:
Maamoun TK maamoun.tk@googlemail.com writes:
This patch adds "VSR" macro to improve the syntax of assembly code,
Speaking of syntax, I've had quick look at the powerpc64 assembly in GMP, and it seems to use symbols like r1, r2, r3 etc for the general purpose registers, and v0, v1, v2 etc for the vector registers. I think that's a bit clearer than using raw numbers to reference registers. And should hopefully result in compile time errors if one accidentally uses a general purpose register where a vector register is expected, or vice versa.
I guess both ways work with relevant assemblers?
Regards, /Niels
-- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance.