Kaffe on Solaris with SunC compiler.

Tim Wilkinson tim at tjwassoc.demon.co.uk
Wed Mar 12 03:05:34 PST 1997


Gilles,

On Wed, 12 Mar 1997, Gilles Dauphin wrote:

> 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-------------------

My prefered method for this ('cause I like being able to inline the assembly
where it's possible) is to #undef CALL_KAFFE_FUNCTION in the arch/os md.h
file (depending on the compiler) and then add the necessary function (in
this case CallKaffeFunction()) in md.c

Cheers
Tim

--
  Tim Wilkinson                         Tel/Fax: +44 181 440 0658
  T. J. Wilkinson & Associates,         Mobile:  +44 370 621006
  London, UK.                           Email:   tim at tjwassoc.demon.co.uk



More information about the kaffe mailing list