Skip to content

Commit

Permalink
Kernel: Remove another ARCH ifdef using RegisterState::flags()
Browse files Browse the repository at this point in the history
  • Loading branch information
bgianfo authored and awesomekling committed Jul 23, 2021
1 parent 8241a6c commit a3787b9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Kernel/Syscall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit a3787b9

Please sign in to comment.