GDC review process.

deadalnix deadalnix at gmail.com
Wed Jun 20 00:42:23 PDT 2012


Le 19/06/2012 22:58, Manu a écrit :
> Thinking more about the implications of removing the inline asm, what
> would REALLY roxors, would be a keyword to insist a variable is
> represented by a register, and by extension, to associate it with a
> specific register:
>    register int x;             // compiler assigns an unused register,
> promises it will remain resident, error if it can't maintain promise.
>    register int x : rsp;    // x aliases RSP; can now produce a function
> pre/postable in high level code.
> Repeat for the argument registers -> readable, high-level custom calling
> conventions!
>
> This would almost entirely eliminate the usefulness of an inline assembler.
> Better yet, this could use the 'new' attribute syntax, which most agree
> will support arguments:
> @register(rsp) int x;

Choosing registers is something the compiler is better at than us most 
of the time.

For this very reason, I think we want to go in the exact opposite 
direction : asm with compiler choosen register when possible.


More information about the Digitalmars-d mailing list