9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] gcc 'asm' problem - haven't a clue what it means!
@ 2002-10-24  4:16 Skip Tavakkolian
  0 siblings, 0 replies; only message in thread
From: Skip Tavakkolian @ 2002-10-24  4:16 UTC (permalink / raw)
  To: 9fans

I've run into this while compiling Kaffe.  The errors are where the
macro 'sysdepCallMethod()' is invoked;  Its definition is given below.
I've saved the .i and the .s files (gcc -save-temps) if anyone needs them.

support.c: In function `callMethodA':
support.c:379: Can't find a register in class `INDEX_REGS' while reloading `asm'.
support.c: In function `callMethodV':
support.c:561: Can't find a register in class `INDEX_REGS' while reloading `asm'

#define	sysdepCallMethod(CALL)						\
	asm volatile ("							\n\
1:									\n\
		cmpl $0,%0						\n\
		je 3f							\n\
		decl %0							\n\
		pushl (%1,%0,8)						\n\
		jmp 1b							\n\
3:									\n\
		call *%3						\n\
		movl %5,%%edi						\n\
		movb %4,%%cl						\n\
		cmpb $0x46,%%cl						\n\
		jne 4f							\n\
		fstps (%%edi)						\n\
		jmp 6f							\n\
4:									\n\
		cmpb $0x44,%%cl						\n\
		jne 5f							\n\
		fstpl (%%edi)						\n\
		jmp 6f							\n\
5:									\n\
		movl %%eax,(%%edi)					\n\
		cmpb $0x4a,%%cl						\n\
		jne 6f							\n\
		movl %%edx,4(%%edi)					\n\
6:									\n\
	" :								\
	  : "r" ((CALL)->nrargs),					\
	    "r" ((CALL)->args),						\
	    "r" ((CALL)->callsize),					\
	    "m" ((CALL)->function),					\
	    "m" ((CALL)->rettype),					\
	    "m" ((CALL)->ret)						\
	  : "eax", "ebx", "ecx", "edx", "edi", "esi", "cc", "memory");	\
	asm volatile ("							\n\
		subl %0,%%esp						\n\
	" : : "r" ((CALL)->argsize * sizeof(jint)) : "cc")



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-24  4:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-24  4:16 [9fans] gcc 'asm' problem - haven't a clue what it means! Skip Tavakkolian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).