Hi Paul > Well, that should add the (hopefully) correct offset. > > You'll need to follow that with an explicit derefence: > > addl TSparseList.FList, %eax > movl (%eax), %eax > > Those two instructions combined should give the same effect as a single > > movl TSpareList.FList(%eax), %eax > > But have you tried the above instruction directly? >
Yes. I tried that, but the compiler complains about the syntax. For that matter it complains about the original Intel syntax as well. > Given the addl above, that should be the AT&T equivalent syntax for > > MOV EAX, [EAX].TSparseList.FList > > One thing that is still bothering me though is that in a 64-bit > application, shouldn't this all be using 64-bit addresses and registers? > I don't know the context of what you're trying to port and Windows may > convenient be giving you addresses that are all clear in the high > 32-bits but it's not safe to assume that in 64-bit code. > > i.e. > > movq TSpareList.Flist(%rax), %rax > > q = quadword (64-bit) where l = longword (32-bit) > > I was wondering about this too. So I suppose I need to include a Freepascal compiler directive, if one exists, for a 32 vs 64 bit OS. Overall I'm inclined to ditch the assembler code by rewriting the ForAll() method and avoid the hassle altogether. Thanks, Todd. > Cheers, > Paul. > > _______________________________________________ > NZ Borland Developers Group - Delphi mailing list > Post: delphi@delphi.org.nz > Admin: http://delphi.org.nz/mailman/listinfo/delphi > Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: > unsubscribe > _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe