Commit be94c952e4a695bf112a7745c9851ea4d7ddd756

Authored by aurel32
1 parent d9957a8b

target-ppc: use accessors to access fp_status exception_flags

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6006 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 10 additions and 7 deletions
target-ppc/op_helper.c
@@ -1000,12 +1000,15 @@ void helper_float_check_status (void) @@ -1000,12 +1000,15 @@ void helper_float_check_status (void)
1000 /* Differred floating-point exception after target FPR update */ 1000 /* Differred floating-point exception after target FPR update */
1001 if (msr_fe0 != 0 || msr_fe1 != 0) 1001 if (msr_fe0 != 0 || msr_fe1 != 0)
1002 helper_raise_exception_err(env->exception_index, env->error_code); 1002 helper_raise_exception_err(env->exception_index, env->error_code);
1003 - } else if (env->fp_status.float_exception_flags & float_flag_overflow) {  
1004 - float_overflow_excp();  
1005 - } else if (env->fp_status.float_exception_flags & float_flag_underflow) {  
1006 - float_underflow_excp();  
1007 - } else if (env->fp_status.float_exception_flags & float_flag_inexact) {  
1008 - float_inexact_excp(); 1003 + } else {
  1004 + int status = get_float_exception_flags(&env->fp_status);
  1005 + if (status & float_flag_overflow) {
  1006 + float_overflow_excp();
  1007 + } else if (status & float_flag_underflow) {
  1008 + float_underflow_excp();
  1009 + } else if (status & float_flag_inexact) {
  1010 + float_inexact_excp();
  1011 + }
1009 } 1012 }
1010 #else 1013 #else
1011 if (env->exception_index == POWERPC_EXCP_PROGRAM && 1014 if (env->exception_index == POWERPC_EXCP_PROGRAM &&
@@ -1020,7 +1023,7 @@ void helper_float_check_status (void) @@ -1020,7 +1023,7 @@ void helper_float_check_status (void)
1020 #ifdef CONFIG_SOFTFLOAT 1023 #ifdef CONFIG_SOFTFLOAT
1021 void helper_reset_fpstatus (void) 1024 void helper_reset_fpstatus (void)
1022 { 1025 {
1023 - env->fp_status.float_exception_flags = 0; 1026 + set_float_exception_flags(0, &env->fp_status);
1024 } 1027 }
1025 #endif 1028 #endif
1026 1029