[LWN Logo]

From: Albrecht Kleine <java@ak.sax.de>
Subject: TYA1.4 bug fix (important)
To: java-linux@java.blackdown.org
Date: Wed, 25 Aug 1999 17:37:01 +0200 (MEST)

Hi,

I've just found an ugly bug in TYA.
It is related to an optimzation in division by 2, 
unfortunately introduced in TYA 1.4 (TYA 1.3x was still okay).

If you detect some TYA caused problems, apply this patch:

------------------------------------------------------------------
--- tyarecode.c~	Sat Jun 19 19:29:23 1999
+++ tyarecode.c	Fri Aug 20 18:33:13 1999
@@ -105,7 +105,7 @@
 	}
 	break;
       case 0x05:	// iconst_2
-#ifdef COMBINEOP	
+#if 0	//ifdef COMBINEOP	/*Fri Aug 20 18:31:05 1999*/
 	n=*(cinfo->bptr+j);
 	if ((n==0x6C || n== 0x68) && (cinfo->mb->CompiledCodeFlags & CCF_COMBOK))
 	{
@@ -693,7 +693,7 @@
 	}
 	break;
       case 0x68:	// imul
-#ifdef COMBINEOP
+#if 0 //ifdef COMBINEOP
 	if (GET_OPTFLAG(DF_const2))
 	{
 	   CW(ADD_AXAX);
@@ -773,10 +773,10 @@
 	}
 	break;
       case 0x6c:	// idiv
-#ifdef COMBINEOP
+#if 0 //ifdef COMBINEOP
 	if (GET_OPTFLAG(DF_const2))
 	{
-	   CW(SHR_AX);
+	   CW(SHR_AX);	// should be SAR, and has a rounding problem
 	   CB(1);
 	   break;
 	}
-------------------------------------------------

Cheers,
Albrecht


----------------------------------------------------------------------
To UNSUBSCRIBE, email to java-linux-request@java.blackdown.org
with a subject of "unsubscribe". Trouble? Contact listadm@java.blackdown.org