This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to tell PPC assembler VSX is available?
On Sat, Mar 10, 2018 at 11:18:12PM -0500, Jeffrey Walton wrote:
> I used "g" from simple machine constraints. I thought giving GCC the
> option of using memory or a register was the correct strategy. Sorry
> about that.
"g" is almost never useful for PowerPC. "g" allows constants and memory
and registers, and there are no machine instructions that allow more than
one of those! For reg vs. constant you can use %I but there is nothing
similar for memory.
Also "g" allows all allocatable registers, not what you want.
Peter's advice is good; however you should use the *memory* as input
to your asm, not the address of the memory! Or if you really do not
want to, at least you have to describe that that memory is read. If
you do not care much about optimisation you can use a "memory" clobber
for that.
Segher