Hi Paul >>> movl 12(%eax), %eax >>> >> So I could do something like this? >> >> i := integer(@TSparseList(nil).FList); >> movl i(%eax), %eax >> > Unfortunately, no. You'd get the offset you want, but you can only use > constants in inline assembler, and I don't think delphi or freepascal > will consider your previous line to be a valid constant. > > So you'd need to write some code to determine all your offsets and then > set up constants for them all. > > >> The x86_64 version of FPC doesn't seem to like the BASM >> syntax, otherwise I wouldn't touch it. Or at least I can't >> figure out how to force FPC to compile it. The directive >> {$asmmode intel} doesn't seem to work. >> > Bugger - especially as their x86 BASM syntax already supports the > structure member offset extension. And from the (somewhat terse) > freepascal documentation, I don't think there is an equivalent in AT&T > syntax. Oh great. > What kind of error messages are you getting? In 64-bit assembler, all > the registers commonly have different names (e.g. rax as opposed to to > eax). Maybe their assembler is fussy about that sort of thing? > If I try something simplistic like this
movl %eax.TSparseList.FList, %eax I get Error: Assembler syntax error in operand Error: Unknown identifier ".TSparseList" > Is the x86_64 not support intel syntax a known limitation of freepascal? > It's not mentioned on the site anywhere I can see. > > I suspect the FPC crowd intend supporting BASM in the 64bit version, so it is a bug. 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