Revision 664e0f19 target-i386/helper.c

b/target-i386/helper.c
2444 2444
{
2445 2445
    int new_fpstt;
2446 2446
    new_fpstt = (env->fpstt - 1) & 7;
2447
    env->fpregs[new_fpstt] = helper_fldt(A0);
2447
    env->fpregs[new_fpstt].d = helper_fldt(A0);
2448 2448
    env->fpstt = new_fpstt;
2449 2449
    env->fptags[new_fpstt] = 0; /* validate stack entry */
2450 2450
}
......
2804 2804
	if (env->fptags[i]) {
2805 2805
            fptag |= 3;
2806 2806
	} else {
2807
            tmp.d = env->fpregs[i];
2807
            tmp.d = env->fpregs[i].d;
2808 2808
            exp = EXPD(tmp);
2809 2809
            mant = MANTD(tmp);
2810
            printf("mant=%llx exp=%x\n", mant, exp);
2810 2811
            if (exp == 0 && mant == 0) {
2811 2812
                /* zero */
2812 2813
	        fptag |= 1;
......
2930 2931
    
2931 2932
    if (env->cr[4] & CR4_OSFXSR_MASK) {
2932 2933
        /* XXX: finish it */
2933
        stl(ptr + 0x18, 0); /* mxcsr */
2934
        stl(ptr + 0x18, env->mxcsr); /* mxcsr */
2934 2935
        stl(ptr + 0x1c, 0); /* mxcsr_mask */
2935 2936
        nb_xmm_regs = 8 << data64;
2936 2937
        addr = ptr + 0xa0;
......
2967 2968

  
2968 2969
    if (env->cr[4] & CR4_OSFXSR_MASK) {
2969 2970
        /* XXX: finish it, endianness */
2970
        //ldl(ptr + 0x18);
2971
        env->mxcsr = ldl(ptr + 0x18);
2971 2972
        //ldl(ptr + 0x1c);
2972 2973
        nb_xmm_regs = 8 << data64;
2973 2974
        addr = ptr + 0xa0;
......
3209 3210

  
3210 3211
#endif
3211 3212

  
3213
/* XXX: do it */
3214
int fpu_isnan(double a)
3215
{
3216
    return 0;
3217
}
3218

  
3219
float approx_rsqrt(float a)
3220
{
3221
    return 1.0 / sqrt(a);
3222
}
3223

  
3224
float approx_rcp(float a)
3225
{
3226
    return 1.0 / a;
3227
}
3228

  
3229

  
3212 3230
#if !defined(CONFIG_USER_ONLY) 
3213 3231

  
3214 3232
#define MMUSUFFIX _mmu

Also available in: Unified diff