Kaffe on Solaris with SunC compiler.

Gilles Dauphin dauphin at sig.enst.fr
Fri Mar 7 04:47:44 PST 1997


Hi,

I am young to Kaffe mailing list. So, I try to compile Kaffe 0.8.2
with Sun C 4.0 on Solaris 2.5 SS5 computer and it does not compile.
Here is the probleme:

---------------------------message from compiler----------
make[2]: Entering directory `/sig/tomcat/dauphin/mbone-dev/kaffe-0.8.2/kaffe/kaffevm'
...
cc -g  -I. -I. -I./../../config -I../../config -I../../include -DTRANSLATOR -I./jit -DKVER=\"0.82\" -c -KPIC constants.c
"constants.c", line 67: warning: argument #1 is incompatible with prototype:
	prototype: pointer to char : "./classMethod.h", line 212
	argument : pointer to uchar
cc -g  -I. -I. -I./../../config -I../../config -I../../include -DTRANSLATOR -I./jit -DKVER=\"0.82\" -c -KPIC classMethod.c
"classMethod.c", line 292: warning: argument #1 is incompatible with prototype:
	prototype: pointer to uchar : "./support.h", line 54
	argument : pointer to char
"classMethod.c", line 561: syntax error before or at: :
"classMethod.c", line 564: cannot recover from previous errors
cc: acomp failed for classMethod.c
-------------------------------------------------------------

The problem is in config/sparc/jit.h line 33:

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

What is the mean of ' : : ' in the asm directive?
Is special to GNU asm?
What is the equivalent asm directive for SunC compiler?
I have also a problem with the 'asm volatile' directive.


An other problem is in kaffe/kaffevm/jit/constpool.c line 101:
void
establishConstants(void *at)
{
        constpool *c;

        for (c = firstConst; c != currConst; c = c->next) {
                c->at = (uintp)at;
                *(union _constpoolval*)at = c->val;
                at += sizeof(c->val);   <----- problem here ('at' is void*)
        }

        currConst = firstConst;
        nConst = 0;
}

I think, like the SunC compiler ;-) , it is incorrect to 
do pointer arithmetic on operand of unknown size.

Gilles
------------------------------------------------------------
Dauphin Gilles
Telecom Paris                    email: dauphin at sig.enst.fr
46, rue Barrault                 phone: (33) 1 45 81 77 39
75634 Paris CEDEX 13		 fax:   (33) 1 45 88 79 35
France
------------------------------------------------------------





More information about the kaffe mailing list