kaffe-0.10.0 patches for QNX4

jso at lyngso-industri.dk jso at lyngso-industri.dk
Fri Apr 3 06:27:35 PST 1998



Here are the patches for making kaffe-0.10.0 run on QNX 4. With these
patches, kaffe will pass the regression tests except for the final
beans test (and this doesn't look like a platform specific problem, so
I have not investigated it further at this point). 

I had to make a typedef of "uint" in two places which obviously are not
the appropriate places to do this (config/i386/qnx/md.h and 
kaffe/kaffevm/inflate.h). Where should this typedef go / why is it
missing? 

The patch makes it possible to compile kaffe even if configure did not
find the z and gmp libs. This is first of all a result of my
lazyness - I haven't located and downloaded these libraries yet. 



Jeppe


*** kaffe-0.10.0.orig/config/i386/qnx/md.h	Mon Mar 30 20:59:50 1998
--- kaffe-0.10.0/config/i386/qnx/md.h	Fri Apr  3 13:47:07 1998
***************
*** 22,27 ****
--- 22,35 ----
  #include "i386/common.h"
  #include "i386/threads.h"
  
+ /*
+  * Redefine stack pointer offset.
+  */
+ #undef	SP_OFFSET
+ #define	SP_OFFSET	7
+ 
+ typedef unsigned int uint;
+ 
  #if defined(TRANSLATOR)
  #include "jit-md.h"
  #endif
***************
*** 55,63 ****
  		movl %5,%%ebx						\n\
  		movb %4,%%cl						\n\
  		movl %%eax,(%%ebx)					\n\
! 		cmpb $'D',%%cl						\n\
  		je 4f							\n\
! 		cmpb $'J',%%cl						\n\
  		jne 5f							\n\
  4:									\n\
  		movl %%edx,4(%%ebx)					\n\
--- 63,71 ----
  		movl %5,%%ebx						\n\
  		movb %4,%%cl						\n\
  		movl %%eax,(%%ebx)					\n\
! 		cmpb $0x44,%%cl						\n\
  		je 4f							\n\
! 		cmpb $0x4a,%%cl						\n\
  		jne 5f							\n\
  4:									\n\
  		movl %%edx,4(%%ebx)					\n\
***************
*** 66,77 ****
  	  : "r" ((CALL)->nrargs),					\
  	    "r" ((CALL)->args),						\
  	    "r" ((CALL)->callsize),					\
! 	    "m" (METHOD_NATIVECODE((CALL)->meth)),			\
  	    "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")
- 
  #endif
--- 74,84 ----
  	  : "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")
  #endif
*** kaffe-0.10.0.orig/kaffe/kaffevm/external.c	Mon Mar 30 20:59:51 1998
--- kaffe-0.10.0/kaffe/kaffevm/external.c	Wed Apr  1 09:04:27 1998
***************
*** 29,35 ****
  #include "support.h"
  #include "md.h"
  #if defined(NO_SHARED_LIBRARIES)
! #include "../../packages/external_native.h"
  #endif
  
  #if defined(NO_SHARED_LIBRARIES)
--- 29,35 ----
  #include "support.h"
  #include "md.h"
  #if defined(NO_SHARED_LIBRARIES)
! #include "../../libraries/clib/external_native.h"
  #endif
  
  #if defined(NO_SHARED_LIBRARIES)
*** kaffe-0.10.0.orig/kaffe/kaffevm/inflate.h	Mon Mar 30 20:59:48 1998
--- kaffe-0.10.0/kaffe/kaffevm/inflate.h	Wed Apr  1 14:58:00 1998
***************
*** 15,20 ****
--- 15,22 ----
  #ifndef __inflate_h
  #define __inflate_h
  
+ typedef unsigned int uint;
+ 
  struct _huft;
  
  typedef struct _inflateInfo {
*** kaffe-0.10.0.orig/libraries/clib/zip/external_wrappers.h	Mon Mar 30 20:59:48 1998
--- kaffe-0.10.0/libraries/clib/zip/external_wrappers.h	Wed Apr  1 15:30:34 1998
***************
*** 1,3 ****
--- 1,4 ----
+ #if defined(HAVE_LIBZ)
  KAFFE_NATIVE(java_util_zip_Adler32_update)
  KAFFE_NATIVE(java_util_zip_Adler32_update1)
  KAFFE_NATIVE(java_util_zip_CRC32_update)
***************
*** 18,20 ****
--- 19,22 ----
  KAFFE_NATIVE(java_util_zip_Inflater_reset)
  KAFFE_NATIVE(java_util_zip_Inflater_end)
  KAFFE_NATIVE(java_util_zip_Inflater_init)
+ #endif
*** kaffe-0.10.0.orig/libraries/clib/math/external_wrappers.h	Mon Mar 30 20:59:48 1998
--- kaffe-0.10.0/libraries/clib/math/external_wrappers.h	Wed Apr  1 15:29:58 1998
***************
*** 1,3 ****
--- 1,4 ----
+ #if defined(HAVE_LIBGMP)
  KAFFE_NATIVE(java_math_BigInteger_plumbInit)
  KAFFE_NATIVE(java_math_BigInteger_plumbAdd)
  KAFFE_NATIVE(java_math_BigInteger_plumbSubtract)
***************
*** 10,12 ****
--- 11,14 ----
  KAFFE_NATIVE(java_math_BigInteger_plumbModInverse)
  KAFFE_NATIVE(java_math_BigInteger_plumbSquare)
  KAFFE_NATIVE(java_math_BigInteger_plumbGeneratePrime)
+ #endif



More information about the kaffe mailing list