Revision 97eb5b14 cpu-exec.c

b/cpu-exec.c
380 380
                    ) {
381 381
                    spin_lock(&tb_lock);
382 382
                    tb_add_jump((TranslationBlock *)(T0 & ~3), T0 & 3, tb);
383
#if defined(USE_CODE_COPY)
384
                    /* propagates the FP use info */
385
                    ((TranslationBlock *)(T0 & ~3))->cflags |= 
386
                        (tb->cflags & CF_FP_USED);
387
#endif
383 388
                    spin_unlock(&tb_lock);
384 389
                }
385 390
                tc_ptr = tb->tc_ptr;
......
402 407
#elif defined(TARGET_I386) && defined(USE_CODE_COPY)
403 408
{
404 409
    if (!(tb->cflags & CF_CODE_COPY)) {
410
        if ((tb->cflags & CF_FP_USED) && env->native_fp_regs) {
411
            save_native_fp_state(env);
412
        }
405 413
        gen_func();
406 414
    } else {
415
        if ((tb->cflags & CF_FP_USED) && !env->native_fp_regs) {
416
            restore_native_fp_state(env);
417
        }
407 418
        /* we work with native eflags */
408 419
        CC_SRC = cc_table[CC_OP].compute_all();
409 420
        CC_OP = CC_OP_EFLAGS;
......
487 498

  
488 499

  
489 500
#if defined(TARGET_I386)
501
#if defined(USE_CODE_COPY)
502
    if (env->native_fp_regs) {
503
        save_native_fp_state(env);
504
    }
505
#endif
490 506
    /* restore flags in standard format */
491 507
    env->eflags = env->eflags | cc_table[CC_OP].compute_all() | (DF & DF_MASK);
492 508

  
......
747 763
    struct ucontext *uc = puc;
748 764
    unsigned long pc;
749 765
    int trapno;
750
    
766

  
751 767
#ifndef REG_EIP
752 768
/* for glibc 2.1 */
753 769
#define REG_EIP    EIP

Also available in: Unified diff