mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 21:29:28 +00:00
Fix compilation with Clang 11.
This commit is contained in:
parent
3c7fc58ac0
commit
331b93d4d6
@ -169,6 +169,7 @@ if (DPPC_BUILD_PPC_TESTS)
|
||||
TARGET testppc POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcinttests.csv"
|
||||
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcfloattests.csv"
|
||||
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcdisasmtest.csv"
|
||||
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
|
||||
endif()
|
||||
|
@ -186,7 +186,7 @@ void update_fex() {
|
||||
}
|
||||
|
||||
template <typename T, const FPOP fpop>
|
||||
constexpr auto ppc_confirm_inf_nan(int chosen_reg_1, int chosen_reg_2, int chosen_reg_3) {
|
||||
void ppc_confirm_inf_nan(int chosen_reg_1, int chosen_reg_2, int chosen_reg_3) {
|
||||
T input_a = T(ppc_state.fpr[chosen_reg_1].int64_r);
|
||||
T input_b = T(ppc_state.fpr[chosen_reg_2].int64_r);
|
||||
T input_c = T(ppc_state.fpr[chosen_reg_3].int64_r);
|
||||
@ -243,7 +243,7 @@ constexpr auto ppc_confirm_inf_nan(int chosen_reg_1, int chosen_reg_2, int chose
|
||||
update_fex();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void fpresult_update(double set_result, bool confirm_arc) {
|
||||
bool confirm_ov = (bool)std::fetestexcept(FE_OVERFLOW);
|
||||
@ -279,9 +279,9 @@ void ppc_changecrf1() {
|
||||
// Floating Point Arithmetic
|
||||
void dppc_interpreter::ppc_fadd() {
|
||||
ppc_grab_regsfpdab();
|
||||
|
||||
|
||||
ppc_dblresult64_d = val_reg_a + val_reg_b;
|
||||
|
||||
|
||||
if (!isnan(ppc_dblresult64_d)) {
|
||||
ppc_store_dfpresult_flt(reg_d);
|
||||
} else {
|
||||
@ -377,7 +377,7 @@ void dppc_interpreter::ppc_fnmadd() {
|
||||
|
||||
if (!isnan(ppc_dblresult64_d)) {
|
||||
ppc_store_dfpresult_flt(reg_d);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ppc_confirm_inf_nan<double, FNMADD>(reg_a, reg_b, reg_c);
|
||||
}
|
||||
@ -525,7 +525,7 @@ void dppc_interpreter::ppc_fnmsubs() {
|
||||
intermediate = -intermediate;
|
||||
ppc_dblresult64_d = static_cast<double>(intermediate);
|
||||
|
||||
|
||||
|
||||
if (!isnan(ppc_dblresult64_d)) {
|
||||
ppc_store_sfpresult_flt(reg_d);
|
||||
} else {
|
||||
@ -639,7 +639,7 @@ void dppc_interpreter::ppc_fres() {
|
||||
}
|
||||
else if (std::isnan(start_num)) {
|
||||
ppc_state.fpscr |= FPSCR::VXSNAN;
|
||||
}
|
||||
}
|
||||
else if (std::isinf(start_num)){
|
||||
ppc_state.fpscr |= FPSCR::VXSNAN;
|
||||
ppc_state.fpscr &= 0xFFF9FFFF;
|
||||
|
Loading…
Reference in New Issue
Block a user