[kaffe] CVS kaffe (inaba): Reorder function definitions for m68k jit staffs.

Kaffe CVS cvs-commits at kaffe.org
Wed May 9 06:45:00 PDT 2007


PatchSet 7479 
Date: 2007/05/09 13:43:50
Author: inaba
Branch: HEAD
Tag: (none) 
Log:
Reorder function definitions for m68k jit staffs.

Members: 
	ChangeLog:1.4978->1.4979 
	config/m68k/jit-m68k.def:1.11->1.12 
	config/m68k/jit3-m68k.def:1.15->1.16 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4978 kaffe/ChangeLog:1.4979
--- kaffe/ChangeLog:1.4978	Thu May  3 08:51:56 2007
+++ kaffe/ChangeLog	Wed May  9 13:43:50 2007
@@ -1,3 +1,8 @@
+2007-05-09  Kiyo Inaba <inaba at src.ricoh.co.jp>
+
+	* config/m68k/jit-m68k.def,
+	config/m68k/jit3-m68k.def: Reorder function definitions.
+
 2007-05-03  Dalibor Topic  <robilad at kaffe.org>
 
 	* libraries/javalib/external/classpath/tools/Makefile.am:
Index: kaffe/config/m68k/jit-m68k.def
diff -u kaffe/config/m68k/jit-m68k.def:1.11 kaffe/config/m68k/jit-m68k.def:1.12
--- kaffe/config/m68k/jit-m68k.def:1.11	Mon May  9 23:35:57 2005
+++ kaffe/config/m68k/jit-m68k.def	Wed May  9 13:43:52 2007
@@ -1256,19 +1256,6 @@
 #endif
 }
 
-define_insn(epilogue, epilogue_xxx)
-{
-	KaffeJIT_setEpilogueLabel ((uintp)CODEPC);
-
-#if defined(HAVE_NO_MOVEM)
-#else
-	op_moveml_pr(REG_sp, RESTOREMASK);
-#endif
-
-	op_unlk_a(REG_fp);
-	op_rts();
-}
-
 define_insn(eprologue, eprologue_xxx)
 {
 	int framesize = (maxLocal - maxArgs + maxStack + maxTemp) * SLOTSIZE;
@@ -1286,6 +1273,19 @@
 	op_moveal_aa(REG_a0, REG_sp);
 }
 
+define_insn(epilogue, epilogue_xxx)
+{
+	KaffeJIT_setEpilogueLabel ((uintp)CODEPC);
+
+#if defined(HAVE_NO_MOVEM)
+#else
+	op_moveml_pr(REG_sp, RESTOREMASK);
+#endif
+
+	op_unlk_a(REG_fp);
+	op_rts();
+}
+
 #if defined(JIT3)
 define_insn(check_stack_limit, check_stack_limit_xRC)
 {
@@ -1476,6 +1476,16 @@
 
 /* --------------------------------------------------------------------- */
 
+define_insn(add_int, addi_RRR)
+{
+	int r = rreg_int(2);
+	int w = rwreg_int(0);
+
+	assert(rreg_int(1) == w);
+
+	op_addl_dd(r, w);
+}
+
 define_insn(add_int_const, addi_RRC)
 {
 	int o = const_int(2);
@@ -1491,24 +1501,24 @@
 	}
 }
 
-define_insn(add_int, addi_RRR)
+define_insn(adc_int, adci_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_addl_dd(r, w);
+	op_addxl_dd(r, w);
 }
 
-define_insn(adc_int, adci_RRR)
+define_insn(add_ref, addr_RRR)
 {
 	int r = rreg_int(2);
-	int w = rwreg_int(0);
+	int w = rwreg_ref(0);
 
-	assert(rreg_int(1) == w);
+	assert(rreg_ref(1) == w);
 
-	op_addxl_dd(r, w);
+	op_addal_da(r, w);
 }
 
 define_insn(add_ref_const, addr_RRC)
@@ -1531,16 +1541,6 @@
 	}
 }
 
-define_insn(add_ref, addr_RRR)
-{
-	int r = rreg_int(2);
-	int w = rwreg_ref(0);
-
-	assert(rreg_ref(1) == w);
-
-	op_addal_da(r, w);
-}
-
 define_insn(add_float, addf_RRR)
 {
 	int r = rreg_float(2);
@@ -1561,6 +1561,16 @@
 	op_fdaddx_ff(r, w);
 }
 
