[kaffe] Problem running kaffe on a new RISC processor

2008-03-30 Thread Sivaramakrishnan KC
Hi,

I am porting kaffe to a new RISC processor. I have built kaffe with
the following configuration options.

KAFFEH=/home/jvm/kaffe-1.0.7_native/kaffe/kaffeh/kaffeh
CFLAGS=-D__abacus__
CC=/usr/abacus/bin/abacus-anurag-linux-gcc
STRIP=/usr/abacus/bin/abacus-anurag-linux-strip
NM=/usr/abacus/bin/abacus-anurag-linux-nm
AR=/usr/abacus/bin/abacus-anurag-linux-ar
AS=/usr/abacus/bin/abacus-anurag-linux-as
RANLIB=/usr/abacus/bin/abacus-anurag-linux-ranlib
LD=/usr/abacus/bin/abacus-anurag-linux-ld
./configure --with-engine=intrp --disable-gtk-peer
--disable-gconf-peer --with-jikes --disable-plugins
--prefix=/home/jvm/kaffe-abacus --exec-prefix=/home/jvm/kaffe-abacus
--host=abacus-unknown-linux --build=i386-linux
--with-includes=/usr/abacus/zlib/include /usr/abacus/include
--with-libraries=/usr/abacus/zlib/lib /usr/abacus/lib
--disable-native-awt --disable-shared --with-threads=unix-pthreads
--with-staticvm --with-staticbin

I run kaffe with kaffe -vmdebug INIT helloworld.java.. The output i get


initTypes()
initTypes() done
finishTypes()
finishTypes() done
initBaseClasses() done
kaffe-bin: exception.c: 125: vmExcept_setPC: Assertion 'eh-meth !=
((void*)0)' failed
Aborted.

What might be the problem?

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] Porting kaffe - Make error - relocation overflow

2008-03-19 Thread Sivaramakrishnan KC
Hi,

I am porting kaffe to a research architecture abacus( 32 bit RISC). I
am using gcc 2.95.3. I tried porting kaffe-1.1.8 and kaffe-1.0.7 and
encountered the same error during make.
..
/bin/sh ../../libtool --mode=compile
/usr/abacus/bin/abacus-anurag-linux-gcc -DHAVE_CONFIG_H -I. -I.
-I../../config -I../../include
-I../../kaffe/kaffevm/systems/unix-jthreads -Iintrp -I./intrp
-I../../libltdl -DINTERPRETER -I../../kaffe/xprof  -DKVER='1.0.7'
-I/home/jvm/kaffe-1.0.7_abacus/./kaffe/kaffevm
-I/home/jvm/kaffe-1.0.7_abacus/./kaffe/kaffevm/systems/unix-jthreads
-I../../config -I../../include  -I/usr/abacus/zlib/include
-I/usr/abacus/include  -D__abacus__ -Wall -Wstrict-prototypes -c
code-analyse.c

/usr/abacus/bin/abacus-anurag-linux-gcc -DHAVE_CONFIG_H -I. -I.
-I../../config -I../../include
-I../../kaffe/kaffevm/systems/unix-jthreads -Iintrp -I./intrp
-I../../libltdl -DINTERPRETER -I../../kaffe/xprof -DKVER=\1.0.7\
-I/home/jvm/kaffe-1.0.7_abacus/./kaffe/kaffevm
-I/home/jvm/kaffe-1.0.7_abacus/./kaffe/kaffevm/systems/unix-jthreads
-I../../config -I../../include -I/usr/abacus/zlib/include
-I/usr/abacus/include -D__abacus__ -Wall -Wstrict-prototypes -c
code-analyse.c -o code-analyse.o

