diff options
author | Liav A <liavalb@gmail.com> | 2022-10-04 02:57:21 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-28 11:53:41 +0100 |
commit | 32270dcd20344ae2cd753232634cdcd4f0a4300e (patch) | |
tree | 1addf8620e7aec6312acff990fb08825238da39f /Tests/Kernel/crash.cpp | |
parent | b49c4eb94f27f8ad67a16c6a58003de33a9d5f2b (diff) | |
download | serenity-32270dcd20344ae2cd753232634cdcd4f0a4300e.zip |
Tests: Remove i686 support
Diffstat (limited to 'Tests/Kernel/crash.cpp')
-rw-r--r-- | Tests/Kernel/crash.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Tests/Kernel/crash.cpp b/Tests/Kernel/crash.cpp index 737fae8865..43b17f8936 100644 --- a/Tests/Kernel/crash.cpp +++ b/Tests/Kernel/crash.cpp @@ -8,7 +8,7 @@ #include <AK/Assertions.h> #include <AK/DeprecatedString.h> #include <AK/Function.h> -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) # include <Kernel/Arch/x86/IO.h> #endif #include <LibCore/ArgsParser.h> @@ -47,7 +47,7 @@ int main(int argc, char** argv) bool do_legitimate_syscall = false; bool do_execute_non_executable_memory = false; bool do_trigger_user_mode_instruction_prevention = false; -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) bool do_use_io_instruction = false; #endif bool do_pledge_violation = false; @@ -74,7 +74,7 @@ int main(int argc, char** argv) args_parser.add_option(do_legitimate_syscall, "Make a syscall from legitimate memory (but outside syscall-code mapped region)", nullptr, 'y'); args_parser.add_option(do_execute_non_executable_memory, "Attempt to execute non-executable memory (not mapped with PROT_EXEC)", nullptr, 'X'); args_parser.add_option(do_trigger_user_mode_instruction_prevention, "Attempt to trigger an x86 User Mode Instruction Prevention fault. WARNING: This test runs only when invoked manually, see #10042.", nullptr, 'U'); -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) args_parser.add_option(do_use_io_instruction, "Use an x86 I/O instruction in userspace", nullptr, 'I'); #endif args_parser.add_option(do_pledge_violation, "Violate pledge()'d promises", nullptr, 'p'); @@ -236,10 +236,7 @@ int main(int argc, char** argv) return Crash::Failure::UnexpectedError; u8* bad_esp = bad_stack + 2048; -#if ARCH(I386) - asm volatile("mov %%eax, %%esp" ::"a"(bad_esp)); - asm volatile("pushl $0"); -#elif ARCH(X86_64) +#if ARCH(X86_64) asm volatile("movq %%rax, %%rsp" ::"a"(bad_esp)); asm volatile("pushq $0"); #elif ARCH(AARCH64) @@ -295,7 +292,7 @@ int main(int argc, char** argv) }).run(run_type); } -#if ARCH(I386) || ARCH(X86_64) +#if ARCH(X86_64) if (do_use_io_instruction || do_all_crash_types) { any_failures |= !Crash("Attempt to use an I/O instruction", [] { u8 keyboard_status = IO::in8(0x64); |