+define_insn(sub_int, subi_RRR)
+{
+	int r = rreg_int(2);
+	int w = rwreg_int(0);
+
+	assert(rreg_int(1) == w);
+
+	op_subl_dd(r, w);
+}
+
 define_insn(sub_int_const, subi_RRC)
 {
 	int o = const_int(2);
@@ -1576,16 +1586,6 @@
 	}
 }
 
-define_insn(sub_int, subi_RRR)
-{
-	int r = rreg_int(2);
-	int w = rwreg_int(0);
-
-	assert(rreg_int(1) == w);
-
-	op_subl_dd(r, w);
-}
-
 define_insn(sbc_int, sbci_RRR)
 {
 	int r = rreg_int(2);
@@ -1650,16 +1650,6 @@
 	op_fdnegx_ff(r, w);
 }
 
-define_insn(mul_int_const, muli_RRC)
-{
-	int o = const_int(2);
-	int rw = rwreg_int(0);
-
-	assert(rreg_int(1) == rw);
-
-	op_mulsl_id(o, rw);
-}
-
 define_insn(mul_int, muli_RRR)
 {
 	int r = rreg_int(2);
@@ -1670,6 +1660,16 @@
 	op_mulsl_dd(r, w);
 }
 
+define_insn(mul_int_const, muli_RRC)
+{
+	int o = const_int(2);
+	int rw = rwreg_int(0);
+
+	assert(rreg_int(1) == rw);
+
+	op_mulsl_id(o, rw);
+}
+
 define_insn(mul_float, mulf_RRR)
 {
 	int r = rreg_float(2);
@@ -1755,6 +1755,16 @@
 
 /* --------------------------------------------------------------------- */
 
+define_insn(and_int, andi_RRR)
+{
+	int r = rreg_int(2);
+	int w = rwreg_int(0);
+
+	assert(rreg_int(1) == w);
+
+	op_andl_dd(r, w);
+}
+
 define_insn(and_int_const, andi_RRC)
 {
 	int o = const_int(2);
@@ -1765,34 +1775,34 @@
 	op_andl_id(o, rw);
 }
 
-define_insn(and_int, andi_RRR)
+define_insn(or_int, ori_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_andl_dd(r, w);
+	op_orl_dd(r, w);
 }
 
-define_insn(or_int, ori_RRR)
+define_insn(xor_int, xori_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_orl_dd(r, w);
+	op_eorl_dd(r, w);
 }
 
-define_insn(xor_int, xori_RRR)
+define_insn(ashr_int, ashri_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_eorl_dd(r, w);
+	op_asr_dd(r, w);
 }
 
 define_insn(ashr_int_const, ashri_RRC)
@@ -1805,14 +1815,14 @@
 	op_asr_id(o, rw);
 }
 
-define_insn(ashr_int, ashri_RRR)
+define_insn(lshr_int, lshri_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_asr_dd(r, w);
+	op_lsr_dd(r, w);
 }
 
 define_insn(lshr_int_const, lshri_RRC)
@@ -1825,14 +1835,14 @@
 	op_lsr_id(o, rw);
 }
 
-define_insn(lshr_int, lshri_RRR)
+define_insn(lshl_int, lshli_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_lsr_dd(r, w);
+	op_lsl_dd(r, w);
 }
 
 define_insn(lshl_int_const, lshli_RRC)
@@ -1845,115 +1855,82 @@
 	op_lsl_id(o, rw);
 }
 
