From 2839bc0c11641ed7870bf751fad68b2a18b1cd14 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 9 Feb 2020 11:27:50 +0200 Subject: [PATCH] Skip test if (pefetch) bus error was not generated by instruction under test. --- cputest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cputest.cpp b/cputest.cpp index 6a583432..81d1b349 100644 --- a/cputest.cpp +++ b/cputest.cpp @@ -4101,6 +4101,13 @@ static void test_mnemo(const TCHAR *path, const TCHAR *mnemo, const TCHAR *ovrfi skipped = 1; } + // if testing bus errors: skip test if instruction under test didn't generate it + // (it could have been following nop/illegal used for aligning instruction before + // bus error boundary) + if (hardware_bus_error && safe_memory_mode && regs.instruction_pc != startpc) { + skipped = 1; + } + // skip if feature_target_opcode_offset mode and non-prefetch bus error if (target_opcode_address != 0xffffffff && (hardware_bus_error & 3)) { skipped = 1; -- 2.47.3