Inline assembly questions

Stephen Biggs xyzzy@hotpop.com
Mon Apr 7 10:01:00 GMT 2003


When executing in a different code section, why do I have to do:

  asm ( " lea	%%cs:SomeFunction,%%eax" : : : "%eax" );
  asm ( " call	*%%eax" : : : "%eax");

... when what I want to do is this (which goes off into never-never
land):
  asm ( " call	*%%cs:SomeFunction" : : : "%eax" );

I must be unclear on some concept.  How do I force an absolute call
without having to use a register?

Also, how do I make a function in a GCC C file that is strictly inline
assembly be completely bare with no prologue/epilogue (stack frame) or
optimizations? I would like to optimize myself and also get rid of
sillinesses like:
	movl	%eax,%eax

Thanks for any help.





More information about the Gcc mailing list