Revision 3a3b925d target-sparc/op_helper.c

b/target-sparc/op_helper.c
2487 2487
#endif
2488 2488
}
2489 2489

  
2490
void helper_ldfsr(void)
2490
static inline void set_fsr(void)
2491 2491
{
2492 2492
    int rnd_mode;
2493 2493

  
2494
    PUT_FSR32(env, *((uint32_t *) &FT0));
2495 2494
    switch (env->fsr & FSR_RD_MASK) {
2496 2495
    case FSR_RD_NEAREST:
2497 2496
        rnd_mode = float_round_nearest_even;
......
2510 2509
    set_float_rounding_mode(rnd_mode, &env->fp_status);
2511 2510
}
2512 2511

  
2513
void helper_stfsr(void)
2512
void helper_ldfsr(uint32_t new_fsr)
2514 2513
{
2515
    *((uint32_t *) &FT0) = GET_FSR32(env);
2514
    env->fsr = (new_fsr & FSR_LDFSR_MASK) | (env->fsr & FSR_LDFSR_OLDMASK);
2515
    set_fsr();
2516 2516
}
2517 2517

  
2518
#ifdef TARGET_SPARC64
2519
void helper_ldxfsr(uint64_t new_fsr)
2520
{
2521
    env->fsr = (new_fsr & FSR_LDXFSR_MASK) | (env->fsr & FSR_LDXFSR_OLDMASK);
2522
    set_fsr();
2523
}
2524
#endif
2525

  
2518 2526
void helper_debug(void)
2519 2527
{
2520 2528
    env->exception_index = EXCP_DEBUG;

Also available in: Unified diff