This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Postioning of items within a class
> Unfortunately, the large blocks of asm need to remain as whole inlined
> blocks, so I'm somewhat stuck with converting inlined chunks of asm on the
> order of several hundred lines of asm per chunk.
If you have a given set of class definitions, and you need to convert
assembler code relying on the layout of classes to gcc, may I propose
you generate some assembler glue? I.e.
#include <stdlib.h>
#include "all_my_headers"
int main()
{
printf(".set dummy_item1,%d\n",offsetof(dummy,item1));
printf(".set dummy_item2,%d\n",offsetof(dummy,item2));
}
Then you run this once (and whenever the headers change), and .include
the generated code into your assembler file.
Hope this helps,
Martin