-define_insn(lshl_int, lshli_RRR)
-{
-	int r = rreg_int(2);
-	int w = rwreg_int(0);
+/* --------------------------------------------------------------------- */
 
-	assert(rreg_int(1) == w);
+define_insn(load_offset_int, loadi_RRC)
+{
+	int o = const_int(2);
+	int r = rreg_ref(1);
+	int w = wreg_int(0);
 
-	op_lsl_dd(r, w);
+	op_movel_od(r, o, w);
 }
 
-define_insn(cmp_int_const, cmpi_xRC)
+define_insn(load_offset_ref, loadr_RRC)
 {
-	int v = const_int(2);
-	int r = rreg_int(1);
+	int o = const_int(2);
+	int r = rreg_ref(1);
+	int w = wreg_ref(0);
 
-	if (v != 0) {
-		op_cmpil_id(v, r);
-	}
-	else {
-		op_tst_d(r);
-	}
+	assert(o >= -0x8000 && o < 0x8000);
+	op_moveal_oa(r, o, w);
 }
 
-define_insn(cmp_int, cmpi_xRR)
+define_insn(store_offset_int, storei_xRRC)
 {
-	int r1 = rreg_int(1);
-	int r2 = rreg_int(2);
+	int o = const_int(2);
+	int w = rreg_ref(1);
+	int r = rreg_int(0);
 
-	op_cmpl_dd(r2, r1);
+	assert(o >= -0x8000 && o < 0x8000);
+	op_movel_do(r, w, o);
 }
 
-define_insn(cmp_ref_const, cmpr_xRC)
+define_insn(store_offset_ref, storer_xRRC)
 {
-	int v = const_int(2);
-	int r = rreg_ref(1);
+	int o = const_int(2);
+	int w = rreg_ref(1);
+	int r = rreg_ref(0);
 
-	if (v != 0) {
-		op_cmpil_ia(v, r);
-	}
-	else {
-		op_tst_a(r);
-	}
+	assert(o >= -0x8000 && o < 0x8000);
+	op_movel_ao(r, w, o);
 }
 
-define_insn(cmp_ref, cmpr_xRR)
+/* --------------------------------------------------------------------- */
+
+define_insn(load_byte, loadb_RxR)
 {
-	int r1 = rreg_ref(1);
-	int r2 = rreg_ref(2);
+	int r = rreg_ref(2);
+	int w = wreg_int(0);
 
-	op_cmpal_aa(r2, r1);
+	op_moveb_Id(r, w);
+	op_extbl_d(w);
 }
 
-#if !defined(HAVE_NO_SWAP_ANY)
-define_insn(swap_any, swap_RxR)
+define_insn(load_char, loadc_RxR)
 {
-	int r1, r2, type = 0;
-
-	if (slotInRegister(2, Rref)) {
-		r2 = rwreg_ref(2);
-		type |= 2;
-	}
-	else {
-		r2 = rwreg_int(2);
-	}
-
-	if (slotInRegister(0, Rref)) {
-		r1 = rwreg_ref(0);
-		type |= 1;
-	}
-	else {
-		r1 = rwreg_int(0);
-	}
+	int r = rreg_ref(2);
+	int w = wreg_int(0);
 
-	switch (type) {
-	case 0:
-		op_exg_dd(r1, r2);
-		break;
-	case 3:
-		op_exg_aa(r1, r2);
-		break;
-	case 2:
-		op_exg_da(r1, r2);
-		break;
-	case 1:
-		op_exg_da(r2, r1);
-		break;
-	default:
-		KAFFEVM_ABORT();
-	}
+	op_clrl_d(w);
+	op_movew_Id(r, w);
 }
-#endif
 
-/* --------------------------------------------------------------------- */
-
-define_insn(load_int, loadi_RxR)
+define_insn(load_short, loads_RxR)
 {
 	int r = rreg_ref(2);
 	int w = wreg_int(0);
 
-	op_movel_Id(r, w);
+	op_movew_Id(r, w);
+	op_extwl_d(w);
 }
 
-define_insn(load_offset_int, loadi_RRC)
+define_insn(load_int, loadi_RxR)
 {
-	int o = const_int(2);
-	int r = rreg_ref(1);
+	int r = rreg_ref(2);
 	int w = wreg_int(0);
 
-	op_movel_od(r, o, w);
+	op_movel_Id(r, w);
 }
 
 define_insn(load_ref, loadr_RxR)
@@ -1964,16 +1941,6 @@
 	op_moveal_Ia(r, w);
 }
 
-define_insn(load_offset_ref, loadr_RRC)
-{
-	int o = const_int(2);
-	int r = rreg_ref(1);
-	int w = wreg_ref(0);
-
-	assert(o >= -0x8000 && o < 0x8000);
-	op_moveal_oa(r, o, w);
-}
-
 define_insn(load_float, loadf_RxR)
 {
 	int r = rreg_ref(2);
@@ -1990,31 +1957,20 @@
 	op_fdmoved_If(r, w);
 }
 
-define_insn(load_byte, loadb_RxR)
-{
-	int r = rreg_ref(2);
-	int w = wreg_int(0);
-
-	op_moveb_Id(r, w);
-	op_extbl_d(w);
-}
-
-define_insn(load_char, loadc_RxR)
+define_insn(store_byte, storeb_xRR)
 {
-	int r = rreg_ref(2);
-	int w = wreg_int(0);
+	int r = rreg_int(2);
+	int w = rreg_ref(1);
 
-	op_clrl_d(w);
-	op_movew_Id(r, w);
+	op_moveb_dI(r, w);
 }
 
