[kaffe] CVS kaffe (robilad): cleaned up x86 jit code

Kaffe CVS cvs-commits at kaffe.org
Thu Jan 17 19:19:01 PST 2008


PatchSet 7686 
Date: 2008/01/18 03:17:13
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
cleaned up x86 jit code

2008-01-18  Dalibor Topic  <robilad at kaffe.org>

* config/i386/jit-i386.def:  Removed unused nop and unimplemented
instructions. Removed ifdef-ed out code.

Members: 
	ChangeLog:1.5188->1.5189 
	config/i386/jit-i386.def:1.21->1.22 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5188 kaffe/ChangeLog:1.5189
--- kaffe/ChangeLog:1.5188	Fri Jan 18 03:13:03 2008
+++ kaffe/ChangeLog	Fri Jan 18 03:17:13 2008
@@ -1,5 +1,10 @@
 2008-01-18  Dalibor Topic  <robilad at kaffe.org>
 
+	* config/i386/jit-i386.def:  Removed unused nop and unimplemented 
+	instructions. Removed ifdef-ed out code.
+
+2008-01-18  Dalibor Topic  <robilad at kaffe.org>
+
 	* TODO: Updated.
 
 2008-01-18  Dalibor Topic  <robilad at kaffe.org>
Index: kaffe/config/i386/jit-i386.def
diff -u kaffe/config/i386/jit-i386.def:1.21 kaffe/config/i386/jit-i386.def:1.22
--- kaffe/config/i386/jit-i386.def:1.21	Fri May  6 15:24:24 2005
+++ kaffe/config/i386/jit-i386.def	Fri Jan 18 03:17:15 2008
@@ -148,19 +148,6 @@
 
 /* --------------------------------------------------------------------- */
 
-define_insn(unimplemented, unimplemented)
-{
-	KAFFEVM_ABORT();
-}
-
-define_insn(nop, nop)
-{
-	OUT(0x90);
-	debug(("nop\n"));
-}
-
-/* --------------------------------------------------------------------- */
-
 define_insn(prologue, prologue_xxx)
 {
 	label* l;
@@ -198,44 +185,6 @@
 		debug(("incl 0x%x\n",(int)&(globalMethod->callsCount)));
 	}
 #endif
-
-#if 0
-	/* If this method uses IEEE, set up the mode here */
-	if (used_ieee_division == true) {
-		OUT(0x68);
-		LOUT(0);
-		OUT(0x68);
-		LOUT(0);
-		debug(("pushl #0\n"));
-		debug(("pushl #0\n"));
-
-		OUT(0xD9);
-		OUT(0x3C);
-		OUT(0x24);
-		debug(("fnstcw (esp)\n"));
-
-		OUT(0x8B);
-		OUT((REG_eax<<3)|0x04);
-		OUT(0x24);
-		debug(("movl (esp),eax\n"));
-
-		OUT(0xB8|REG_eax);
-		LOUT(IEEE_MODE);
-		debug(("movl %d,eax\n", IEEE_MODE));
-
-		OUT(0x89);
-		OUT((REG_eax<<3)|0x44);
-		OUT(0x24);
-		OUT(0x04);
-		debug(("movl eax,4(esp)\n"));
-
-		OUT(0xD9);
-		OUT(0x6C);
-		OUT(0x24);
-		OUT(0x04);
-		debug(("fldcw 4(esp)\n"));
-	}
-#endif
 }
 
 define_insn(exception_prologue, eprologue_xLx)
@@ -265,65 +214,12 @@
 	debug(("subl #?,ecx\n"));
 	debug(("subl #3*SLOTSIZE,ecx\n"));
 	debug(("movl ecx,esp\n"));
-
-#if 0
-	if (used_ieee_division == true) {
-		OUT(0x81);
-		OUT(0xE8|REG_esp);
-		LOUT(SLOTSIZE);
-
-		debug(("subl #%d,esp\n", SLOTSIZE));
-
-		OUT(0x8B);
-		OUT((REG_eax<<3)|0x04);
-		OUT(0x24);
-		debug(("movl (esp),eax\n"));
-
-		OUT(0xB8|REG_eax);
-		LOUT(IEEE_MODE);
-		debug(("movl %d,eax\n", IEEE_MODE));
-
-		OUT(0x89);
-		OUT((REG_eax<<3)|0x44);
-		OUT(0x24);
-		OUT(0x04);
-		debug(("movl eax,4(esp)\n"));
-
-		OUT(0xD9);
-		OUT(0x6C);
-		OUT(0x24);
-		OUT(0x04);
-		debug(("fldcw 4(esp)\n"));
-	}
-#endif
 }
 
 define_insn(epilogue, epilogue_xxx)
 {
 	KaffeJIT_setEpilogueLabel((uintp)CODEPC);
 
-#if 0
-	/* If this method uses IEEE, restore it */
-	if (used_ieee_division == true) {
-#if 0
-		OUT(0xD9);
-		OUT(0x2C);
-		OUT(0x24);
-		debug(("fldcw (esp)\n"));
-#endif
-		OUT(0xD9);
-		OUT(0x6C);
-		OUT(0x24);
-		OUT(0);
-		debug(("fldcw 0(esp)\n"));
-
-		OUT(0x81);
-		OUT(0xC0|REG_esp);
-		LOUT(8);
-		debug(("addl 8,esp\n"));
-	}
-#endif
-
 #if defined(KAFFE_PROFILER)
 	if (profFlag) {
 		profiler_end(globalMethod->totalClicks, 1);
@@ -786,15 +682,8 @@
 
 	/* Setup EDX - should contains the sign of EAX */
 	do_move_int(REG_edx, REG_eax);
-#if 0
-	OUT(0xC1);
-	OUT(0xF8|REG_edx);
-	OUT(31);
-	debug(("sarl #31,edx\n"));
-#else
 	OUT(0x99);
 	debug(("cltd\n"));
-#endif
 
 	OUT(0xF7);
         OUT(0xF8|r);
@@ -876,15 +765,8 @@
 
 	/* Setup EDX - should contains the sign of EAX */
 	do_move_int(REG_edx, REG_eax);
-#if 0
-	OUT(0xC1);
-	OUT(0xF8|REG_edx);
-	OUT(31);
-	debug(("sarl #31,edx\n"));
-#else
 	OUT(0x99);
 	debug(("cltd\n"));
-#endif
 
 	OUT(0xF7);
         OUT(0xF8|r);




More information about the kaffe mailing list