Fix bench + test compilation (again)

This commit is contained in:
dingusdev
2024-09-30 20:35:33 -07:00
parent 64a5a17df0
commit 02c8c8cde0
3 changed files with 10 additions and 1 deletions

View File

@@ -27,9 +27,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <thirdparty/loguru/loguru.hpp>
#include <debugger/debugger.h>
#if defined(PPC_BENCHMARKS)
void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
power_on = false;
}
#endif
uint32_t cs_code[] = {
0x3863FFFC, 0x7C861671, 0x41820090, 0x70600002, 0x41E2001C, 0xA0030004,

View File

@@ -31,6 +31,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
jmp_buf exc_env; /* Global exception environment. */
#if !defined(PPC_TESTS) && !defined(PPC_BENCHMARKS)
void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
#ifdef CPU_PROFILING
exceptions_processed++;
@@ -135,7 +136,7 @@ void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
longjmp(exc_env, 2); /* return to the main execution loop. */
}
}
#endif
[[noreturn]] void dbg_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
std::string exc_descriptor;

View File

@@ -36,6 +36,12 @@ using namespace std;
int ntested; // number of tested instructions
int nfailed; // number of failed instructions
#if defined(PPC_TESTS)
void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
power_on = false;
}
#endif
void xer_ov_test(string mnem, uint32_t opcode) {
ppc_state.gpr[3] = 2;
ppc_state.gpr[4] = 2;