--- a/src/sh4/sh4x86.in Wed Sep 19 11:30:30 2007 +0000 +++ b/src/sh4/sh4x86.in Fri Sep 28 07:25:22 2007 +0000 @@ -1,5 +1,5 @@ /** - * $Id: sh4x86.in,v 1.14 2007-09-19 11:30:30 nkeynes Exp $ + * $Id: sh4x86.in,v 1.15 2007-09-20 08:37:19 nkeynes Exp $ * * SH4 => x86 translation. This version does no real optimization, it just * outputs straight-line x86 code - it mainly exists to provide a baseline @@ -63,48 +63,6 @@ static uint32_t min_int = 0x80000000; static uint32_t save_fcw; /* save value for fpu control word */ static uint32_t trunc_fcw = 0x0F7F; /* fcw value for truncation mode */ -void signsat48( void ) -{ - if( ((int64_t)sh4r.mac) < (int64_t)0xFFFF800000000000LL ) - sh4r.mac = 0xFFFF800000000000LL; - else if( ((int64_t)sh4r.mac) > (int64_t)0x00007FFFFFFFFFFFLL ) - sh4r.mac = 0x00007FFFFFFFFFFFLL; -} - -void sh4_fsca( uint32_t anglei, float *fr ) -{ - float angle = (((float)(anglei&0xFFFF))/65536.0) * 2 * M_PI; - *fr++ = cosf(angle); - *fr = sinf(angle); -} - -void sh4_sleep() -{ - if( MMIO_READ( CPG, STBCR ) & 0x80 ) { - sh4r.sh4_state = SH4_STATE_STANDBY; - } else { - sh4r.sh4_state = SH4_STATE_SLEEP; - } -} - -/** - * Compute the matrix tranform of fv given the matrix xf. - * Both fv and xf are word-swapped as per the sh4r.fr banks - */ -void sh4_ftrv( float *target, float *xf ) -{ - float fv[4] = { target[1], target[0], target[3], target[2] }; - target[1] = xf[1] * fv[0] + xf[5]*fv[1] + - xf[9]*fv[2] + xf[13]*fv[3]; - target[0] = xf[0] * fv[0] + xf[4]*fv[1] + - xf[8]*fv[2] + xf[12]*fv[3]; - target[3] = xf[3] * fv[0] + xf[7]*fv[1] + - xf[11]*fv[2] + xf[15]*fv[3]; - target[2] = xf[2] * fv[0] + xf[6]*fv[1] + - xf[10]*fv[2] + xf[14]*fv[3]; -} - - void sh4_x86_init() {