[kaffe] m68k/netbsd/jit3 trial

Kiyo Inaba inaba at src.ricoh.co.jp
Thu Jul 15 04:30:02 PDT 2004


Hi,

I started to test jit3 for m68k/netbsd, and soon I realized function
names used for this port is different from ia32. The name difference
should be OK, since they are encapsulated by symbolic name, but
external definition in funcs.h disallow to have this freedom.

So, I propose to change funcs.h as described in my patch. Of course
we can change all function names in config/m68k/jit3-icode.h to be
exactly same as defined in ia32, but this should be smarter.

Kiyo

diff -Naur kaffe-snap-040708.orig/ChangeLog kaffe-snap-040708/ChangeLog
--- kaffe-snap-040708.orig/ChangeLog	2004-07-07 21:58:43.000000000 +0900
+++ kaffe-snap-040708/ChangeLog	2004-07-15 20:14:49.000000000 +0900
@@ -1,3 +1,8 @@
+2004-07-15  Kiyo Inaba <inaba at src.ricoh.co.jp>
+
+	* kaffe/kaffevm/jit3/funcs.h:
+	The extern func defs should use symbolic name (HAVE_...).
+
 2004-07-07  Jim Huang <jserv at kaffe.org>
 
  	* libraries/javalib/java/awt/Graphics.java:
