mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-21 02:42:39 +02:00
ams: basic support for compiling with gcc 15
This commit is contained in:
parent
49058b204c
commit
29cadcd269
7
emummc/source/utils/types.h
vendored
7
emummc/source/utils/types.h
vendored
@ -18,6 +18,7 @@
|
||||
#define _TYPES_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
@ -58,12 +59,6 @@ typedef u32 Result; ///< Function error code result type.
|
||||
#define INVALID_HANDLE ((Handle) 0)
|
||||
#define CUR_PROCESS_HANDLE ((Handle) 0xFFFF8001)
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef int bool;
|
||||
#define true 1
|
||||
#define false 0
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define BOOT_CFG_AUTOBOOT_EN (1 << 0)
|
||||
#define BOOT_CFG_FROM_LAUNCH (1 << 1)
|
||||
#define BOOT_CFG_SEPT_RUN (1 << 7)
|
||||
|
@ -106,6 +106,7 @@ SECTIONS
|
||||
.debug_code : {
|
||||
KEEP (*(.text._ZN3ams3log6PrintfEPKcz .text._ZN3ams3log7VPrintfEPKcSt9__va_list .text._ZN3ams3log4DumpEPKvm))
|
||||
KEEP (*(.text._ZN3ams4util10TVSNPrintfEPcmPKcSt9__va_list .text._ZN3ams4util12_GLOBAL__N_114TVSNPrintfImplEPcmPKcSt9__va_list .text._ZZN3ams4util12_GLOBAL__N_114TVSNPrintfImplEPcmPKcSt9__va_listENKUlbmE3_clEbm))
|
||||
KEEP (*(.text._ZN3ams4util12_GLOBAL__N_1L14TVSNPrintfImplEPcmPKcSt9__va_list .text._ZZN3ams4util12_GLOBAL__N_1L14TVSNPrintfImplEPcmPKcSt9__va_listENKUlbmE_clEbm))
|
||||
KEEP(secmon_exception_handler.o(.text*))
|
||||
secmon_exception_handler.o(.rodata*)
|
||||
secmon_exception_handler.o(.data*)
|
||||
|
@ -282,7 +282,7 @@ namespace ams::ncm {
|
||||
}
|
||||
|
||||
const FragmentSet *GetFragmentSet(s32 delta_index, s32 fragment_set_index) const {
|
||||
return reinterpret_cast<const FragmentSet *>(this->GetFragmentSetIndex(delta_index, fragment_set_index));
|
||||
return reinterpret_cast<const FragmentSet *>(this->GetFragmentSetAddress(delta_index, fragment_set_index));
|
||||
}
|
||||
|
||||
const FragmentIndicator *GetFragmentIndicator(s32 delta_index, s32 fragment_set_index, s32 index) const {
|
||||
|
@ -33,14 +33,14 @@ namespace ams::fs {
|
||||
}
|
||||
|
||||
ALWAYS_INLINE ScopedSetter(ScopedSetter &&rhs) {
|
||||
m_ptr = rhs.ptr;
|
||||
m_value = rhs.value;
|
||||
m_ptr = rhs.m_ptr;
|
||||
m_value = rhs.m_value;
|
||||
rhs.Reset();
|
||||
}
|
||||
|
||||
ALWAYS_INLINE ScopedSetter &operator=(ScopedSetter &&rhs) {
|
||||
m_ptr = rhs.ptr;
|
||||
m_value = rhs.value;
|
||||
m_ptr = rhs.m_ptr;
|
||||
m_value = rhs.m_value;
|
||||
rhs.Reset();
|
||||
return *this;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace ams::sf::hipc {
|
||||
#if AMS_SF_MITM_SUPPORTED
|
||||
Result ServerManagerBase::InstallMitmServerImpl(os::NativeHandle *out_port_handle, sm::ServiceName service_name, ServerManagerBase::MitmQueryFunction query_func) {
|
||||
/* Install the Mitm. */
|
||||
os::NativeHandle query_handle;
|
||||
os::NativeHandle query_handle = os::InvalidNativeHandle;
|
||||
R_TRY(sm::mitm::InstallMitm(out_port_handle, std::addressof(query_handle), service_name));
|
||||
|
||||
/* Register the query handle. */
|
||||
|
@ -16,7 +16,6 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstdbool>
|
||||
|
||||
/* NOTE: This file serves as a substitute for libnx <switch/types.h>. */
|
||||
|
||||
|
@ -48,7 +48,7 @@ namespace ams::crypto {
|
||||
" moveq %[result], #1\n"
|
||||
" movne %[result], #0\n"
|
||||
: [result]"=r"(result), [lhs]"+r"(lhs), [rhs]"+r"(rhs), [xor_acc]"=&r"(xor_acc), [index]"=&r"(index), [ltmp]"=&r"(ltmp), [rtmp]"=&r"(rtmp)
|
||||
: [size]"r"(size)
|
||||
: "m"(*(const u8 (*)[size])lhs), "m"(*(const u8 (*)[size])rhs), [size]"r"(size)
|
||||
: "cc"
|
||||
);
|
||||
|
||||
|
@ -47,7 +47,7 @@ namespace ams::crypto {
|
||||
" cmp %w[xor_acc], #0\n"
|
||||
" cset %w[result], eq\n"
|
||||
: [result]"=r"(result), [lhs]"+r"(lhs), [rhs]"+r"(rhs), [xor_acc]"=&r"(xor_acc), [index]"=&r"(index), [ltmp]"=&r"(ltmp), [rtmp]"=&r"(rtmp)
|
||||
: "m"(*(const u8 (*)[size])lhs), "m"(*(const u8 (*)[size])lhs), [size]"r"(size)
|
||||
: "m"(*(const u8 (*)[size])lhs), "m"(*(const u8 (*)[size])rhs), [size]"r"(size)
|
||||
: "cc"
|
||||
);
|
||||
|
||||
|
@ -281,7 +281,7 @@ namespace ams::crypto::impl {
|
||||
[cur_hash0]"+w"(cur_hash0), [cur_hash1]"+w"(cur_hash1),
|
||||
[prev_hash0]"+w"(prev_hash0), [prev_hash1]"+w"(prev_hash1),
|
||||
[tmp_hash]"=w"(tmp_hash), [data]"+r"(data)
|
||||
: [round_constants]"r"(RoundConstants)
|
||||
: "m"(*(const u8 (*)[block_count*BlockSize])data), [round_constants]"r"(RoundConstants)
|
||||
:
|
||||
);
|
||||
} while (--block_count != 0);
|
||||
|
Loading…
Reference in New Issue
Block a user