-define_insn(load_short, loads_RxR)
+define_insn(store_short, stores_xRR)
 {
-	int r = rreg_ref(2);
-	int w = wreg_int(0);
+	int r = rreg_int(2);
+	int w = rreg_ref(1);
 
-	op_movew_Id(r, w);
-	op_extwl_d(w);
+	op_movew_dI(r, w);
 }
 
 define_insn(store_int, storei_xRR)
@@ -2025,16 +1981,6 @@
 	op_movel_dI(r, w);
 }
 
-define_insn(store_offset_int, storei_xRRC)
-{
-	int o = const_int(2);
-	int w = rreg_ref(1);
-	int r = rreg_int(0);
-
-	assert(o >= -0x8000 && o < 0x8000);
-	op_movel_do(r, w, o);
-}
-
 define_insn(store_ref, storer_xRR)
 {
 	int r = rreg_ref(2);
@@ -2043,16 +1989,6 @@
 	op_movel_aI(r, w);
 }
 
-define_insn(store_offset_ref, storer_xRRC)
-{
-	int o = const_int(2);
-	int w = rreg_ref(1);
-	int r = rreg_ref(0);
-
-	assert(o >= -0x8000 && o < 0x8000);
-	op_movel_ao(r, w, o);
-}
-
 define_insn(store_float, storef_xRR)
 {
 	int r = rreg_float(2);
@@ -2069,23 +2005,89 @@
 	op_fmoved_fI(r, w);
 }
 
-define_insn(store_byte, storeb_xRR)
+/* --------------------------------------------------------------------- */
+
+define_insn(cmp_int, cmpi_xRR)
 {
-	int r = rreg_int(2);
-	int w = rreg_ref(1);
+	int r1 = rreg_int(1);
+	int r2 = rreg_int(2);
 
-	op_moveb_dI(r, w);
+	op_cmpl_dd(r2, r1);
 }
 
-define_insn(store_short, stores_xRR)
+define_insn(cmp_int_const, cmpi_xRC)
 {
-	int r = rreg_int(2);
-	int w = rreg_ref(1);
+	int v = const_int(2);
+	int r = rreg_int(1);
 
-	op_movew_dI(r, w);
+	if (v != 0) {
+		op_cmpil_id(v, r);
+	}
+	else {
+		op_tst_d(r);
+	}
 }
 
-/* --------------------------------------------------------------------- */
+define_insn(cmp_ref, cmpr_xRR)
+{
+	int r1 = rreg_ref(1);
+	int r2 = rreg_ref(2);
+
+	op_cmpal_aa(r2, r1);
+}
+
+define_insn(cmp_ref_const, cmpr_xRC)
+{
+	int v = const_int(2);
+	int r = rreg_ref(1);
+
+	if (v != 0) {
+		op_cmpil_ia(v, r);
+	}
+	else {
+		op_tst_a(r);
+	}
+}
+
+#if !defined(HAVE_NO_SWAP_ANY)
+define_insn(swap_any, swap_RxR)
+{
+	int r1, r2, type = 0;
+
+	if (slotInRegister(2, Rref)) {
+		r2 = rwreg_ref(2);
+		type |= 2;
+	}
+	else {
+		r2 = rwreg_int(2);
+	}
+
+	if (slotInRegister(0, Rref)) {
+		r1 = rwreg_ref(0);
+		type |= 1;
+	}
+	else {
+		r1 = rwreg_int(0);
+	}
+
+	switch (type) {
+	case 0:
+		op_exg_dd(r1, r2);
+		break;
+	case 3:
+		op_exg_aa(r1, r2);
+		break;
+	case 2:
+		op_exg_da(r1, r2);
+		break;
+	case 1:
+		op_exg_da(r2, r1);
+		break;
+	default:
+		KAFFEVM_ABORT();
+	}
+}
+#endif
 
 define_insn(cvt_int_byte, cvtib_RxR)
 {
@@ -2300,6 +2302,11 @@
 	}
 }
 
+define_insn(pusharg_int, pushi_xRC)
+{
+	m68k_pusharg_single(s);
+}
+
 define_insn(pusharg_int_const, pushi_xCC)
 {
 	int o = const_int(1);
@@ -2307,8 +2314,7 @@
 	op_movel_ip(o, REG_sp);
 }
 
