mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 04:11:18 +00: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); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace ams::svc::codegen::impl {
|
|||
} else if constexpr (Size == 8) {
|
||||
__asm__ __volatile__("ldr x%c[r], [sp, %c[offset]]" :: [r]"i"(Reg), [offset]"i"(Offset) : "memory");
|
||||
} else {
|
||||
static_assert(Size != Size);
|
||||
static_assert(false, "Invalid Size");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ namespace ams::svc::codegen::impl {
|
|||
} else if constexpr (Size == 8) {
|
||||
__asm__ __volatile__("ldp x%c[r0], x%c[r1], [sp, %c[offset]]" :: [r0]"i"(Reg0), [r1]"i"(Reg1), [offset]"i"(Offset) : "memory");
|
||||
} else {
|
||||
static_assert(Size != Size);
|
||||
static_assert(false, "Invalid Size");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ namespace ams::svc::codegen::impl {
|
|||
} else if constexpr (Size == 8) {
|
||||
__asm__ __volatile__("str x%c[r], [sp, %c[offset]]" :: [r]"i"(Reg), [offset]"i"(Offset) : "memory");
|
||||
} else {
|
||||
static_assert(Size != Size);
|
||||
static_assert(false, "Invalid Size");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ namespace ams::svc::codegen::impl {
|
|||
} else if constexpr (Size == 8) {
|
||||
__asm__ __volatile__("stp x%c[r0], x%c[r1], [sp, %c[offset]]" :: [r0]"i"(Reg0), [r1]"i"(Reg1), [offset]"i"(Offset) : "memory");
|
||||
} else {
|
||||
static_assert(Size != Size);
|
||||
static_assert(false, "Invalid Size");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -461,7 +461,7 @@ namespace ams::svc::codegen::impl {
|
|||
if constexpr (CodeGenKind == CodeGenerationKind::SvcInvocationToKernelProcedure) {
|
||||
return Operation::ImplType::template CanGenerateCodeForSvcInvocationToKernelProcedure<Operation>(allocator);
|
||||
} else {
|
||||
static_assert(CodeGenKind != CodeGenKind, "Invalid CodeGenerationKind");
|
||||
static_assert(false, "Invalid CodeGenerationKind");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ namespace ams::svc::codegen::impl {
|
|||
} else if constexpr (CodeGenKind == CodeGenerationKind::KernelProcedureToSvcInvocation) {
|
||||
Operation::ImplType::template GenerateCodeForKernelProcedureToSvcInvocation<Operation>(mcg);
|
||||
} else {
|
||||
static_assert(CodeGenKind != CodeGenKind, "Invalid CodeGenerationKind");
|
||||
static_assert(false, "Invalid CodeGenerationKind");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -127,7 +127,7 @@ namespace ams::svc::codegen::impl {
|
|||
META_CODE_OPERATION_KIND_GENERATE_CODE(Pack)
|
||||
META_CODE_OPERATION_KIND_GENERATE_CODE(Unpack)
|
||||
META_CODE_OPERATION_KIND_GENERATE_CODE(LoadStackAddress)
|
||||
else { static_assert(Kind != Kind, "Unknown MetaOperationKind"); }
|
||||
else { static_assert(false, "Unknown MetaOperationKind"); }
|
||||
#undef META_CODE_OPERATION_KIND_GENERATE_CODE
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ namespace ams::util {
|
|||
} else if constexpr (Order == std::memory_order_acq_rel || Order == std::memory_order_seq_cst) {
|
||||
return ::ams::util::impl::LoadAcquireExclusiveForAtomic(p);
|
||||
} else {
|
||||
static_assert(Order != Order, "Invalid memory order");
|
||||
static_assert(false, "Invalid memory order");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ namespace ams::util {
|
|||
} else if constexpr (Order == std::memory_order_acq_rel || Order == std::memory_order_seq_cst) {
|
||||
return ::ams::util::impl::StoreReleaseExclusiveForAtomic(p, s);
|
||||
} else {
|
||||
static_assert(Order != Order, "Invalid memory order");
|
||||
static_assert(false, "Invalid memory order");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue