seeding the pot for 2.0 features [small vectors]
Mikola Lysenko
mclysenk at mtu.edu
Mon Jan 29 08:26:37 PST 2007
Frits van Bommel wrote:
> Can GCC-like extended assembler (recently implemented in GDC:
> http://dgcc.sourceforge.net/gdc/manual.html) help for these first two
> points?
> It allows you to let the compiler allocate registers. That should fix
> point two.
> You can also tell the compiler where to put variables and where you're
> going to put any results. That means your asm doesn't necessarily need
> to access memory to do anything useful. If the compiler sees it doesn't
> inlining the function should be possible, I think.
> It won't fix all asm, of course, but it might make it possible to write
> inlinable asm.
>
For regular functions, I completely agree. The system should work at
least as well as compiler inlining (for certain cases).
Unfortunately vector assembler is not the same. At the very minimum the
implementation needs to be aware of the vector registers on the system,
and it needs to be able to pass parameters/returns in those registers.
Otherwise, you still have to use costly functions like movups, and you
still pay the same basic bookkeeping costs.
It just seems like it would be simpler to make small vectors primitive
types and be done with it.
-Mik
More information about the Digitalmars-d
mailing list