diff -Naur kaffe-snap-040708.orig/kaffe/kaffevm/jit3/funcs.h kaffe-snap-040708/kaffe/kaffevm/jit3/funcs.h
--- kaffe-snap-040708.orig/kaffe/kaffevm/jit3/funcs.h	2004-04-04 15:11:57.000000000 +0900
+++ kaffe-snap-040708/kaffe/kaffevm/jit3/funcs.h	2004-07-15 20:17:04.000000000 +0900
@@ -1,4 +1,4 @@
-/* machine.h
+/* funcs.h
  *
  * Copyright (c) 1996, 1997
  *	Transvirtual Technologies, Inc.  All rights reserved.
@@ -12,115 +12,385 @@
 
 extern void unimplemented (sequence* s);
 extern void nop (sequence* s);
-extern void prologue_xxx (sequence* s);
-extern void check_stack_limit_xRC (sequence* s);
-extern void eprologue_xLx (sequence* s);
-extern void epilogue_xxx (sequence* s);
-extern void spill_Rxx (sequence* s);
-extern void fspill_Rxx (sequence* s);
-extern void fspilll_Rxx (sequence* s);
-extern void reload_Rxx (sequence* s);
-extern void freload_Rxx (sequence* s);
-extern void freloadl_Rxx (sequence* s);
-extern void move_RxC (sequence* s);
-extern void move_RxL (sequence* s);
-extern void move_RxR (sequence* s);
-extern void fmove_RxC (sequence* s);
-extern void fmove_RxR (sequence* s);
-extern void fmovel_RxC (sequence* s);
-extern void fmovel_RxR (sequence* s);
-extern void add_RRR (sequence* s);
-extern void adc_RRR (sequence* s);
-extern void fadd_RRR (sequence* s);
-extern void faddl_RRR (sequence* s);
-extern void sub_RRR (sequence* s);
-extern void sbc_RRR (sequence* s);
-extern void fsub_RRR (sequence* s);
-extern void fsubl_RRR (sequence* s);
-extern void negf_RxR (sequence* s);
-extern void negd_RxR (sequence* s);
-extern void mul_RRR (sequence* s);
-extern void fmul_RRR (sequence* s);
-extern void fmull_RRR (sequence* s);
-extern void div_RRR (sequence* s);
-extern void fdiv_RRR (sequence* s);
-extern void fdivl_RRR (sequence* s);
-extern void rem_RRR (sequence* s);
-extern void and_RRR (sequence* s);
-extern void or_RRR (sequence* s);
-extern void xor_RRR (sequence* s);
-extern void ashr_RRR (sequence* s);
-extern void lshr_RRR (sequence* s);
-extern void lshl_RRR (sequence* s);
-extern void load_RxR (sequence* s);
-extern void fload_RxR (sequence* s);
-extern void floadl_RxR (sequence* s);
-extern void store_xRR (sequence* s);
-extern void fstore_RxR (sequence* s);
-extern void fstorel_RxR (sequence* s);
-extern void cmp_xRR (sequence* s);
-extern void cvtif_RxR (sequence* s);
-extern void cvtid_RxR (sequence* s);
+#if defined(HAVE_prologue)
+extern void HAVE_prologue (sequence* s);
+#endif
+#if defined(HAVE_check_stack_limit)
+extern void HAVE_check_stack_limit (sequence* s);
+#endif
+#if defined(HAVE_exception_prologue)
+extern void HAVE_exception_prologue (sequence* s);
+#endif
+#if defined(HAVE_epilogue)
+extern void HAVE_epilogue (sequence* s);
+#endif
+#if defined(HAVE_spill_int)
+extern void HAVE_spill_int (sequence* s);
+#endif
+#if defined(HAVE_spill_float)
+extern void HAVE_spill_float (sequence* s);
+#endif
+#if defined(HAVE_spill_double)
+extern void HAVE_spill_double (sequence* s);
+#endif
+#if defined(HAVE_reload_int)
+extern void HAVE_reload_int (sequence* s);
+#endif
+#if defined(HAVE_reload_float)
+extern void HAVE_reload_float (sequence* s);
+#endif
+#if defined(HAVE_reload_double)
+extern void HAVE_reload_double (sequence* s);
+#endif
+#if defined(HAVE_move_int_const)
+extern void HAVE_move_int_const (sequence* s);
+#endif
+#if defined(HAVE_move_ref_const)
+extern void HAVE_move_ref_const (sequence* s);
+#endif
+#if defined(HAVE_move_label_const)
+extern void HAVE_move_label_const (sequence* s);
+#endif
+#if defined(HAVE_move_int)
+extern void HAVE_move_int (sequence* s);
+#endif
+#if defined(HAVE_move_ref)
+extern void HAVE_move_ref (sequence* s);
+#endif
+#if defined(HAVE_move_float_const)
+extern void HAVE_move_float_const (sequence* s);
+#endif
+#if defined(HAVE_move_float)
+extern void HAVE_move_float (sequence* s);
+#endif
+#if defined(HAVE_move_double_const)
+extern void HAVE_move_double_const (sequence* s);
+#endif
+#if defined(HAVE_move_double)
+extern void HAVE_move_double (sequence* s);
+#endif
+#if defined(HAVE_move_any)
+extern void HAVE_move_any (sequence* s);
+#endif
+#if defined(HAVE_swap_any)
+extern void HAVE_swap_any (sequence* s);
+#endif
+#if defined(HAVE_add_int)
+extern void HAVE_add_int (sequence* s);
+#endif
+#if defined(HAVE_add_ref)
+extern void HAVE_add_ref (sequence* s);
+#endif
+#if defined(HAVE_adc_int)
+extern void HAVE_adc_int (sequence* s);
+#endif
+#if defined(HAVE_add_float)
+extern void HAVE_add_float (sequence* s);
+#endif
+#if defined(HAVE_add_double)
+extern void HAVE_add_double (sequence* s);
+#endif
+#if defined(HAVE_sub_int)
+extern void HAVE_sub_int (sequence* s);
+#endif
+#if defined(HAVE_sbc_int)
+extern void HAVE_sbc_int (sequence* s);
+#endif
+#if defined(HAVE_sub_float)
+extern void HAVE_sub_float (sequence* s);
+#endif
+#if defined(HAVE_sub_double)
+extern void HAVE_sub_double (sequence* s);
+#endif
+#if defined(HAVE_neg_float)
+extern void HAVE_neg_float (sequence* s);
+#endif
+#if defined(HAVE_neg_double)
+extern void HAVE_neg_double (sequence* s);
+#endif
+#if defined(HAVE_mul_int)
+extern void HAVE_mul_int (sequence* s);
+#endif
+#if defined(HAVE_mul_float)
+extern void HAVE_mul_float (sequence* s);
+#endif
+#if defined(HAVE_mul_double)
+extern void HAVE_mul_double (sequence* s);
+#endif
+#if defined(HAVE_div_int)
+extern void HAVE_div_int (sequence* s);
+#endif
+#if defined(HAVE_div_float)
+extern void HAVE_div_float (sequence* s);
+#endif
+#if defined(HAVE_div_double)
+extern void HAVE_div_double (sequence* s);
+#endif
+#if defined(HAVE_rem_int)
+extern void HAVE_rem_int (sequence* s);
+#endif
+#if defined(HAVE_and_int)
+extern void HAVE_and_int (sequence* s);
+#endif
+#if defined(HAVE_or_int)
+extern void HAVE_or_int (sequence* s);
+#endif
+#if defined(HAVE_xor_int)
+extern void HAVE_xor_int (sequence* s);
+#endif
+#if defined(HAVE_ashr_int)
+extern void HAVE_ashr_int (sequence* s);
+#endif
+#if defined(HAVE_lshr_int)
+extern void HAVE_lshr_int (sequence* s);
+#endif
+#if defined(HAVE_lshl_int)
+extern void HAVE_lshl_int (sequence* s);
+#endif
+#if defined(HAVE_load_int)
+extern void HAVE_load_int (sequence* s);
+#endif
+#if defined(HAVE_load_ref)
+extern void HAVE_load_ref (sequence* s);
+#endif
+#if defined(HAVE_load_float)
+extern void HAVE_load_float (sequence* s);
+#endif
+#if defined(HAVE_load_double)
+extern void HAVE_load_double (sequence* s);
+#endif
+#if defined(HAVE_store_int)
+extern void HAVE_store_int (sequence* s);
+#endif
+#if defined(HAVE_store_ref)
+extern void HAVE_store_ref (sequence* s);
+#endif
+#if defined(HAVE_store_float)
+extern void HAVE_store_float (sequence* s);
+#endif
+#if defined(HAVE_store_double)
+extern void HAVE_store_double (sequence* s);
+#endif
+#if defined(HAVE_cmp_int)
+extern void HAVE_cmp_int (sequence* s);
+#endif
+#if defined(HAVE_cmp_ref)
+extern void HAVE_cmp_ref (sequence* s);
+#endif
+#if defined(HAVE_cmp_int_const)
+extern void HAVE_cmp_int_const (sequence* s);
+#endif
+#if defined(HAVE_cvt_int_byte)
+extern void HAVE_cvt_int_byte (sequence* s);
+#endif
+#if defined(HAVE_cvt_int_float)
+extern void HAVE_cvt_int_float (sequence* s);
+#endif
+#if defined(HAVE_cvt_int_double)
+extern void HAVE_cvt_int_double (sequence* s);
+#endif
 extern void cvtlf_RxR (sequence* s);
 extern void cvtld_RxR (sequence* s);
-extern void cvtfd_RxR (sequence* s);
-extern void cvtdf_RxR (sequence* s);
-extern void set_word_xxC (sequence* s);
-extern void set_wordpc_xxC (sequence* s);
-extern void set_label_xxC (sequence* s);
-extern void branch_xCC (sequence* s);
-extern void branch_indirect_xRC (sequence* s);
-extern void call_xCC (sequence* s);
-extern void call_xRC (sequence* s);
-extern void call_ind_xCC (sequence* s);
-extern void push_xRC (sequence* s);
-extern void fpush_xRC (sequence* s);
-extern void fpushl_xRC (sequence* s);
-extern void popargs_xxC (sequence* s);
-extern void return_Rxx (sequence* s);
-extern void returnl_Rxx (sequence* s);
-extern void freturn_Rxx (sequence* s);
-extern void freturnl_Rxx (sequence* s);
-extern void returnarg_xxR (sequence* s);
-extern void returnargl_xxR (sequence* s);
-extern void freturnarg_xxR (sequence* s);
-extern void freturnargl_xxR (sequence* s);
-extern void add_RRC (sequence* s);
-extern void sub_RRC (sequence* s);
-extern void load_RRC (sequence* s);
-extern void loadb_RxR (sequence* s);
-extern void loadc_RxR (sequence* s);
-extern void loads_RxR (sequence* s);
-extern void store_xRRC (sequence* s);
-extern void storeb_xRR (sequence* s);
-extern void stores_xRR (sequence* s);
-extern void cmp_xRC (sequence* s);
-extern void push_xCC (sequence* s);
-extern void lshl_RRC (sequence* s);
-extern void monenter_xxRCC (sequence* s);
-extern void monexit_xxRCC (sequence* s);
-extern void get_arg_ptr_R (sequence* s);
-extern void and_RRC (sequence* s);
-extern void or_RRC (sequence* s);
-extern void xor_RRC (sequence* s);
-extern void mul_RRC (sequence* s);
-extern void lshr_RRC (sequence* s);
-extern void ashr_RRC (sequence* s);
-extern void neg_RxR (sequence* s);
-extern void loadb_RRRC (sequence* s);
-extern void load_RRRC (sequence* s);
-extern void loadc_RRRC (sequence* s);
-extern void storeb_RRRC (sequence* s);
-extern void stores_RRRC (sequence* s);
-extern void store_RRRC (sequence* s);
-extern void load_RxA (sequence* s);
-extern void store_xRA (sequence* s);
-extern void storeb_xRRC (sequence* s);
-extern void stores_xRRC (sequence* s);
-extern void store_xRCC (sequence* s);
-extern void storeb_xRCC (sequence* s);
-extern void storeb_RRCC (sequence* s);
-extern void fakecall_xCC (sequence* s);
-extern void cmp_xRRC (sequence* s);
+#if defined(HAVE_cvt_float_double)
+extern void HAVE_cvt_float_double (sequence* s);
+#endif
+#if defined(HAVE_cvt_double_float)
+extern void HAVE_cvt_double_float (sequence* s);
+#endif
+#if defined(HAVE_build_key)
+extern void HAVE_build_key (sequence* s);
+#endif
+#if defined(HAVE_build_code_ref)
+extern void HAVE_build_code_ref (sequence* s);
+#endif
+#if defined(HAVE_set_label)
+extern void HAVE_set_label (sequence* s);
+#endif
+#if defined(HAVE_branch)
+extern void HAVE_branch (sequence* s);
+#endif
+#if defined(HAVE_branch_indirect)
+extern void HAVE_branch_indirect (sequence* s);
+#endif
+#if defined(HAVE_call_ref)
+extern void HAVE_call_ref (sequence* s);
+#endif
+#if defined(HAVE_call)
+extern void HAVE_call (sequence* s);
+#endif
+#if defined(HAVE_call_indirect_const)
+extern void HAVE_call_indirect_const (sequence* s);
+#endif
+#if defined(HAVE_pusharg_int)
+extern void HAVE_pusharg_int (sequence* s);
+#endif
+#if defined(HAVE_pusharg_ref)
+extern void HAVE_pusharg_ref (sequence* s);
+#endif
+#if defined(HAVE_pusharg_float)
+extern void HAVE_pusharg_float (sequence* s);
+#endif
+#if defined(HAVE_pusharg_double)
+extern void HAVE_pusharg_double (sequence* s);
+#endif
+#if defined(HAVE_popargs)
+extern void HAVE_popargs (sequence* s);
+#endif
+#if defined(HAVE_return_int)
+extern void HAVE_return_int (sequence* s);
+#endif
+#if defined(HAVE_return_ref)
+extern void HAVE_return_ref (sequence* s);
+#endif
+#if defined(HAVE_return_long)
+extern void HAVE_return_long (sequence* s);
+#endif
+#if defined(HAVE_return_float)
+extern void HAVE_return_float (sequence* s);
+#endif
+#if defined(HAVE_return_double)
+extern void HAVE_return_double (sequence* s);
+#endif
+#if defined(HAVE_returnarg_int)
+extern void HAVE_returnarg_int (sequence* s);
+#endif
+#if defined(HAVE_returnarg_ref)
+extern void HAVE_returnarg_ref (sequence* s);
+#endif
+#if defined(HAVE_returnarg_long)
+extern void HAVE_returnarg_long (sequence* s);
+#endif
+#if defined(HAVE_returnarg_float)
+extern void HAVE_returnarg_float (sequence* s);
+#endif
+#if defined(HAVE_returnarg_double)
+extern void HAVE_returnarg_double (sequence* s);
+#endif
+#if defined(HAVE_add_int_const)
+extern void HAVE_add_int_const (sequence* s);
+#endif
+#if defined(HAVE_add_ref_const)
+extern void HAVE_add_ref_const (sequence* s);
+#endif
+#if defined(HAVE_sub_int_const)
+extern void HAVE_sub_int_const (sequence* s);
+#endif
+#if defined(HAVE_load_offset_int)
+extern void HAVE_load_offset_int (sequence* s);
+#endif
+#if defined(HAVE_load_offset_ref)
+extern void HAVE_load_offset_ref (sequence* s);
+#endif
+#if defined(HAVE_load_byte)
+extern void HAVE_load_byte (sequence* s);
+#endif
+#if defined(HAVE_load_char)
+extern void HAVE_load_char (sequence* s);
+#endif
+#if defined(HAVE_load_short)
+extern void HAVE_load_short (sequence* s);
+#endif
+#if defined(HAVE_store_offset_int)
+extern void HAVE_store_offset_int (sequence* s);
+#endif
+#if defined(HAVE_store_offset_ref)
+extern void HAVE_store_offset_ref (sequence* s);
+#endif
+#if defined(HAVE_store_byte)
+extern void HAVE_store_byte (sequence* s);
+#endif
+#if defined(HAVE_store_short)
+extern void HAVE_store_short (sequence* s);
+#endif
+#if defined(HAVE_cmp_ref_const)
+extern void HAVE_cmp_ref_const (sequence* s);
+#endif
+#if defined(HAVE_pusharg_int_const)
+extern void HAVE_pusharg_int_const (sequence* s);
+#endif
+#if defined(HAVE_pusharg_ref_const)
+extern void HAVE_pusharg_ref_const (sequence* s);
+#endif
+#if defined(HAVE_lshl_int_const)
+extern void HAVE_lshl_int_const (sequence* s);
+#endif
+#if defined(HAVE_mon_enter)
+extern void HAVE_mon_enter (sequence* s);
+#endif
+#if defined(HAVE_mon_exit)
+extern void HAVE_mon_exit (sequence* s);
+#endif
+#if defined(HAVE_get_arg_ptr)
+extern void HAVE_get_arg_ptr (sequence* s);
+#endif
+#if defined(HAVE_and_int_const)
+extern void HAVE_and_int_const (sequence* s);
+#endif
+#if defined(HAVE_or_int_const)
+extern void HAVE_or_int_const  (sequence* s);
+#endif
+#if defined(HAVE_xor_int_const)
+extern void HAVE_xor_int_const (sequence* s);
+#endif
+#if defined(HAVE_mul_int_const)
+extern void HAVE_mul_int_const (sequence* s);
+#endif
+#if defined(HAVE_lshr_int_const)
+extern void HAVE_lshr_int_const (sequence* s);
+#endif
+#if defined(HAVE_ashr_int_const)
+extern void HAVE_ashr_int_const (sequence* s);
+#endif
+#if defined(HAVE_neg_int)
+extern void HAVE_neg_int (sequence* s);
+#endif
+#if defined(HAVE_ngc_int)
+extern void HAVE_ngc_int (sequence* s);
+#endif
+#if defined(HAVE_load_offset_scaled_byte)
+extern void HAVE_load_offset_scaled_byte (sequence* s);
+#endif
+#if defined(HAVE_load_offset_scaled_int)
+extern void HAVE_load_offset_scaled_int (sequence* s);
+#endif
+#if defined(HAVE_load_offset_scaled_char)
+extern void HAVE_load_offset_scaled_char (sequence* s);
+#endif
+#if defined(HAVE_store_offset_scaled_byte)
+extern void HAVE_store_offset_scaled_byte (sequence* s);
+#endif
+#if defined(HAVE_store_offset_scaled_short)
+extern void HAVE_store_offset_scaled_short (sequence* s);
+#endif
+#if defined(HAVE_store_offset_scaled_int)
+extern void HAVE_store_offset_scaled_int (sequence* s);
+#endif
+#if defined(HAVE_load_addr_int)
+extern void HAVE_load_addr_int (sequence* s);
+#endif
+#if defined(HAVE_store_addr_int)
+extern void HAVE_store_addr_int (sequence* s);
+#endif
+#if defined(HAVE_store_offset_byte)
+extern void HAVE_store_offset_byte (sequence* s);
+#endif
+#if defined(HAVE_store_offset_short)
+extern void HAVE_store_offset_short (sequence* s);
+#endif
+#if defined(HAVE_store_const_offset_int)
+extern void HAVE_store_const_offset_int (sequence* s);
+#endif
+#if defined(HAVE_store_const_offset_byte)
+extern void HAVE_store_const_offset_byte (sequence* s);
+#endif
+#if defined(HAVE_store_const_offset_scaled_byte)
+extern void HAVE_store_const_offset_scaled_byte (sequence* s);
+#endif
+#if defined(HAVE_fakecall)
+extern void HAVE_fakecall (sequence* s);
+#endif
+#if defined(HAVE_cmp_offset_int)
+extern void HAVE_cmp_offset_int (sequence* s);
+#endif
 
 #endif




More information about the kaffe mailing list