Fix compilation warnings from previous commits.

This commit is contained in:
Maxim Poliakovski 2020-01-22 12:42:22 +01:00
parent 6a083869e1
commit e1793b6305
3 changed files with 5 additions and 9 deletions

View File

@ -28,8 +28,8 @@ enum endian_switch {big_end = 0, little_end = 1};
typedef void (*PPCOpcode)(void); typedef void (*PPCOpcode)(void);
typedef union FPR_storage { union FPR_storage {
double dbl64_r = 0.0; // double floating-point representation double dbl64_r; // double floating-point representation
uint64_t int64_r; // double integer representation uint64_t int64_r; // double integer representation
}; };

View File

@ -242,8 +242,6 @@ bool ppc_confirm_inf_nan(uint64_t input_a, uint64_t input_b, bool is_single, uin
return true; return true;
} }
break; break;
default:
return false;
} }
} }
else { else {
@ -282,10 +280,9 @@ bool ppc_confirm_inf_nan(uint64_t input_a, uint64_t input_b, bool is_single, uin
return true; return true;
} }
break; break;
default:
return false;
} }
} }
return false;
} }
void ppc_fpresult_update(uint64_t set_result, bool confirm_arc) { void ppc_fpresult_update(uint64_t set_result, bool confirm_arc) {

View File

@ -100,7 +100,6 @@ uint8_t write_char;
//Initialize the PPC's registers. //Initialize the PPC's registers.
void reg_init(){ void reg_init(){
for (uint32_t i = 0; i < 32; i++){ for (uint32_t i = 0; i < 32; i++){
ppc_state.ppc_fpr[i].dbl64_r = 0.0;
ppc_state.ppc_fpr[i].int64_r = 0; ppc_state.ppc_fpr[i].int64_r = 0;
} }
ppc_state.ppc_pc = 0; ppc_state.ppc_pc = 0;
@ -174,7 +173,7 @@ void reg_init(){
//Debugging Functions //Debugging Functions
uint32_t reg_print(){ uint32_t reg_print(){
for (uint32_t i = 0; i < 32; i++){ for (uint32_t i = 0; i < 32; i++){
printf("FPR %d : %" PRIx64 "", i, ppc_state.ppc_fpr[i]); printf("FPR %d : %" PRIx64 "", i, ppc_state.ppc_fpr[i].int64_r);
} }
ppc_state.ppc_pc = 0; ppc_state.ppc_pc = 0;
for (uint32_t i = 0; i < 32; i++){ for (uint32_t i = 0; i < 32; i++){