mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
Kernel: Change static constexpr variables to constexpr where possible
Function-local `static constexpr` variables can be `constexpr`. This can reduce memory consumption, binary size, and offer additional compiler optimizations. These changes result in a stripped x86_64 kernel binary size reduction of 592 bytes.
This commit is contained in:
parent
6a4c8a66ae
commit
c6acf64558
Notes:
sideshowbarker
2024-07-17 19:05:21 +09:00
Author: https://github.com/ldm5180
Commit: c6acf64558
Pull-request: https://github.com/SerenityOS/serenity/pull/12393
11 changed files with 26 additions and 15 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -196,7 +197,7 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
|
|||
asm volatile(""
|
||||
: "=m"(*ptr));
|
||||
|
||||
static constexpr FlatPtr iopl_mask = 3u << 12;
|
||||
constexpr FlatPtr iopl_mask = 3u << 12;
|
||||
|
||||
FlatPtr flags = regs.flags();
|
||||
if ((flags & (iopl_mask)) != 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue