Skip to content

Commit 02c8c8c

Browse files
committed
Fix bench + test compilation (again)
1 parent 64a5a17 commit 02c8c8c

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

benchmark/bench1.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
2727
#include <thirdparty/loguru/loguru.hpp>
2828
#include <debugger/debugger.h>
2929

30+
#if defined(PPC_BENCHMARKS)
3031
void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
3132
power_on = false;
3233
}
34+
#endif
3335

3436
uint32_t cs_code[] = {
3537
0x3863FFFC, 0x7C861671, 0x41820090, 0x70600002, 0x41E2001C, 0xA0030004,

cpu/ppc/ppcexceptions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
3131

3232
jmp_buf exc_env; /* Global exception environment. */
3333

34+
#if !defined(PPC_TESTS) && !defined(PPC_BENCHMARKS)
3435
void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
3536
#ifdef CPU_PROFILING
3637
exceptions_processed++;
@@ -135,7 +136,7 @@ void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
135136
longjmp(exc_env, 2); /* return to the main execution loop. */
136137
}
137138
}
138-
139+
#endif
139140

140141
[[noreturn]] void dbg_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
141142
std::string exc_descriptor;

cpu/ppc/test/ppctests.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ using namespace std;
3636
int ntested; // number of tested instructions
3737
int nfailed; // number of failed instructions
3838

39+
#if defined(PPC_TESTS)
40+
void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) {
41+
power_on = false;
42+
}
43+
#endif
44+
3945
void xer_ov_test(string mnem, uint32_t opcode) {
4046
ppc_state.gpr[3] = 2;
4147
ppc_state.gpr[4] = 2;

0 commit comments

Comments
 (0)