Hi everybody,

after hours I ve found a bug in TYA's opcode processing
causing some heavy headache here....
The bugfix will appear in TYA's next release I am working on:
to run both with jdk1.1.x and jdk1.2  (will be TYA v1.3).

The bug produces floating point unit overflows in certain
situations  -  OTOH FP modulo is not so often used.
(I've found in calculation of textures dealing the 
new Java2D API.)

Unfortunately I've not the last TYA release 1.2v4 (@gonzalez) 
at hand, so there's not yet a regular patch. 
If you won't like to wait until releae date, please
edit tyarecode.c and replace the ``case 0x72:'' and ``case 0x73:''
sections ( part of the big outer switch statement ) 
with next lines following:

#define FXCH       0xC9D9    /* fxch */ 
#define FSTP_ST0   0xD8DD    /* fstp st(0) */
      case 0x72:        // frem
        CB(PUSHAX); // FIXAB
        CW(FLDW_MSP);CB(SP_ADDR_BYTE3);
        CB(POPAX);
        CW(FLDW_MSP);CB(SP_ADDR_BYTE3);
        CW(FPREM);
        CW(FXCH);       
        CW(FSTP_ST0);
        CW(FSTPW_MSP);CB(SP_ADDR_BYTE3);
        CB(POPAX); // FIXAB
        break;
      case 0x73:        // drem
        CB(PUSHAX); // FIXAB
        CW(FLDQW_MSP);CB(SP_ADDR_BYTE3);
        CB(POPAX);
        CB(POPAX);
        CW(FLDQW_MSP);CB(SP_ADDR_BYTE3);
        CW(FPREM);
        CW(FXCH);
        CW(FSTP_ST0);
        CW(FSTPQW_MSP);CB(SP_ADDR_BYTE3);
        CB(POPAX); // FIXAB
        break;


Cheers, 
Albrecht


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to