mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 11:46:58 -04:00
ams: fix compilation with gcc 14 (closes #2330)
This commit is contained in:
parent
548b48b2a6
commit
f35c94810c
5 changed files with 13 additions and 11 deletions
|
@ -1002,14 +1002,16 @@ namespace ams::nxboot {
|
|||
\
|
||||
constexpr u32 SrcLow = RANGE_LOW(SRC_RANGE); \
|
||||
constexpr u32 DstLow = RANGE_LOW(DST_RANGE); \
|
||||
constexpr auto Shift = (SrcLow < DstLow) ? (DstLow - SrcLow) \
|
||||
: (SrcLow - DstLow); \
|
||||
\
|
||||
cur_reg_value &= ~Mask; \
|
||||
if constexpr (SrcLow == DstLow) { \
|
||||
cur_reg_value |= (src_value & Mask); \
|
||||
} else if constexpr (SrcLow < DstLow) { \
|
||||
cur_reg_value |= ((src_value << (DstLow - SrcLow)) & Mask); \
|
||||
cur_reg_value |= ((src_value << Shift) & Mask); \
|
||||
} else { \
|
||||
cur_reg_value |= ((src_value >> (SrcLow - DstLow)) & Mask); \
|
||||
cur_reg_value |= ((src_value >> Shift) & Mask); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue