diff options
| author | 2022-06-14 08:34:16 -0400 | |
|---|---|---|
| committer | 2022-06-14 08:34:16 -0400 | |
| commit | a3b12e3809e388e9c9b0608b14d85c0985e412c3 (patch) | |
| tree | 135226fe24596286c54bf9c5c4a12868c3c55e90 /src/core/hle | |
| parent | Merge pull request #8459 from Morph1984/wextra-gcc (diff) | |
| parent | kernel: fix passthrough of local captures in lambda (diff) | |
| download | yuzu-a3b12e3809e388e9c9b0608b14d85c0985e412c3.tar.gz yuzu-a3b12e3809e388e9c9b0608b14d85c0985e412c3.tar.xz yuzu-a3b12e3809e388e9c9b0608b14d85c0985e412c3.zip | |
Merge pull request #8439 from liamwhite/monkey-compiler
general: fix compilation on GCC 12
Diffstat (limited to 'src/core/hle')
31 files changed, 57 insertions, 55 deletions
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index a427cbc93..0ddc8df9e 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h | |||
| @@ -141,7 +141,7 @@ public: | |||
| 141 | if (index < DomainHandlerCount()) { | 141 | if (index < DomainHandlerCount()) { |
| 142 | domain_handlers[index] = nullptr; | 142 | domain_handlers[index] = nullptr; |
| 143 | } else { | 143 | } else { |
| 144 | UNREACHABLE_MSG("Unexpected handler index {}", index); | 144 | ASSERT_MSG(false, "Unexpected handler index {}", index); |
| 145 | } | 145 | } |
| 146 | } | 146 | } |
| 147 | 147 | ||
diff --git a/src/core/hle/kernel/init/init_slab_setup.cpp b/src/core/hle/kernel/init/init_slab_setup.cpp index 34a8be052..9b6b284d0 100644 --- a/src/core/hle/kernel/init/init_slab_setup.cpp +++ b/src/core/hle/kernel/init/init_slab_setup.cpp | |||
| @@ -244,7 +244,7 @@ void InitializeSlabHeaps(Core::System& system, KMemoryLayout& memory_layout) { | |||
| 244 | FOREACH_SLAB_TYPE(INITIALIZE_SLAB_HEAP) | 244 | FOREACH_SLAB_TYPE(INITIALIZE_SLAB_HEAP) |
| 245 | // If we somehow get an invalid type, abort. | 245 | // If we somehow get an invalid type, abort. |
| 246 | default: | 246 | default: |
| 247 | UNREACHABLE_MSG("Unknown slab type: {}", slab_types[i]); | 247 | ASSERT_MSG(false, "Unknown slab type: {}", slab_types[i]); |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | // If we've hit the end of a gap, free it. | 250 | // If we've hit the end of a gap, free it. |
diff --git a/src/core/hle/kernel/k_address_arbiter.h b/src/core/hle/kernel/k_address_arbiter.h index e46e0d848..5fa19d386 100644 --- a/src/core/hle/kernel/k_address_arbiter.h +++ b/src/core/hle/kernel/k_address_arbiter.h | |||
| @@ -35,7 +35,7 @@ public: | |||
| 35 | case Svc::SignalType::SignalAndModifyByWaitingCountIfEqual: | 35 | case Svc::SignalType::SignalAndModifyByWaitingCountIfEqual: |
| 36 | return SignalAndModifyByWaitingCountIfEqual(addr, value, count); | 36 | return SignalAndModifyByWaitingCountIfEqual(addr, value, count); |
| 37 | } | 37 | } |
| 38 | UNREACHABLE(); | 38 | ASSERT(false); |
| 39 | return ResultUnknown; | 39 | return ResultUnknown; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| @@ -49,7 +49,7 @@ public: | |||
| 49 | case Svc::ArbitrationType::WaitIfEqual: | 49 | case Svc::ArbitrationType::WaitIfEqual: |
| 50 | return WaitIfEqual(addr, value, timeout); | 50 | return WaitIfEqual(addr, value, timeout); |
| 51 | } | 51 | } |
| 52 | UNREACHABLE(); | 52 | ASSERT(false); |
| 53 | return ResultUnknown; | 53 | return ResultUnknown; |
| 54 | } | 54 | } |
| 55 | 55 | ||
diff --git a/src/core/hle/kernel/k_address_space_info.cpp b/src/core/hle/kernel/k_address_space_info.cpp index bc37cadda..3e612a207 100644 --- a/src/core/hle/kernel/k_address_space_info.cpp +++ b/src/core/hle/kernel/k_address_space_info.cpp | |||
| @@ -84,7 +84,7 @@ u64 KAddressSpaceInfo::GetAddressSpaceStart(std::size_t width, Type type) { | |||
| 84 | ASSERT(IsAllowedIndexForAddress(AddressSpaceIndices39Bit[index])); | 84 | ASSERT(IsAllowedIndexForAddress(AddressSpaceIndices39Bit[index])); |
| 85 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].address; | 85 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].address; |
| 86 | } | 86 | } |
| 87 | UNREACHABLE(); | 87 | ASSERT(false); |
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| @@ -101,7 +101,7 @@ std::size_t KAddressSpaceInfo::GetAddressSpaceSize(std::size_t width, Type type) | |||
| 101 | ASSERT(IsAllowed39BitType(type)); | 101 | ASSERT(IsAllowed39BitType(type)); |
| 102 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].size; | 102 | return AddressSpaceInfos[AddressSpaceIndices39Bit[index]].size; |
| 103 | } | 103 | } |
| 104 | UNREACHABLE(); | 104 | ASSERT(false); |
| 105 | return 0; | 105 | return 0; |
| 106 | } | 106 | } |
| 107 | 107 | ||
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index ea47fc600..2827763d5 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h | |||
| @@ -18,7 +18,7 @@ namespace Kernel { | |||
| 18 | class KernelCore; | 18 | class KernelCore; |
| 19 | class KProcess; | 19 | class KProcess; |
| 20 | 20 | ||
| 21 | #define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \ | 21 | #define KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, ATTRIBUTE) \ |
| 22 | \ | 22 | \ |
| 23 | private: \ | 23 | private: \ |
| 24 | friend class ::Kernel::KClassTokenGenerator; \ | 24 | friend class ::Kernel::KClassTokenGenerator; \ |
| @@ -40,16 +40,19 @@ public: | |||
| 40 | static constexpr const char* GetStaticTypeName() { \ | 40 | static constexpr const char* GetStaticTypeName() { \ |
| 41 | return TypeName; \ | 41 | return TypeName; \ |
| 42 | } \ | 42 | } \ |
| 43 | virtual TypeObj GetTypeObj() const { \ | 43 | virtual TypeObj GetTypeObj() ATTRIBUTE { \ |
| 44 | return GetStaticTypeObj(); \ | 44 | return GetStaticTypeObj(); \ |
| 45 | } \ | 45 | } \ |
| 46 | virtual const char* GetTypeName() const { \ | 46 | virtual const char* GetTypeName() ATTRIBUTE { \ |
| 47 | return GetStaticTypeName(); \ | 47 | return GetStaticTypeName(); \ |
| 48 | } \ | 48 | } \ |
| 49 | \ | 49 | \ |
| 50 | private: \ | 50 | private: \ |
| 51 | constexpr bool operator!=(const TypeObj& rhs) | 51 | constexpr bool operator!=(const TypeObj& rhs) |
| 52 | 52 | ||
| 53 | #define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \ | ||
| 54 | KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, const override) | ||
| 55 | |||
| 53 | class KAutoObject { | 56 | class KAutoObject { |
| 54 | protected: | 57 | protected: |
| 55 | class TypeObj { | 58 | class TypeObj { |
| @@ -82,7 +85,7 @@ protected: | |||
| 82 | }; | 85 | }; |
| 83 | 86 | ||
| 84 | private: | 87 | private: |
| 85 | KERNEL_AUTOOBJECT_TRAITS(KAutoObject, KAutoObject); | 88 | KERNEL_AUTOOBJECT_TRAITS_IMPL(KAutoObject, KAutoObject, const); |
| 86 | 89 | ||
| 87 | public: | 90 | public: |
| 88 | explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) { | 91 | explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) { |
diff --git a/src/core/hle/kernel/k_class_token.h b/src/core/hle/kernel/k_class_token.h index be9e3c357..c9001ae3d 100644 --- a/src/core/hle/kernel/k_class_token.h +++ b/src/core/hle/kernel/k_class_token.h | |||
| @@ -49,6 +49,7 @@ private: | |||
| 49 | } | 49 | } |
| 50 | } | 50 | } |
| 51 | } | 51 | } |
| 52 | UNREACHABLE(); | ||
| 52 | }(); | 53 | }(); |
| 53 | 54 | ||
| 54 | template <typename T> | 55 | template <typename T> |
diff --git a/src/core/hle/kernel/k_memory_manager.cpp b/src/core/hle/kernel/k_memory_manager.cpp index a55db3088..58e540f31 100644 --- a/src/core/hle/kernel/k_memory_manager.cpp +++ b/src/core/hle/kernel/k_memory_manager.cpp | |||
| @@ -29,7 +29,7 @@ constexpr KMemoryManager::Pool GetPoolFromMemoryRegionType(u32 type) { | |||
| 29 | } else if ((type | KMemoryRegionType_DramSystemNonSecurePool) == type) { | 29 | } else if ((type | KMemoryRegionType_DramSystemNonSecurePool) == type) { |
| 30 | return KMemoryManager::Pool::SystemNonSecure; | 30 | return KMemoryManager::Pool::SystemNonSecure; |
| 31 | } else { | 31 | } else { |
| 32 | UNREACHABLE_MSG("InvalidMemoryRegionType for conversion to Pool"); | 32 | ASSERT_MSG(false, "InvalidMemoryRegionType for conversion to Pool"); |
| 33 | return {}; | 33 | return {}; |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index 68867a2bb..504e22cb9 100644 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp | |||
| @@ -35,7 +35,7 @@ constexpr std::size_t GetAddressSpaceWidthFromType(FileSys::ProgramAddressSpaceT | |||
| 35 | case FileSys::ProgramAddressSpaceType::Is39Bit: | 35 | case FileSys::ProgramAddressSpaceType::Is39Bit: |
| 36 | return 39; | 36 | return 39; |
| 37 | default: | 37 | default: |
| 38 | UNREACHABLE(); | 38 | ASSERT(false); |
| 39 | return {}; | 39 | return {}; |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| @@ -128,7 +128,7 @@ ResultCode KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_ | |||
| 128 | const std::size_t needed_size{ | 128 | const std::size_t needed_size{ |
| 129 | (alias_region_size + heap_region_size + stack_region_size + kernel_map_region_size)}; | 129 | (alias_region_size + heap_region_size + stack_region_size + kernel_map_region_size)}; |
| 130 | if (alloc_size < needed_size) { | 130 | if (alloc_size < needed_size) { |
| 131 | UNREACHABLE(); | 131 | ASSERT(false); |
| 132 | return ResultOutOfMemory; | 132 | return ResultOutOfMemory; |
| 133 | } | 133 | } |
| 134 | 134 | ||
| @@ -1430,7 +1430,7 @@ ResultCode KPageTable::SetProcessMemoryPermission(VAddr addr, std::size_t size, | |||
| 1430 | new_state = KMemoryState::AliasCodeData; | 1430 | new_state = KMemoryState::AliasCodeData; |
| 1431 | break; | 1431 | break; |
| 1432 | default: | 1432 | default: |
| 1433 | UNREACHABLE(); | 1433 | ASSERT(false); |
| 1434 | } | 1434 | } |
| 1435 | } | 1435 | } |
| 1436 | 1436 | ||
| @@ -1823,9 +1823,7 @@ void KPageTable::AddRegionToPages(VAddr start, std::size_t num_pages, | |||
| 1823 | VAddr addr{start}; | 1823 | VAddr addr{start}; |
| 1824 | while (addr < start + (num_pages * PageSize)) { | 1824 | while (addr < start + (num_pages * PageSize)) { |
| 1825 | const PAddr paddr{GetPhysicalAddr(addr)}; | 1825 | const PAddr paddr{GetPhysicalAddr(addr)}; |
| 1826 | if (!paddr) { | 1826 | ASSERT(paddr != 0); |
| 1827 | UNREACHABLE(); | ||
| 1828 | } | ||
| 1829 | page_linked_list.AddBlock(paddr, 1); | 1827 | page_linked_list.AddBlock(paddr, 1); |
| 1830 | addr += PageSize; | 1828 | addr += PageSize; |
| 1831 | } | 1829 | } |
| @@ -1856,7 +1854,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, const KPageLin | |||
| 1856 | system.Memory().MapMemoryRegion(page_table_impl, addr, size, node.GetAddress()); | 1854 | system.Memory().MapMemoryRegion(page_table_impl, addr, size, node.GetAddress()); |
| 1857 | break; | 1855 | break; |
| 1858 | default: | 1856 | default: |
| 1859 | UNREACHABLE(); | 1857 | ASSERT(false); |
| 1860 | } | 1858 | } |
| 1861 | 1859 | ||
| 1862 | addr += size; | 1860 | addr += size; |
| @@ -1887,7 +1885,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermiss | |||
| 1887 | case OperationType::ChangePermissionsAndRefresh: | 1885 | case OperationType::ChangePermissionsAndRefresh: |
| 1888 | break; | 1886 | break; |
| 1889 | default: | 1887 | default: |
| 1890 | UNREACHABLE(); | 1888 | ASSERT(false); |
| 1891 | } | 1889 | } |
| 1892 | return ResultSuccess; | 1890 | return ResultSuccess; |
| 1893 | } | 1891 | } |
| @@ -1924,7 +1922,6 @@ VAddr KPageTable::GetRegionAddress(KMemoryState state) const { | |||
| 1924 | return code_region_start; | 1922 | return code_region_start; |
| 1925 | default: | 1923 | default: |
| 1926 | UNREACHABLE(); | 1924 | UNREACHABLE(); |
| 1927 | return {}; | ||
| 1928 | } | 1925 | } |
| 1929 | } | 1926 | } |
| 1930 | 1927 | ||
| @@ -1960,7 +1957,6 @@ std::size_t KPageTable::GetRegionSize(KMemoryState state) const { | |||
| 1960 | return code_region_end - code_region_start; | 1957 | return code_region_end - code_region_start; |
| 1961 | default: | 1958 | default: |
| 1962 | UNREACHABLE(); | 1959 | UNREACHABLE(); |
| 1963 | return {}; | ||
| 1964 | } | 1960 | } |
| 1965 | } | 1961 | } |
| 1966 | 1962 | ||
diff --git a/src/core/hle/kernel/k_port.cpp b/src/core/hle/kernel/k_port.cpp index a31861cdb..51c2cd1ef 100644 --- a/src/core/hle/kernel/k_port.cpp +++ b/src/core/hle/kernel/k_port.cpp | |||
| @@ -60,7 +60,7 @@ ResultCode KPort::EnqueueSession(KServerSession* session) { | |||
| 60 | if (auto session_ptr = server.GetSessionRequestHandler().lock()) { | 60 | if (auto session_ptr = server.GetSessionRequestHandler().lock()) { |
| 61 | session_ptr->ClientConnected(server.AcceptSession()); | 61 | session_ptr->ClientConnected(server.AcceptSession()); |
| 62 | } else { | 62 | } else { |
| 63 | UNREACHABLE(); | 63 | ASSERT(false); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | return ResultSuccess; | 66 | return ResultSuccess; |
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index dcfeacccd..8c79b4f0f 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp | |||
| @@ -350,7 +350,7 @@ ResultCode KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, | |||
| 350 | break; | 350 | break; |
| 351 | 351 | ||
| 352 | default: | 352 | default: |
| 353 | UNREACHABLE(); | 353 | ASSERT(false); |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | // Create TLS region | 356 | // Create TLS region |
diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp index 7e39f6d50..60f8ed470 100644 --- a/src/core/hle/kernel/k_server_session.cpp +++ b/src/core/hle/kernel/k_server_session.cpp | |||
| @@ -97,13 +97,13 @@ ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& co | |||
| 97 | "object_id {} is too big! This probably means a recent service call " | 97 | "object_id {} is too big! This probably means a recent service call " |
| 98 | "to {} needed to return a new interface!", | 98 | "to {} needed to return a new interface!", |
| 99 | object_id, name); | 99 | object_id, name); |
| 100 | UNREACHABLE(); | 100 | ASSERT(false); |
| 101 | return ResultSuccess; // Ignore error if asserts are off | 101 | return ResultSuccess; // Ignore error if asserts are off |
| 102 | } | 102 | } |
| 103 | if (auto strong_ptr = manager->DomainHandler(object_id - 1).lock()) { | 103 | if (auto strong_ptr = manager->DomainHandler(object_id - 1).lock()) { |
| 104 | return strong_ptr->HandleSyncRequest(*this, context); | 104 | return strong_ptr->HandleSyncRequest(*this, context); |
| 105 | } else { | 105 | } else { |
| 106 | UNREACHABLE(); | 106 | ASSERT(false); |
| 107 | return ResultSuccess; | 107 | return ResultSuccess; |
| 108 | } | 108 | } |
| 109 | 109 | ||
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 940334f59..ea2160099 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -133,7 +133,7 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s | |||
| 133 | UNIMPLEMENTED(); | 133 | UNIMPLEMENTED(); |
| 134 | break; | 134 | break; |
| 135 | default: | 135 | default: |
| 136 | UNREACHABLE_MSG("KThread::Initialize: Unknown ThreadType {}", static_cast<u32>(type)); | 136 | ASSERT_MSG(false, "KThread::Initialize: Unknown ThreadType {}", static_cast<u32>(type)); |
| 137 | break; | 137 | break; |
| 138 | } | 138 | } |
| 139 | thread_type = type; | 139 | thread_type = type; |
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 7eb961912..b2c4f12b4 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -212,7 +212,9 @@ struct KernelCore::Impl { | |||
| 212 | system_resource_limit = KResourceLimit::Create(system.Kernel()); | 212 | system_resource_limit = KResourceLimit::Create(system.Kernel()); |
| 213 | system_resource_limit->Initialize(&core_timing); | 213 | system_resource_limit->Initialize(&core_timing); |
| 214 | 214 | ||
| 215 | const auto [total_size, kernel_size] = memory_layout->GetTotalAndKernelMemorySizes(); | 215 | const auto sizes{memory_layout->GetTotalAndKernelMemorySizes()}; |
| 216 | const auto total_size{sizes.first}; | ||
| 217 | const auto kernel_size{sizes.second}; | ||
| 216 | 218 | ||
| 217 | // If setting the default system values fails, then something seriously wrong has occurred. | 219 | // If setting the default system values fails, then something seriously wrong has occurred. |
| 218 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::PhysicalMemory, total_size) | 220 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::PhysicalMemory, total_size) |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 66e0ce2d0..584fa5b1c 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -1876,7 +1876,7 @@ static void SleepThread(Core::System& system, s64 nanoseconds) { | |||
| 1876 | KScheduler::YieldToAnyThread(kernel); | 1876 | KScheduler::YieldToAnyThread(kernel); |
| 1877 | } else { | 1877 | } else { |
| 1878 | // Nintendo does nothing at all if an otherwise invalid value is passed. | 1878 | // Nintendo does nothing at all if an otherwise invalid value is passed. |
| 1879 | UNREACHABLE_MSG("Unimplemented sleep yield type '{:016X}'!", nanoseconds); | 1879 | ASSERT_MSG(false, "Unimplemented sleep yield type '{:016X}'!", nanoseconds); |
| 1880 | } | 1880 | } |
| 1881 | } | 1881 | } |
| 1882 | 1882 | ||
diff --git a/src/core/hle/service/am/applets/applet_controller.cpp b/src/core/hle/service/am/applets/applet_controller.cpp index 655f2e936..0a5603d18 100644 --- a/src/core/hle/service/am/applets/applet_controller.cpp +++ b/src/core/hle/service/am/applets/applet_controller.cpp | |||
| @@ -178,7 +178,7 @@ ResultCode Controller::GetStatus() const { | |||
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void Controller::ExecuteInteractive() { | 180 | void Controller::ExecuteInteractive() { |
| 181 | UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet."); | 181 | ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet."); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | void Controller::Execute() { | 184 | void Controller::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_error.cpp b/src/core/hle/service/am/applets/applet_error.cpp index 911b2c229..0b87c60b9 100644 --- a/src/core/hle/service/am/applets/applet_error.cpp +++ b/src/core/hle/service/am/applets/applet_error.cpp | |||
| @@ -156,7 +156,7 @@ ResultCode Error::GetStatus() const { | |||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | void Error::ExecuteInteractive() { | 158 | void Error::ExecuteInteractive() { |
| 159 | UNREACHABLE_MSG("Unexpected interactive applet data!"); | 159 | ASSERT_MSG(false, "Unexpected interactive applet data!"); |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | void Error::Execute() { | 162 | void Error::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_general_backend.cpp b/src/core/hle/service/am/applets/applet_general_backend.cpp index 3fe1a390a..41c002ef2 100644 --- a/src/core/hle/service/am/applets/applet_general_backend.cpp +++ b/src/core/hle/service/am/applets/applet_general_backend.cpp | |||
| @@ -76,7 +76,7 @@ ResultCode Auth::GetStatus() const { | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | void Auth::ExecuteInteractive() { | 78 | void Auth::ExecuteInteractive() { |
| 79 | UNREACHABLE_MSG("Unexpected interactive applet data."); | 79 | ASSERT_MSG(false, "Unexpected interactive applet data."); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | void Auth::Execute() { | 82 | void Auth::Execute() { |
| @@ -175,7 +175,7 @@ ResultCode PhotoViewer::GetStatus() const { | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | void PhotoViewer::ExecuteInteractive() { | 177 | void PhotoViewer::ExecuteInteractive() { |
| 178 | UNREACHABLE_MSG("Unexpected interactive applet data."); | 178 | ASSERT_MSG(false, "Unexpected interactive applet data."); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | void PhotoViewer::Execute() { | 181 | void PhotoViewer::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_mii_edit.cpp b/src/core/hle/service/am/applets/applet_mii_edit.cpp index 3acde1630..8d847c3f6 100644 --- a/src/core/hle/service/am/applets/applet_mii_edit.cpp +++ b/src/core/hle/service/am/applets/applet_mii_edit.cpp | |||
| @@ -67,7 +67,7 @@ ResultCode MiiEdit::GetStatus() const { | |||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | void MiiEdit::ExecuteInteractive() { | 69 | void MiiEdit::ExecuteInteractive() { |
| 70 | UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet."); | 70 | ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet."); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | void MiiEdit::Execute() { | 73 | void MiiEdit::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_profile_select.cpp b/src/core/hle/service/am/applets/applet_profile_select.cpp index fd16f2e49..02049fd9f 100644 --- a/src/core/hle/service/am/applets/applet_profile_select.cpp +++ b/src/core/hle/service/am/applets/applet_profile_select.cpp | |||
| @@ -44,7 +44,7 @@ ResultCode ProfileSelect::GetStatus() const { | |||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void ProfileSelect::ExecuteInteractive() { | 46 | void ProfileSelect::ExecuteInteractive() { |
| 47 | UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet."); | 47 | ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet."); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | void ProfileSelect::Execute() { | 50 | void ProfileSelect::Execute() { |
diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.cpp b/src/core/hle/service/am/applets/applet_software_keyboard.cpp index 7c21365e4..4116fbaa7 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp +++ b/src/core/hle/service/am/applets/applet_software_keyboard.cpp | |||
| @@ -71,7 +71,7 @@ void SoftwareKeyboard::Initialize() { | |||
| 71 | InitializeBackground(applet_mode); | 71 | InitializeBackground(applet_mode); |
| 72 | break; | 72 | break; |
| 73 | default: | 73 | default: |
| 74 | UNREACHABLE_MSG("Invalid LibraryAppletMode={}", applet_mode); | 74 | ASSERT_MSG(false, "Invalid LibraryAppletMode={}", applet_mode); |
| 75 | break; | 75 | break; |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp index 2aa4a00ad..7b3f77a51 100644 --- a/src/core/hle/service/am/applets/applet_web_browser.cpp +++ b/src/core/hle/service/am/applets/applet_web_browser.cpp | |||
| @@ -279,7 +279,7 @@ void WebBrowser::Initialize() { | |||
| 279 | InitializeLobby(); | 279 | InitializeLobby(); |
| 280 | break; | 280 | break; |
| 281 | default: | 281 | default: |
| 282 | UNREACHABLE_MSG("Invalid ShimKind={}", web_arg_header.shim_kind); | 282 | ASSERT_MSG(false, "Invalid ShimKind={}", web_arg_header.shim_kind); |
| 283 | break; | 283 | break; |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| @@ -320,7 +320,7 @@ void WebBrowser::Execute() { | |||
| 320 | ExecuteLobby(); | 320 | ExecuteLobby(); |
| 321 | break; | 321 | break; |
| 322 | default: | 322 | default: |
| 323 | UNREACHABLE_MSG("Invalid ShimKind={}", web_arg_header.shim_kind); | 323 | ASSERT_MSG(false, "Invalid ShimKind={}", web_arg_header.shim_kind); |
| 324 | WebBrowserExit(WebExitReason::EndButtonPressed); | 324 | WebBrowserExit(WebExitReason::EndButtonPressed); |
| 325 | break; | 325 | break; |
| 326 | } | 326 | } |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index ddfcba0f1..fae6e5aff 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -899,7 +899,7 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) { | |||
| 899 | case FileSys::SaveDataSpaceId::TemporaryStorage: | 899 | case FileSys::SaveDataSpaceId::TemporaryStorage: |
| 900 | case FileSys::SaveDataSpaceId::ProperSystem: | 900 | case FileSys::SaveDataSpaceId::ProperSystem: |
| 901 | case FileSys::SaveDataSpaceId::SafeMode: | 901 | case FileSys::SaveDataSpaceId::SafeMode: |
| 902 | UNREACHABLE(); | 902 | ASSERT(false); |
| 903 | } | 903 | } |
| 904 | 904 | ||
| 905 | auto filesystem = std::make_shared<IFileSystem>(system, std::move(dir.Unwrap()), | 905 | auto filesystem = std::make_shared<IFileSystem>(system, std::move(dir.Unwrap()), |
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 1e04ee3f2..ac5c38cc6 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -160,7 +160,7 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) { | |||
| 160 | shared_memory->system_properties.raw = 0; | 160 | shared_memory->system_properties.raw = 0; |
| 161 | switch (controller_type) { | 161 | switch (controller_type) { |
| 162 | case Core::HID::NpadStyleIndex::None: | 162 | case Core::HID::NpadStyleIndex::None: |
| 163 | UNREACHABLE(); | 163 | ASSERT(false); |
| 164 | break; | 164 | break; |
| 165 | case Core::HID::NpadStyleIndex::ProController: | 165 | case Core::HID::NpadStyleIndex::ProController: |
| 166 | shared_memory->style_tag.fullkey.Assign(1); | 166 | shared_memory->style_tag.fullkey.Assign(1); |
| @@ -422,7 +422,7 @@ void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) { | |||
| 422 | libnx_state.connection_status.is_connected.Assign(1); | 422 | libnx_state.connection_status.is_connected.Assign(1); |
| 423 | switch (controller_type) { | 423 | switch (controller_type) { |
| 424 | case Core::HID::NpadStyleIndex::None: | 424 | case Core::HID::NpadStyleIndex::None: |
| 425 | UNREACHABLE(); | 425 | ASSERT(false); |
| 426 | break; | 426 | break; |
| 427 | case Core::HID::NpadStyleIndex::ProController: | 427 | case Core::HID::NpadStyleIndex::ProController: |
| 428 | case Core::HID::NpadStyleIndex::NES: | 428 | case Core::HID::NpadStyleIndex::NES: |
| @@ -597,7 +597,7 @@ void Controller_NPad::OnMotionUpdate(const Core::Timing::CoreTiming& core_timing | |||
| 597 | 597 | ||
| 598 | switch (controller_type) { | 598 | switch (controller_type) { |
| 599 | case Core::HID::NpadStyleIndex::None: | 599 | case Core::HID::NpadStyleIndex::None: |
| 600 | UNREACHABLE(); | 600 | ASSERT(false); |
| 601 | break; | 601 | break; |
| 602 | case Core::HID::NpadStyleIndex::ProController: | 602 | case Core::HID::NpadStyleIndex::ProController: |
| 603 | case Core::HID::NpadStyleIndex::Pokeball: | 603 | case Core::HID::NpadStyleIndex::Pokeball: |
| @@ -856,7 +856,7 @@ void Controller_NPad::VibrateController( | |||
| 856 | } | 856 | } |
| 857 | 857 | ||
| 858 | if (vibration_device_handle.device_index == Core::HID::DeviceIndex::None) { | 858 | if (vibration_device_handle.device_index == Core::HID::DeviceIndex::None) { |
| 859 | UNREACHABLE_MSG("DeviceIndex should never be None!"); | 859 | ASSERT_MSG(false, "DeviceIndex should never be None!"); |
| 860 | return; | 860 | return; |
| 861 | } | 861 | } |
| 862 | 862 | ||
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 8a496c38c..dc5d0366d 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -1441,7 +1441,7 @@ void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) { | |||
| 1441 | break; | 1441 | break; |
| 1442 | case Core::HID::DeviceIndex::None: | 1442 | case Core::HID::DeviceIndex::None: |
| 1443 | default: | 1443 | default: |
| 1444 | UNREACHABLE_MSG("DeviceIndex should never be None!"); | 1444 | ASSERT_MSG(false, "DeviceIndex should never be None!"); |
| 1445 | vibration_device_info.position = Core::HID::VibrationDevicePosition::None; | 1445 | vibration_device_info.position = Core::HID::VibrationDevicePosition::None; |
| 1446 | break; | 1446 | break; |
| 1447 | } | 1447 | } |
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index fa72fcba9..72e4902cb 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp | |||
| @@ -347,7 +347,7 @@ public: | |||
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | if (!succeeded) { | 349 | if (!succeeded) { |
| 350 | UNREACHABLE_MSG("Out of address space!"); | 350 | ASSERT_MSG(false, "Out of address space!"); |
| 351 | return Kernel::ResultOutOfMemory; | 351 | return Kernel::ResultOutOfMemory; |
| 352 | } | 352 | } |
| 353 | 353 | ||
diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index 4964539f9..08300a1a6 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp | |||
| @@ -290,7 +290,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo | |||
| 290 | u8 glasses_type{}; | 290 | u8 glasses_type{}; |
| 291 | while (glasses_type_start < glasses_type_info.values[glasses_type]) { | 291 | while (glasses_type_start < glasses_type_info.values[glasses_type]) { |
| 292 | if (++glasses_type >= glasses_type_info.values_count) { | 292 | if (++glasses_type >= glasses_type_info.values_count) { |
| 293 | UNREACHABLE(); | 293 | ASSERT(false); |
| 294 | break; | 294 | break; |
| 295 | } | 295 | } |
| 296 | } | 296 | } |
diff --git a/src/core/hle/service/nvdrv/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/syncpoint_manager.cpp index f77f0df27..a6fa943e8 100644 --- a/src/core/hle/service/nvdrv/syncpoint_manager.cpp +++ b/src/core/hle/service/nvdrv/syncpoint_manager.cpp | |||
| @@ -23,7 +23,7 @@ u32 SyncpointManager::AllocateSyncpoint() { | |||
| 23 | return syncpoint_id; | 23 | return syncpoint_id; |
| 24 | } | 24 | } |
| 25 | } | 25 | } |
| 26 | UNREACHABLE_MSG("No more available syncpoints!"); | 26 | ASSERT_MSG(false, "No more available syncpoints!"); |
| 27 | return {}; | 27 | return {}; |
| 28 | } | 28 | } |
| 29 | 29 | ||
diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp index fe95d1b73..337431488 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp | |||
| @@ -659,7 +659,7 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) { | |||
| 659 | value = core->consumer_usage_bit; | 659 | value = core->consumer_usage_bit; |
| 660 | break; | 660 | break; |
| 661 | default: | 661 | default: |
| 662 | UNREACHABLE(); | 662 | ASSERT(false); |
| 663 | return Status::BadValue; | 663 | return Status::BadValue; |
| 664 | } | 664 | } |
| 665 | 665 | ||
diff --git a/src/core/hle/service/time/standard_user_system_clock_core.cpp b/src/core/hle/service/time/standard_user_system_clock_core.cpp index f0cc9a155..508091dc2 100644 --- a/src/core/hle/service/time/standard_user_system_clock_core.cpp +++ b/src/core/hle/service/time/standard_user_system_clock_core.cpp | |||
| @@ -48,12 +48,12 @@ ResultCode StandardUserSystemClockCore::GetClockContext(Core::System& system, | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) { | 50 | ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) { |
| 51 | UNREACHABLE(); | 51 | UNIMPLEMENTED(); |
| 52 | return ERROR_NOT_IMPLEMENTED; | 52 | return ERROR_NOT_IMPLEMENTED; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) { | 55 | ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) { |
| 56 | UNREACHABLE(); | 56 | UNIMPLEMENTED(); |
| 57 | return ERROR_NOT_IMPLEMENTED; | 57 | return ERROR_NOT_IMPLEMENTED; |
| 58 | } | 58 | } |
| 59 | 59 | ||
diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp index acc038dbf..28667710e 100644 --- a/src/core/hle/service/time/time_manager.cpp +++ b/src/core/hle/service/time/time_manager.cpp | |||
| @@ -111,7 +111,7 @@ struct TimeManager::Impl final { | |||
| 111 | FileSys::VirtualFile& vfs_file) { | 111 | FileSys::VirtualFile& vfs_file) { |
| 112 | if (time_zone_content_manager.GetTimeZoneManager().SetDeviceLocationNameWithTimeZoneRule( | 112 | if (time_zone_content_manager.GetTimeZoneManager().SetDeviceLocationNameWithTimeZoneRule( |
| 113 | location_name, vfs_file) != ResultSuccess) { | 113 | location_name, vfs_file) != ResultSuccess) { |
| 114 | UNREACHABLE(); | 114 | ASSERT(false); |
| 115 | return; | 115 | return; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| @@ -155,7 +155,7 @@ struct TimeManager::Impl final { | |||
| 155 | } else { | 155 | } else { |
| 156 | if (standard_local_system_clock_core.SetCurrentTime(system_, posix_time) != | 156 | if (standard_local_system_clock_core.SetCurrentTime(system_, posix_time) != |
| 157 | ResultSuccess) { | 157 | ResultSuccess) { |
| 158 | UNREACHABLE(); | 158 | ASSERT(false); |
| 159 | return; | 159 | return; |
| 160 | } | 160 | } |
| 161 | } | 161 | } |
| @@ -170,7 +170,7 @@ struct TimeManager::Impl final { | |||
| 170 | 170 | ||
| 171 | if (standard_network_system_clock_core.SetSystemClockContext(clock_context) != | 171 | if (standard_network_system_clock_core.SetSystemClockContext(clock_context) != |
| 172 | ResultSuccess) { | 172 | ResultSuccess) { |
| 173 | UNREACHABLE(); | 173 | ASSERT(false); |
| 174 | return; | 174 | return; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| @@ -183,7 +183,7 @@ struct TimeManager::Impl final { | |||
| 183 | Clock::SteadyClockTimePoint steady_clock_time_point) { | 183 | Clock::SteadyClockTimePoint steady_clock_time_point) { |
| 184 | if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled( | 184 | if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled( |
| 185 | system_, is_automatic_correction_enabled) != ResultSuccess) { | 185 | system_, is_automatic_correction_enabled) != ResultSuccess) { |
| 186 | UNREACHABLE(); | 186 | ASSERT(false); |
| 187 | return; | 187 | return; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| @@ -203,7 +203,7 @@ struct TimeManager::Impl final { | |||
| 203 | if (GetStandardLocalSystemClockCore() | 203 | if (GetStandardLocalSystemClockCore() |
| 204 | .SetCurrentTime(system_, timespan.ToSeconds()) | 204 | .SetCurrentTime(system_, timespan.ToSeconds()) |
| 205 | .IsError()) { | 205 | .IsError()) { |
| 206 | UNREACHABLE(); | 206 | ASSERT(false); |
| 207 | return; | 207 | return; |
| 208 | } | 208 | } |
| 209 | } | 209 | } |
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index eeec34436..fee05ec7a 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp | |||
| @@ -279,7 +279,7 @@ static constexpr int TransitionTime(int year, Rule rule, int offset) { | |||
| 279 | break; | 279 | break; |
| 280 | } | 280 | } |
| 281 | default: | 281 | default: |
| 282 | UNREACHABLE(); | 282 | ASSERT(false); |
| 283 | } | 283 | } |
| 284 | return value + rule.transition_time + offset; | 284 | return value + rule.transition_time + offset; |
| 285 | } | 285 | } |