/tmp/cc4O2KKc.s: Assembler messages:
/tmp/cc4O2KKc.s:14622: Error: relocation overflow
make[3]: *** [code-analyse.lo] Error 1
make[3]: Leaving directory `/home/jvm/kaffe-1.0.7_abacus/kaffe/kaffevm'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jvm/kaffe-1.0.7_abacus/kaffe/kaffevm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jvm/kaffe-1.0.7_abacus/kaffe'
make: *** [all-recursive] Error 1
-
I am configuring with the options:

KAFFEH=/home/jvm/kaffe-1.0.7_native/kaffe/kaffeh/kaffeh
CFLAGS=-D__abacus__
CC=/usr/abacus/bin/abacus-anurag-linux-gcc
STRIP=/usr/abacus/bin/abacus-anurag-linux-strip
NM=/usr/abacus/bin/abacus-anurag-linux-nm
AR=/usr/abacus/bin/abacus-anurag-linux-ar
AS=/usr/abacus/bin/abacus-anurag-linux-as
RANLIB=/usr/abacus/bin/abacus-anurag-linux-ranlib
LD=/usr/abacus/bin/abacus-anurag-linux-ld
./configure --with-engine=intrp --disable-gtk-peer
--disable-gconf-peer --with-jikes --disable-plugins
--prefix=/home/jvm/kaffe-abacus --exec-prefix=/home/jvm/kaffe-abacus
--host=abacus-unknown-linux --build=i386-linux
--with-includes=/usr/abacus/zlib/include /usr/abacus/include
--with-libraries=/usr/abacus/zlib/lib /usr/abacus/lib
--disable-native-awt --disable-shared --with-threads=unix-jthreads
--with-staticvm --with-staticbin

What might be the problem?

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] sysdepCallMethod test - i386 port

2008-02-25 Thread Sivaramakrishnan KC
Hi,

I have ported the sysdepCallMethod test from
http://www.kaffe.org/pipermail/kaffe/2003-May/129976.html to i386. But
i still have this doubt. What does callMethodinfo-nrargs represent?
Does it represent the number of valid arguements in
callMethodInfo-args? Because i found in i386/sysdepCallMethod.h ==

---
unsigned args = call-nrargs;

  /* Push all arguments into the stack, in last-to-first order.  This
 assumes that the second 32bit-word of longs and doubles is
 available as an additional int argument, as callMethod[AV]() do.  */
  while (args  0)
asm volatile (pushl %0 : : m (call-args[--args].i) : sp);
---

Even if there is only one jdouble arguement, call-nrargs should be
2(=call-argsize) in order to push 2 32-bit values into the stack. I
have used the same value for call-nrargs and call-argsize in the
following testcase. Only then the does it work fine. Correct me if i
am wrong.

This is tested under i386/cygwin. Should work for other platforms as well.
---sysdepCallMethod_test_i386.c-
#if 0
exec ${CC:-gcc} $CFLAGS -I.. -I../include -I../config
-I../kaffe/kaffevm  -I../kaffe $0 -o ${0%%.c}
#endif

#include stdio.h
#include stdint.h

/* Basic types definitions */
#include kaffevm/gtypes.h

#define NEED_sysdepCallMethod 1
#include kaffevm/support.h
#include md.h

static const char char_v = 'V';
static const char char_c = 'C';
static const char char_s = 'S';
static const char char_i = 'I';
static const char char_j = 'J';
static const char char_f = 'F';
static const char char_d = 'D';
#define JTYPECHAR(T) (char_##T)

static int argsize(char type) {
  int s = 0;
  switch (type) {
  case 'V':
s = 0;
break;
  case 'C':
  case 'S':
  case 'I':
  case 'F':
s = 1;
break;
  case 'J':
  case 'D':
s = 2;
break;
  default:
abort();
  }
  return s;
}

static void print_jvalue(const char *msg, jvalue *value, char type) {
  if (msg)
printf(%s, msg);
  switch (type) {
  case 'V':
printf(void);
break;
  case 'C':
printf(%c, value-c);
break;
  case 'S':
printf(%d, value-s);
break;
  case 'I':
printf(%d, value-i);
break;
  case 'J':
printf(%lld, value-j);
break;
  case 'F':
printf(%f, value-f);
break;
  case 'D':
printf(%lf, value-d);
break;
  default:
abort();
  }
}

#define MYDBG

#define GET_SIZE_0(...) 0
#define GET_SIZE_1(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_0(__VA_ARGS__)
#define GET_SIZE_2(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_1(__VA_ARGS__)
#define GET_SIZE_3(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_2(__VA_ARGS__)
#define GET_SIZE_4(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_3(__VA_ARGS__)
#define GET_SIZE_5(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_4(__VA_ARGS__)
#define GET_SIZE_6(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_5(__VA_ARGS__)
#define GET_SIZE_7(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_6(__VA_ARGS__)
#define GET_SIZE_8(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_7(__VA_ARGS__)
#define GET_SIZE_9(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_8(__VA_ARGS__)
#define GET_SIZE_10(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_9(__VA_ARGS__)
#define GET_SIZE_11(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_10(__VA_ARGS__)
#define GET_SIZE_12(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_11(__VA_ARGS__)
#define GET_SIZE_13(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_12(__VA_ARGS__)
#define GET_SIZE_14(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_13(__VA_ARGS__)
#define GET_SIZE_15(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_14(__VA_ARGS__)
#define GET_SIZE_16(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_15(__VA_ARGS__)
#define GET_SIZE_17(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_16(__VA_ARGS__)
#define GET_SIZE_18(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_17(__VA_ARGS__)
#define GET_SIZE_19(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_18(__VA_ARGS__)
#define GET_SIZE_20(TYPE, VAL, ...)
argsize(JTYPECHAR(TYPE))+GET_SIZE_19(__VA_ARGS__)
#define GET_SIZE(NARGS, ...) GET_SIZE_##NARGS(__VA_ARGS__)

#define CALL_INVOKE_DO_PREPARE_N(IDX, TYPE, VAL)do{\
  if(argsize(JTYPECHAR(TYPE))==2) \
  { \
args[IDX+1].TYPE = VAL; \
call.callsize[IDX+1] = argsize(JTYPECHAR(TYPE));\
call.calltype[IDX+1] = JTYPECHAR(TYPE); \
/*printf(\nIDX+1: %d TYPE: %c VALUE: %lf,IDX+1,JTYPECHAR(TYPE),VAL);*/\
args[IDX].i = (args[IDX+1].j)32;\
call.callsize[IDX] = 0;\
/*printf(\nIDX: %d TYPE: %c VALUE: %d\n,IDX,'I',args[IDX].i);*/\
  } \
  else\
  {\
  args[IDX].TYPE = VAL; \
  call.callsize[IDX] = argsize(JTYPECHAR(TYPE));\
  call.calltype[IDX] = JTYPECHAR(TYPE); \
  /*printf(\nIDX: %d 

[kaffe] Testing sysdepCallMethod

2008-02-22 Thread Sivaramakrishnan KC
How do i test sysdepCallMethod(). I found this file

http://www.kaffe.org/pipermail/kaffe/2003-May/129976.html

I am testing sysdepCallMethod under i386-linux. It passes the first
test -- CALL(f_v_v, v, 0);. But all other test generates segmentation
fault.

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] Determining the SP_OFFSET

2008-02-20 Thread Sivaramakrishnan KC
Hi all,

I am porting kaffe to a new platform. How do I determine the value for
SP_OFFSET macro (defined in md.h)? Is there any other way to find it out
other than executing kaffe/developers/sp_offset.c file? Is it the same as
the STACK_POINTER_OFFSET definition in the target machine definition for
GCC?
___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] Determining the SP_OFFSET

2008-02-20 Thread Sivaramakrishnan KC
Hi all,

I am porting kaffe to a new platform. How do I determine the value for
SP_OFFSET macro (defined in md.h)? Is there any other way to find it out
other than executing kaffe/developers/sp_offset.c file? Is it the same as
the STACK_POINTER_OFFSET definition in the target machine definition for
GCC?
___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] Porting to an embedded system which doesn't have an operating system

2008-02-14 Thread Sivaramakrishnan KC
Hi

Can kaffe be ported to an embedded system which doesn't have an operating
system?
___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] porting to a custom built embedded system

2008-02-05 Thread Sivaramakrishnan KC
Hi,

I am planning to port kaffe to a system with 32-bit microprocessor based on
RISC architecture. It runs at 25Mhz. How do i go about porting kaffe to this
system?


Thanks
___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] javanio error

2008-02-04 Thread Sivaramakrishnan KC
Hi,

I compiled kaffe with the following configuration options

./configure --disable-gtk-peer --disable-gconf-peer --disable-plugin
--with-jikes

When I tried to run kaffe, I get the follwing error:

-
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/UnsatisfiedLinkError: Native library `javanio' not found (as file `lib
javanio.so' in class loader null) in gnu.classpath.boot.library.path and java.l
ibrary.path `[/usr/local/kaffe/jre/lib/i386/, /usr/local/kaffe/lib/, /usr/local/
classpath/lib/classpath/]'
  at java.lang.ClassLoader.getSystemClassLoader (ClassLoader.java:799)
Aborted (core dumped)
--

What is the problem? What should i do to fix it?

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] kaffe - javanio error

2008-02-04 Thread Sivaramakrishnan KC
Hi,

I compiled kaffe with the following configuration options

./configure --disable-gtk-peer --disable-gconf-peer --disable-plugin
--with-jikes

When I tried to run kaffe, I get the follwing error:

-
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/UnsatisfiedLinkError: Native library `javanio' not found (as file `lib
javanio.so' in class loader null) in gnu.classpath.boot.library.path and java.l
ibrary.path `[/usr/local/kaffe/jre/lib/i386/, /usr/local/kaffe/lib/, /usr/local/
classpath/lib/classpath/]'
   at java.lang.ClassLoader.getSystemClassLoader (ClassLoader.java:799)
Aborted (core dumped)
--

What is the problem? What should i do to fix it?

___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe