From a3787b9db7085b6dc8eb9eef4175d88e05f9948c Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Fri, 23 Jul 2021 08:17:36 -0700 Subject: [PATCH] Kernel: Remove another ARCH ifdef using RegisterState::flags() --- Kernel/Syscall.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index 91b6ceb8c1..41dceadcb4 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -196,13 +196,7 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap) static constexpr FlatPtr iopl_mask = 3u << 12; - FlatPtr flags; -#if ARCH(I386) - flags = regs.eflags; -#else - flags = regs.rflags; -#endif - + FlatPtr flags = regs.flags(); if ((flags & (iopl_mask)) != 0) { PANIC("Syscall from process with IOPL != 0"); }