Kaffe on Solaris with SunC compiler.

Gilles Dauphin dauphin at sig.enst.fr
Wed Mar 12 00:37:48 PST 1997


> From richard at stommel.tamu.edu Tue Mar 11 22:11:37 1997
> 
> > > What is the equivalent asm directive for SunC compiler?
> > > I have also a problem with the 'asm volatile' directive.
> > 
> > Yes this is all special GNU machine, and I have not idea what the CC
> > equivalent is.  If you decide to work it out please let me know.
> 
> There is no equivalent for any non-gcc unix compiler I am aware of.
> I think all of the Win32 compilers have some form of macroized
> inline assembly, but that doesn't do much good here.  If you want to
> support these other compilers you'll have to use straight assembly.

I start to translate in native sparc assembler mode.
I suggest the assembly code would be in a fonction, not 'inline' in a block.
The little transform in config/sparc/jit.h would be:

----------original-----------------
#define CALL_KAFFE_FUNCTION(meth, obj)                                  \
        asm("   mov %0,%%o0                                             \n\
                call %1,0                                               \n\
                nop                                                     \n\
        " : : "r" (obj), "r" (meth->ncode))

----------suggest--------------------------
#define CALL_KAFFE_FUNCTION(meth, obj) CallKaffeFunction(meth,obj)
...
#ifdef SOME_ARCHITECTURE and SOME_COMPILER_SPECIFIC
void CallKaffeFunction(meth,obj) /* this is in a separate file */
{
	... assembler specific compiler in a separate file ...
}
#endif
------------end-------------------

Maybe it will become more easy to port this code.

Gilles


More information about the kaffe mailing list