Feature Request: enhanced inline ASM

Dan murpsoft at hotmail.com
Tue Apr 3 11:26:07 PDT 2007


Actually, no.  But I failed to static the structs or test it.
So we're going to do something that looks like:

mov ECX, a.x[EAX];
mov ECX, b.s.ptr[ECX];

Excuse if my notation is off - but I think that should mean ECX is now a char* to b.s[0], which is technically null still.  : p  Most importantly though was the point, not the example.

You can't follow pointer chains in one instruction in ASM, but you can do it in one line in D.  Structure offsets?  Sure!  Pointers?  No.

Davidl Wrote:
> u should use classes to explain the confusion there ;)
> coz ur example, the type of x is just void* so no attribute
> of s or even s.ptr :p

Dan Wrote:
> > struct b {
> >   char[] s;
> > }
> >
> > struct a {
> >   void* x = b;
> >   union y {
> >     int z;
> >   }
> > }




More information about the Digitalmars-d mailing list