-
-define_insn(pusharg_int, pushi_xRC)
+define_insn(push_ref, pushr_xRC)
 {
 	m68k_pusharg_single(s);
 }
@@ -2318,11 +2324,6 @@
 	int o = const_int(1);
 
 	op_movel_ip(o, REG_sp);
-}
-
-define_insn(push_ref, pushr_xRC)
-{
-	m68k_pusharg_single(s);
 }
 
 define_insn(push_float, pushf_xRC)
Index: kaffe/config/m68k/jit3-m68k.def
diff -u kaffe/config/m68k/jit3-m68k.def:1.15 kaffe/config/m68k/jit3-m68k.def:1.16
--- kaffe/config/m68k/jit3-m68k.def:1.15	Mon Jun 27 07:27:22 2005
+++ kaffe/config/m68k/jit3-m68k.def	Wed May  9 13:43:52 2007
@@ -1271,6 +1271,28 @@
 #endif
 }
 
+define_insn(eprologue, eprologue_xxx)
+{
+	label* l;
+
+	l = (label*)const_int(1);
+	l->type = Llnegframe|Labsolute|Lgeneral;
+
+	/* Be careful not to dealocate our current frame even for
+	   an instant.  */
+	op_moveal_aa(REG_fp, REG_a0);
+	l->at = (uintp)CODEPC+2;
+	op_addal_ia(0, REG_a0);
+
+#if !defined(HAVE_NO_SUBAW)
+	op_subaw_ia(SRNR * SLOTSIZE, REG_a0);
+#else
+	op_subal_ia(SRNR * SLOTSIZE, REG_a0);
+#endif
+
+	op_moveal_aa(REG_a0, REG_sp);
+}
+
 define_insn(epilogue, epilogue_xxx)
 {
 	KaffeJIT3_setEpilogueLabel ((uintp)CODEPC);
@@ -1298,28 +1320,6 @@
 	op_rts();
 }
 
-define_insn(eprologue, eprologue_xxx)
-{
-	label* l;
-
-	l = (label*)const_int(1);
-	l->type = Llnegframe|Labsolute|Lgeneral;
-
-	/* Be careful not to dealocate our current frame even for
-	   an instant.  */
-	op_moveal_aa(REG_fp, REG_a0);
-	l->at = (uintp)CODEPC+2;
-	op_addal_ia(0, REG_a0);
-
-#if !defined(HAVE_NO_SUBAW)
-	op_subaw_ia(SRNR * SLOTSIZE, REG_a0);
-#else
-	op_subal_ia(SRNR * SLOTSIZE, REG_a0);
-#endif
-
-	op_moveal_aa(REG_a0, REG_sp);
-}
-
 #if defined(JIT3)
 define_insn(check_stack_limit, check_stack_limit_xRC)
 {
@@ -1510,6 +1510,16 @@
 
 /* --------------------------------------------------------------------- */
 
+define_insn(add_int, addi_RRR)
+{
+	int r = rreg_int(2);
+	int w = rwreg_int(0);
+
+	assert(rreg_int(1) == w);
+
+	op_addl_dd(r, w);
+}
+
 define_insn(add_int_const, addi_RRC)
 {
 	int o = const_int(2);
@@ -1525,24 +1535,24 @@
 	}
 }
 
-define_insn(add_int, addi_RRR)
+define_insn(adc_int, adci_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_addl_dd(r, w);
+	op_addxl_dd(r, w);
 }
 
-define_insn(adc_int, adci_RRR)
+define_insn(add_ref, addr_RRR)
 {
 	int r = rreg_int(2);
-	int w = rwreg_int(0);
+	int w = rwreg_ref(0);
 
-	assert(rreg_int(1) == w);
+	assert(rreg_ref(1) == w);
 
-	op_addxl_dd(r, w);
+	op_addal_da(r, w);
 }
 
 define_insn(add_ref_const, addr_RRC)
@@ -1565,16 +1575,6 @@
 	}
 }
 
-define_insn(add_ref, addr_RRR)
-{
-	int r = rreg_int(2);
-	int w = rwreg_ref(0);
-
-	assert(rreg_ref(1) == w);
-
-	op_addal_da(r, w);
-}
-
 define_insn(add_float, addf_RRR)
 {
 	int r = rreg_float(2);
@@ -1595,6 +1595,16 @@
 	op_fdaddx_ff(r, w);
 }
 
