mirror of
https://github.com/momo5502/emulator.git
synced 2026-02-01 19:15:23 +01:00
Prepare 32 bit support
This commit is contained in:
@@ -16,7 +16,7 @@ target_link_libraries(windows-emulator-test PRIVATE
|
||||
windows-emulator
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_dependencies(windows-emulator-test test-sample)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace test
|
||||
constexpr auto offset = 1;
|
||||
const auto instructionsToExecute = executedInstructions - offset;
|
||||
|
||||
new_emu.start(instructionsToExecute);
|
||||
new_emu.start(static_cast<size_t>(instructionsToExecute));
|
||||
|
||||
ASSERT_EQ(new_emu.get_executed_instructions(), instructionsToExecute);
|
||||
ASSERT_NOT_TERMINATED(new_emu);
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace test
|
||||
return s1.get_diff(s2).has_value();
|
||||
};
|
||||
|
||||
if (!has_diff_after_count(limit))
|
||||
if (!has_diff_after_count(static_cast<size_t>(limit)))
|
||||
{
|
||||
puts("Emulation has no diff");
|
||||
}
|
||||
@@ -170,7 +170,7 @@ namespace test
|
||||
const auto diff = (upper_bound - lower_bound);
|
||||
const auto pivot = lower_bound + (diff / 2);
|
||||
|
||||
const auto has_diff = has_diff_after_count(pivot);
|
||||
const auto has_diff = has_diff_after_count(static_cast<size_t>(pivot));
|
||||
|
||||
auto* bound = has_diff ? &upper_bound : &lower_bound;
|
||||
*bound = pivot;
|
||||
@@ -178,7 +178,7 @@ namespace test
|
||||
printf("Bounds: %" PRIx64 " - %" PRIx64 "\n", lower_bound, upper_bound);
|
||||
}
|
||||
|
||||
(void)get_state_for_count(lower_bound);
|
||||
(void)get_state_for_count(static_cast<size_t>(lower_bound));
|
||||
|
||||
const auto rip = emu.emu().read_instruction_pointer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user