浏览代码

Kernel: Remove another ARCH ifdef using RegisterState::flags()

Brian Gianforcaro 4 年之前
父节点
当前提交
a3787b9db7
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 1 7
      Kernel/Syscall.cpp

+ 1 - 7
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");
     }