+define_insn(sub_int, subi_RRR)
+{
+	int r = rreg_int(2);
+	int w = rwreg_int(0);
+
+	assert(rreg_int(1) == w);
+
+	op_subl_dd(r, w);
+}
+
 define_insn(sub_int_const, subi_RRC)
 {
 	int o = const_int(2);
@@ -1610,16 +1620,6 @@
 	}
 }
 
-define_insn(sub_int, subi_RRR)
-{
-	int r = rreg_int(2);
-	int w = rwreg_int(0);
-
-	assert(rreg_int(1) == w);
-
-	op_subl_dd(r, w);
-}
-
 define_insn(sbc_int, sbci_RRR)
 {
 	int r = rreg_int(2);
@@ -1684,16 +1684,6 @@
 	op_fdnegx_ff(r, w);
 }
 
-define_insn(mul_int_const, muli_RRC)
-{
-	int o = const_int(2);
-	int rw = rwreg_int(0);
-
-	assert(rreg_int(1) == rw);
-
-	op_mulsl_id(o, rw);
-}
-
 define_insn(mul_int, muli_RRR)
 {
 	int r = rreg_int(2);
@@ -1704,6 +1694,16 @@
 	op_mulsl_dd(r, w);
 }
 
+define_insn(mul_int_const, muli_RRC)
+{
+	int o = const_int(2);
+	int rw = rwreg_int(0);
+
+	assert(rreg_int(1) == rw);
+
+	op_mulsl_id(o, rw);
+}
+
 define_insn(mul_float, mulf_RRR)
 {
 	int r = rreg_float(2);
@@ -1808,6 +1808,16 @@
 
 /* --------------------------------------------------------------------- */
 
+define_insn(and_int, andi_RRR)
+{
+	int r = rreg_int(2);
+	int w = rwreg_int(0);
+
+	assert(rreg_int(1) == w);
+
+	op_andl_dd(r, w);
+}
+
 define_insn(and_int_const, andi_RRC)
 {
 	int o = const_int(2);
@@ -1818,34 +1828,34 @@
 	op_andl_id(o, rw);
 }
 
-define_insn(and_int, andi_RRR)
+define_insn(or_int, ori_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_andl_dd(r, w);
+	op_orl_dd(r, w);
 }
 
-define_insn(or_int, ori_RRR)
+define_insn(xor_int, xori_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_orl_dd(r, w);
+	op_eorl_dd(r, w);
 }
 
-define_insn(xor_int, xori_RRR)
+define_insn(ashr_int, ashri_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_eorl_dd(r, w);
+	op_asr_dd(r, w);
 }
 
 define_insn(ashr_int_const, ashri_RRC)
@@ -1858,14 +1868,14 @@
 	op_asr_id(o, rw);
 }
 
-define_insn(ashr_int, ashri_RRR)
+define_insn(lshr_int, lshri_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_asr_dd(r, w);
+	op_lsr_dd(r, w);
 }
 
 define_insn(lshr_int_const, lshri_RRC)
@@ -1878,14 +1888,14 @@
 	op_lsr_id(o, rw);
 }
 
-define_insn(lshr_int, lshri_RRR)
+define_insn(lshl_int, lshli_RRR)
 {
 	int r = rreg_int(2);
 	int w = rwreg_int(0);
 
 	assert(rreg_int(1) == w);
 
-	op_lsr_dd(r, w);
+	op_lsl_dd(r, w);
 }
 
 define_insn(lshl_int_const, lshli_RRC)
@@ -1898,122 +1908,82 @@
 	op_lsl_id(o, rw);
 }
 
-define_insn(lshl_int, lshli_RRR)
-{
-	int r = rreg_int(2);
-	int w = rwreg_int(0);
+/* --------------------------------------------------------------------- */
 
-	assert(rreg_int(1) == w);
+define_insn(load_offset_int, loadi_RRC)
+{
+	int o = const_int(2);
+	int r = rreg_ref(1);
+	int w = wreg_int(0);
 
-	op_lsl_dd(r, w);
+	op_movel_od(r, o, w);
 }
 
-define_insn(cmp_int_const, cmpi_xRC)
+define_insn(load_offset_ref, loadr_RRC)
 {
-	int v = const_int(2);
-	int r = rreg_int(1);
+	int o = const_int(2);
+	int r = rreg_ref(1);
+	int w = wreg_ref(0);
 
-	if (v != 0) {
-		op_cmpil_id(v, r);
-	}
-	else {
-		op_tst_d(r);

*** Patch too long, truncated ***




More information about the kaffe mailing list