diff options
| author | 2023-03-07 12:01:07 -0500 | |
|---|---|---|
| committer | 2023-03-12 22:09:09 -0400 | |
| commit | ac6cbb7134d71134e4beae91361a78fa68202c22 (patch) | |
| tree | 19ac300007ee99c87138203809005fb708257b21 /src | |
| parent | kernel: convert KResourceLimit (diff) | |
| download | yuzu-ac6cbb7134d71134e4beae91361a78fa68202c22.tar.gz yuzu-ac6cbb7134d71134e4beae91361a78fa68202c22.tar.xz yuzu-ac6cbb7134d71134e4beae91361a78fa68202c22.zip | |
kernel: prefer std::addressof
Diffstat (limited to 'src')
21 files changed, 139 insertions, 134 deletions
diff --git a/src/core/hle/kernel/k_address_arbiter.cpp b/src/core/hle/kernel/k_address_arbiter.cpp index 47637a729..30a4e6edb 100644 --- a/src/core/hle/kernel/k_address_arbiter.cpp +++ b/src/core/hle/kernel/k_address_arbiter.cpp | |||
| @@ -141,7 +141,7 @@ Result KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 cou | |||
| 141 | 141 | ||
| 142 | // Check the userspace value. | 142 | // Check the userspace value. |
| 143 | s32 user_value{}; | 143 | s32 user_value{}; |
| 144 | R_UNLESS(UpdateIfEqual(m_system, &user_value, addr, value, value + 1), | 144 | R_UNLESS(UpdateIfEqual(m_system, std::addressof(user_value), addr, value, value + 1), |
| 145 | ResultInvalidCurrentMemory); | 145 | ResultInvalidCurrentMemory); |
| 146 | R_UNLESS(user_value == value, ResultInvalidState); | 146 | R_UNLESS(user_value == value, ResultInvalidState); |
| 147 | 147 | ||
| @@ -201,9 +201,9 @@ Result KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 val | |||
| 201 | s32 user_value{}; | 201 | s32 user_value{}; |
| 202 | bool succeeded{}; | 202 | bool succeeded{}; |
| 203 | if (value != new_value) { | 203 | if (value != new_value) { |
| 204 | succeeded = UpdateIfEqual(m_system, &user_value, addr, value, new_value); | 204 | succeeded = UpdateIfEqual(m_system, std::addressof(user_value), addr, value, new_value); |
| 205 | } else { | 205 | } else { |
| 206 | succeeded = ReadFromUser(m_system, &user_value, addr); | 206 | succeeded = ReadFromUser(m_system, std::addressof(user_value), addr); |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | R_UNLESS(succeeded, ResultInvalidCurrentMemory); | 209 | R_UNLESS(succeeded, ResultInvalidCurrentMemory); |
| @@ -244,9 +244,9 @@ Result KAddressArbiter::WaitIfLessThan(VAddr addr, s32 value, bool decrement, s6 | |||
| 244 | s32 user_value{}; | 244 | s32 user_value{}; |
| 245 | bool succeeded{}; | 245 | bool succeeded{}; |
| 246 | if (decrement) { | 246 | if (decrement) { |
| 247 | succeeded = DecrementIfLessThan(m_system, &user_value, addr, value); | 247 | succeeded = DecrementIfLessThan(m_system, std::addressof(user_value), addr, value); |
| 248 | } else { | 248 | } else { |
| 249 | succeeded = ReadFromUser(m_system, &user_value, addr); | 249 | succeeded = ReadFromUser(m_system, std::addressof(user_value), addr); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | if (!succeeded) { | 252 | if (!succeeded) { |
| @@ -297,7 +297,7 @@ Result KAddressArbiter::WaitIfEqual(VAddr addr, s32 value, s64 timeout) { | |||
| 297 | 297 | ||
| 298 | // Read the value from userspace. | 298 | // Read the value from userspace. |
| 299 | s32 user_value{}; | 299 | s32 user_value{}; |
| 300 | if (!ReadFromUser(m_system, &user_value, addr)) { | 300 | if (!ReadFromUser(m_system, std::addressof(user_value), addr)) { |
| 301 | slp.CancelSleep(); | 301 | slp.CancelSleep(); |
| 302 | R_THROW(ResultInvalidCurrentMemory); | 302 | R_THROW(ResultInvalidCurrentMemory); |
| 303 | } | 303 | } |
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index edb9cf071..9b71fe371 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h | |||
| @@ -195,7 +195,7 @@ public: | |||
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | friend bool operator<(const KAutoObjectWithList& left, const KAutoObjectWithList& right) { | 197 | friend bool operator<(const KAutoObjectWithList& left, const KAutoObjectWithList& right) { |
| 198 | return &left < &right; | 198 | return KAutoObjectWithList::Compare(left, right) < 0; |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | public: | 201 | public: |
diff --git a/src/core/hle/kernel/k_page_table.h b/src/core/hle/kernel/k_page_table.h index 367dab613..5c5356338 100644 --- a/src/core/hle/kernel/k_page_table.h +++ b/src/core/hle/kernel/k_page_table.h | |||
| @@ -484,7 +484,7 @@ private: | |||
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | PageLinkedList* GetPageList() { | 486 | PageLinkedList* GetPageList() { |
| 487 | return &m_ll; | 487 | return std::addressof(m_ll); |
| 488 | } | 488 | } |
| 489 | }; | 489 | }; |
| 490 | 490 | ||
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 4954a40db..b740fb1c3 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp | |||
| @@ -44,12 +44,13 @@ void SetupMainThread(Core::System& system, KProcess& owner_process, u32 priority | |||
| 44 | SCOPE_EXIT({ thread->Close(); }); | 44 | SCOPE_EXIT({ thread->Close(); }); |
| 45 | 45 | ||
| 46 | ASSERT(KThread::InitializeUserThread(system, thread, entry_point, 0, stack_top, priority, | 46 | ASSERT(KThread::InitializeUserThread(system, thread, entry_point, 0, stack_top, priority, |
| 47 | owner_process.GetIdealCoreId(), &owner_process) | 47 | owner_process.GetIdealCoreId(), |
| 48 | std::addressof(owner_process)) | ||
| 48 | .IsSuccess()); | 49 | .IsSuccess()); |
| 49 | 50 | ||
| 50 | // Register 1 must be a handle to the main thread | 51 | // Register 1 must be a handle to the main thread |
| 51 | Handle thread_handle{}; | 52 | Handle thread_handle{}; |
| 52 | owner_process.GetHandleTable().Add(&thread_handle, thread); | 53 | owner_process.GetHandleTable().Add(std::addressof(thread_handle), thread); |
| 53 | 54 | ||
| 54 | thread->SetName("main"); | 55 | thread->SetName("main"); |
| 55 | thread->GetContext32().cpu_registers[0] = 0; | 56 | thread->GetContext32().cpu_registers[0] = 0; |
| @@ -366,7 +367,7 @@ Result KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std: | |||
| 366 | // Initialize process address space | 367 | // Initialize process address space |
| 367 | if (const Result result{page_table.InitializeForProcess( | 368 | if (const Result result{page_table.InitializeForProcess( |
| 368 | metadata.GetAddressSpaceType(), false, false, false, KMemoryManager::Pool::Application, | 369 | metadata.GetAddressSpaceType(), false, false, false, KMemoryManager::Pool::Application, |
| 369 | 0x8000000, code_size, &m_kernel.GetAppSystemResource(), resource_limit)}; | 370 | 0x8000000, code_size, std::addressof(m_kernel.GetAppSystemResource()), resource_limit)}; |
| 370 | result.IsError()) { | 371 | result.IsError()) { |
| 371 | R_RETURN(result); | 372 | R_RETURN(result); |
| 372 | } | 373 | } |
diff --git a/src/core/hle/kernel/k_resource_limit.cpp b/src/core/hle/kernel/k_resource_limit.cpp index b5c353938..fcee26a29 100644 --- a/src/core/hle/kernel/k_resource_limit.cpp +++ b/src/core/hle/kernel/k_resource_limit.cpp | |||
| @@ -119,7 +119,7 @@ bool KResourceLimit::Reserve(LimitableResource which, s64 value, s64 timeout) { | |||
| 119 | if (m_current_hints[index] + value <= m_limit_values[index] && | 119 | if (m_current_hints[index] + value <= m_limit_values[index] && |
| 120 | (timeout < 0 || m_core_timing->GetGlobalTimeNs().count() < timeout)) { | 120 | (timeout < 0 || m_core_timing->GetGlobalTimeNs().count() < timeout)) { |
| 121 | m_waiter_count++; | 121 | m_waiter_count++; |
| 122 | m_cond_var.Wait(&m_lock, timeout, false); | 122 | m_cond_var.Wait(std::addressof(m_lock), timeout, false); |
| 123 | m_waiter_count--; | 123 | m_waiter_count--; |
| 124 | } else { | 124 | } else { |
| 125 | break; | 125 | break; |
| @@ -154,7 +154,7 @@ void KResourceLimit::Release(LimitableResource which, s64 value, s64 hint) { | |||
| 154 | 154 | ||
| 155 | KResourceLimit* CreateResourceLimitForProcess(Core::System& system, s64 physical_memory_size) { | 155 | KResourceLimit* CreateResourceLimitForProcess(Core::System& system, s64 physical_memory_size) { |
| 156 | auto* resource_limit = KResourceLimit::Create(system.Kernel()); | 156 | auto* resource_limit = KResourceLimit::Create(system.Kernel()); |
| 157 | resource_limit->Initialize(&system.CoreTiming()); | 157 | resource_limit->Initialize(std::addressof(system.CoreTiming())); |
| 158 | 158 | ||
| 159 | // Initialize default resource limit values. | 159 | // Initialize default resource limit values. |
| 160 | // TODO(bunnei): These values are the system defaults, the limits for service processes are | 160 | // TODO(bunnei): These values are the system defaults, the limits for service processes are |
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index b631ec406..fe371726c 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp | |||
| @@ -149,7 +149,7 @@ void KScheduler::Initialize(KThread* main_thread, KThread* idle_thread, s32 core | |||
| 149 | m_core_id = core_id; | 149 | m_core_id = core_id; |
| 150 | m_idle_thread = idle_thread; | 150 | m_idle_thread = idle_thread; |
| 151 | // m_state.idle_thread_stack = m_idle_thread->GetStackTop(); | 151 | // m_state.idle_thread_stack = m_idle_thread->GetStackTop(); |
| 152 | // m_state.interrupt_task_manager = &kernel.GetInterruptTaskManager(); | 152 | // m_state.interrupt_task_manager = std::addressof(kernel.GetInterruptTaskManager()); |
| 153 | 153 | ||
| 154 | // Insert the main thread into the priority queue. | 154 | // Insert the main thread into the priority queue. |
| 155 | // { | 155 | // { |
diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp index e9b4ef528..8376c5d76 100644 --- a/src/core/hle/kernel/k_server_session.cpp +++ b/src/core/hle/kernel/k_server_session.cpp | |||
| @@ -115,7 +115,7 @@ void KServerSession::OnClientClosed() { | |||
| 115 | 115 | ||
| 116 | // // Get the process and page table. | 116 | // // Get the process and page table. |
| 117 | // KProcess *client_process = thread->GetOwnerProcess(); | 117 | // KProcess *client_process = thread->GetOwnerProcess(); |
| 118 | // auto &client_pt = client_process->GetPageTable(); | 118 | // auto& client_pt = client_process->GetPageTable(); |
| 119 | 119 | ||
| 120 | // // Reply to the request. | 120 | // // Reply to the request. |
| 121 | // ReplyAsyncError(client_process, request->GetAddress(), request->GetSize(), | 121 | // ReplyAsyncError(client_process, request->GetAddress(), request->GetSize(), |
| @@ -177,7 +177,7 @@ Result KServerSession::OnRequest(KSessionRequest* request) { | |||
| 177 | 177 | ||
| 178 | // This is a synchronous request, so we should wait for our request to complete. | 178 | // This is a synchronous request, so we should wait for our request to complete. |
| 179 | GetCurrentThread(m_kernel).SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::IPC); | 179 | GetCurrentThread(m_kernel).SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::IPC); |
| 180 | GetCurrentThread(m_kernel).BeginWait(&wait_queue); | 180 | GetCurrentThread(m_kernel).BeginWait(std::addressof(wait_queue)); |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | return GetCurrentThread(m_kernel).GetWaitResult(); | 183 | return GetCurrentThread(m_kernel).GetWaitResult(); |
| @@ -248,7 +248,7 @@ Result KServerSession::SendReply(bool is_hle) { | |||
| 248 | if (event != nullptr) { | 248 | if (event != nullptr) { |
| 249 | // // Get the client process/page table. | 249 | // // Get the client process/page table. |
| 250 | // KProcess *client_process = client_thread->GetOwnerProcess(); | 250 | // KProcess *client_process = client_thread->GetOwnerProcess(); |
| 251 | // KPageTable *client_page_table = &client_process->PageTable(); | 251 | // KPageTable *client_page_table = std::addressof(client_process->PageTable()); |
| 252 | 252 | ||
| 253 | // // If we need to, reply with an async error. | 253 | // // If we need to, reply with an async error. |
| 254 | // if (R_FAILED(client_result)) { | 254 | // if (R_FAILED(client_result)) { |
| @@ -297,7 +297,7 @@ Result KServerSession::ReceiveRequest(std::shared_ptr<Service::HLERequestContext | |||
| 297 | R_UNLESS(!m_request_list.empty(), ResultNotFound); | 297 | R_UNLESS(!m_request_list.empty(), ResultNotFound); |
| 298 | 298 | ||
| 299 | // Pop the first request from the list. | 299 | // Pop the first request from the list. |
| 300 | request = &m_request_list.front(); | 300 | request = std::addressof(m_request_list.front()); |
| 301 | m_request_list.pop_front(); | 301 | m_request_list.pop_front(); |
| 302 | 302 | ||
| 303 | // Get the thread for the request. | 303 | // Get the thread for the request. |
| @@ -358,7 +358,7 @@ void KServerSession::CleanupRequests() { | |||
| 358 | m_current_request = nullptr; | 358 | m_current_request = nullptr; |
| 359 | } else if (!m_request_list.empty()) { | 359 | } else if (!m_request_list.empty()) { |
| 360 | // Pop the request from the front of the list. | 360 | // Pop the request from the front of the list. |
| 361 | request = &m_request_list.front(); | 361 | request = std::addressof(m_request_list.front()); |
| 362 | m_request_list.pop_front(); | 362 | m_request_list.pop_front(); |
| 363 | } | 363 | } |
| 364 | } | 364 | } |
| @@ -381,7 +381,8 @@ void KServerSession::CleanupRequests() { | |||
| 381 | // KProcess *client_process = (client_thread != nullptr) ? | 381 | // KProcess *client_process = (client_thread != nullptr) ? |
| 382 | // client_thread->GetOwnerProcess() : nullptr; | 382 | // client_thread->GetOwnerProcess() : nullptr; |
| 383 | // KProcessPageTable *client_page_table = (client_process != nullptr) ? | 383 | // KProcessPageTable *client_page_table = (client_process != nullptr) ? |
| 384 | // &client_process->GetPageTable() : nullptr; | 384 | // std::addressof(client_process->GetPageTable()) |
| 385 | // : nullptr; | ||
| 385 | 386 | ||
| 386 | // Cleanup the mappings. | 387 | // Cleanup the mappings. |
| 387 | // Result result = CleanupMap(request, server_process, client_page_table); | 388 | // Result result = CleanupMap(request, server_process, client_page_table); |
diff --git a/src/core/hle/kernel/k_shared_memory.cpp b/src/core/hle/kernel/k_shared_memory.cpp index b7b3b612b..950365d14 100644 --- a/src/core/hle/kernel/k_shared_memory.cpp +++ b/src/core/hle/kernel/k_shared_memory.cpp | |||
| @@ -44,7 +44,8 @@ Result KSharedMemory::Initialize(Core::DeviceMemory& device_memory, KProcess* ow | |||
| 44 | R_UNLESS(m_physical_address != 0, ResultOutOfMemory); | 44 | R_UNLESS(m_physical_address != 0, ResultOutOfMemory); |
| 45 | 45 | ||
| 46 | //! Insert the result into our page group. | 46 | //! Insert the result into our page group. |
| 47 | m_page_group.emplace(m_kernel, &m_kernel.GetSystemSystemResource().GetBlockInfoManager()); | 47 | m_page_group.emplace(m_kernel, |
| 48 | std::addressof(m_kernel.GetSystemSystemResource().GetBlockInfoManager())); | ||
| 48 | m_page_group->AddBlock(m_physical_address, num_pages); | 49 | m_page_group->AddBlock(m_physical_address, num_pages); |
| 49 | 50 | ||
| 50 | // Commit our reservation. | 51 | // Commit our reservation. |
diff --git a/src/core/hle/kernel/k_slab_heap.h b/src/core/hle/kernel/k_slab_heap.h index 68469b041..334afebb7 100644 --- a/src/core/hle/kernel/k_slab_heap.h +++ b/src/core/hle/kernel/k_slab_heap.h | |||
| @@ -89,7 +89,8 @@ private: | |||
| 89 | if (alloc_peak <= cur_peak) { | 89 | if (alloc_peak <= cur_peak) { |
| 90 | break; | 90 | break; |
| 91 | } | 91 | } |
| 92 | } while (!Common::AtomicCompareAndSwap(&m_peak, alloc_peak, cur_peak, cur_peak)); | 92 | } while ( |
| 93 | !Common::AtomicCompareAndSwap(std::addressof(m_peak), alloc_peak, cur_peak, cur_peak)); | ||
| 93 | } | 94 | } |
| 94 | 95 | ||
| 95 | public: | 96 | public: |
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 49a683e5f..27616440c 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -930,14 +930,14 @@ Result KThread::GetThreadContext3(std::vector<u8>& out) { | |||
| 930 | context.pstate &= 0xFF0FFE20; | 930 | context.pstate &= 0xFF0FFE20; |
| 931 | 931 | ||
| 932 | out.resize(sizeof(context)); | 932 | out.resize(sizeof(context)); |
| 933 | std::memcpy(out.data(), &context, sizeof(context)); | 933 | std::memcpy(out.data(), std::addressof(context), sizeof(context)); |
| 934 | } else { | 934 | } else { |
| 935 | // Mask away mode bits, interrupt bits, IL bit, and other reserved bits. | 935 | // Mask away mode bits, interrupt bits, IL bit, and other reserved bits. |
| 936 | auto context = GetContext32(); | 936 | auto context = GetContext32(); |
| 937 | context.cpsr &= 0xFF0FFE20; | 937 | context.cpsr &= 0xFF0FFE20; |
| 938 | 938 | ||
| 939 | out.resize(sizeof(context)); | 939 | out.resize(sizeof(context)); |
| 940 | std::memcpy(out.data(), &context, sizeof(context)); | 940 | std::memcpy(out.data(), std::addressof(context), sizeof(context)); |
| 941 | } | 941 | } |
| 942 | } | 942 | } |
| 943 | } | 943 | } |
diff --git a/src/core/hle/kernel/k_thread_local_page.cpp b/src/core/hle/kernel/k_thread_local_page.cpp index 563560114..c2af6898a 100644 --- a/src/core/hle/kernel/k_thread_local_page.cpp +++ b/src/core/hle/kernel/k_thread_local_page.cpp | |||
| @@ -16,7 +16,7 @@ namespace Kernel { | |||
| 16 | Result KThreadLocalPage::Initialize(KernelCore& kernel, KProcess* process) { | 16 | Result KThreadLocalPage::Initialize(KernelCore& kernel, KProcess* process) { |
| 17 | // Set that this process owns us. | 17 | // Set that this process owns us. |
| 18 | m_owner = process; | 18 | m_owner = process; |
| 19 | m_kernel = &kernel; | 19 | m_kernel = std::addressof(kernel); |
| 20 | 20 | ||
| 21 | // Allocate a new page. | 21 | // Allocate a new page. |
| 22 | KPageBuffer* page_buf = KPageBuffer::Allocate(kernel); | 22 | KPageBuffer* page_buf = KPageBuffer::Allocate(kernel); |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index a0bfd6bbc..871d541d4 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -36,9 +36,9 @@ static To Convert(const From& from) { | |||
| 36 | To to{}; | 36 | To to{}; |
| 37 | 37 | ||
| 38 | if constexpr (sizeof(To) >= sizeof(From)) { | 38 | if constexpr (sizeof(To) >= sizeof(From)) { |
| 39 | std::memcpy(&to, &from, sizeof(From)); | 39 | std::memcpy(std::addressof(to), std::addressof(from), sizeof(From)); |
| 40 | } else { | 40 | } else { |
| 41 | std::memcpy(&to, &from, sizeof(To)); | 41 | std::memcpy(std::addressof(to), std::addressof(from), sizeof(To)); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | return to; | 44 | return to; |
| @@ -87,7 +87,7 @@ static void SvcWrap_SetHeapSize64From32(Core::System& system) { | |||
| 87 | 87 | ||
| 88 | size = Convert<uint32_t>(GetReg32(system, 1)); | 88 | size = Convert<uint32_t>(GetReg32(system, 1)); |
| 89 | 89 | ||
| 90 | ret = SetHeapSize64From32(system, &out_address, size); | 90 | ret = SetHeapSize64From32(system, std::addressof(out_address), size); |
| 91 | 91 | ||
| 92 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 92 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 93 | SetReg32(system, 1, Convert<uint32_t>(out_address)); | 93 | SetReg32(system, 1, Convert<uint32_t>(out_address)); |
| @@ -169,7 +169,7 @@ static void SvcWrap_QueryMemory64From32(Core::System& system) { | |||
| 169 | out_memory_info = Convert<uint32_t>(GetReg32(system, 0)); | 169 | out_memory_info = Convert<uint32_t>(GetReg32(system, 0)); |
| 170 | address = Convert<uint32_t>(GetReg32(system, 2)); | 170 | address = Convert<uint32_t>(GetReg32(system, 2)); |
| 171 | 171 | ||
| 172 | ret = QueryMemory64From32(system, out_memory_info, &out_page_info, address); | 172 | ret = QueryMemory64From32(system, out_memory_info, std::addressof(out_page_info), address); |
| 173 | 173 | ||
| 174 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 174 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 175 | SetReg32(system, 1, Convert<uint32_t>(out_page_info)); | 175 | SetReg32(system, 1, Convert<uint32_t>(out_page_info)); |
| @@ -195,7 +195,7 @@ static void SvcWrap_CreateThread64From32(Core::System& system) { | |||
| 195 | priority = Convert<int32_t>(GetReg32(system, 0)); | 195 | priority = Convert<int32_t>(GetReg32(system, 0)); |
| 196 | core_id = Convert<int32_t>(GetReg32(system, 4)); | 196 | core_id = Convert<int32_t>(GetReg32(system, 4)); |
| 197 | 197 | ||
| 198 | ret = CreateThread64From32(system, &out_handle, func, arg, stack_bottom, priority, core_id); | 198 | ret = CreateThread64From32(system, std::addressof(out_handle), func, arg, stack_bottom, priority, core_id); |
| 199 | 199 | ||
| 200 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 200 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 201 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 201 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -236,7 +236,7 @@ static void SvcWrap_GetThreadPriority64From32(Core::System& system) { | |||
| 236 | 236 | ||
| 237 | thread_handle = Convert<Handle>(GetReg32(system, 1)); | 237 | thread_handle = Convert<Handle>(GetReg32(system, 1)); |
| 238 | 238 | ||
| 239 | ret = GetThreadPriority64From32(system, &out_priority, thread_handle); | 239 | ret = GetThreadPriority64From32(system, std::addressof(out_priority), thread_handle); |
| 240 | 240 | ||
| 241 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 241 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 242 | SetReg32(system, 1, Convert<uint32_t>(out_priority)); | 242 | SetReg32(system, 1, Convert<uint32_t>(out_priority)); |
| @@ -265,7 +265,7 @@ static void SvcWrap_GetThreadCoreMask64From32(Core::System& system) { | |||
| 265 | 265 | ||
| 266 | thread_handle = Convert<Handle>(GetReg32(system, 2)); | 266 | thread_handle = Convert<Handle>(GetReg32(system, 2)); |
| 267 | 267 | ||
| 268 | ret = GetThreadCoreMask64From32(system, &out_core_id, &out_affinity_mask, thread_handle); | 268 | ret = GetThreadCoreMask64From32(system, std::addressof(out_core_id), std::addressof(out_affinity_mask), thread_handle); |
| 269 | 269 | ||
| 270 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 270 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 271 | SetReg32(system, 1, Convert<uint32_t>(out_core_id)); | 271 | SetReg32(system, 1, Convert<uint32_t>(out_core_id)); |
| @@ -371,7 +371,7 @@ static void SvcWrap_CreateTransferMemory64From32(Core::System& system) { | |||
| 371 | size = Convert<uint32_t>(GetReg32(system, 2)); | 371 | size = Convert<uint32_t>(GetReg32(system, 2)); |
| 372 | map_perm = Convert<MemoryPermission>(GetReg32(system, 3)); | 372 | map_perm = Convert<MemoryPermission>(GetReg32(system, 3)); |
| 373 | 373 | ||
| 374 | ret = CreateTransferMemory64From32(system, &out_handle, address, size, map_perm); | 374 | ret = CreateTransferMemory64From32(system, std::addressof(out_handle), address, size, map_perm); |
| 375 | 375 | ||
| 376 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 376 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 377 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 377 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -416,7 +416,7 @@ static void SvcWrap_WaitSynchronization64From32(Core::System& system) { | |||
| 416 | timeout_ns_gather[1] = GetReg32(system, 3); | 416 | timeout_ns_gather[1] = GetReg32(system, 3); |
| 417 | timeout_ns = Convert<int64_t>(timeout_ns_gather); | 417 | timeout_ns = Convert<int64_t>(timeout_ns_gather); |
| 418 | 418 | ||
| 419 | ret = WaitSynchronization64From32(system, &out_index, handles, num_handles, timeout_ns); | 419 | ret = WaitSynchronization64From32(system, std::addressof(out_index), handles, num_handles, timeout_ns); |
| 420 | 420 | ||
| 421 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 421 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 422 | SetReg32(system, 1, Convert<uint32_t>(out_index)); | 422 | SetReg32(system, 1, Convert<uint32_t>(out_index)); |
| @@ -511,7 +511,7 @@ static void SvcWrap_ConnectToNamedPort64From32(Core::System& system) { | |||
| 511 | 511 | ||
| 512 | name = Convert<uint32_t>(GetReg32(system, 1)); | 512 | name = Convert<uint32_t>(GetReg32(system, 1)); |
| 513 | 513 | ||
| 514 | ret = ConnectToNamedPort64From32(system, &out_handle, name); | 514 | ret = ConnectToNamedPort64From32(system, std::addressof(out_handle), name); |
| 515 | 515 | ||
| 516 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 516 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 517 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 517 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -557,7 +557,7 @@ static void SvcWrap_SendAsyncRequestWithUserBuffer64From32(Core::System& system) | |||
| 557 | message_buffer_size = Convert<uint32_t>(GetReg32(system, 2)); | 557 | message_buffer_size = Convert<uint32_t>(GetReg32(system, 2)); |
| 558 | session_handle = Convert<Handle>(GetReg32(system, 3)); | 558 | session_handle = Convert<Handle>(GetReg32(system, 3)); |
| 559 | 559 | ||
| 560 | ret = SendAsyncRequestWithUserBuffer64From32(system, &out_event_handle, message_buffer, message_buffer_size, session_handle); | 560 | ret = SendAsyncRequestWithUserBuffer64From32(system, std::addressof(out_event_handle), message_buffer, message_buffer_size, session_handle); |
| 561 | 561 | ||
| 562 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 562 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 563 | SetReg32(system, 1, Convert<uint32_t>(out_event_handle)); | 563 | SetReg32(system, 1, Convert<uint32_t>(out_event_handle)); |
| @@ -571,7 +571,7 @@ static void SvcWrap_GetProcessId64From32(Core::System& system) { | |||
| 571 | 571 | ||
| 572 | process_handle = Convert<Handle>(GetReg32(system, 1)); | 572 | process_handle = Convert<Handle>(GetReg32(system, 1)); |
| 573 | 573 | ||
| 574 | ret = GetProcessId64From32(system, &out_process_id, process_handle); | 574 | ret = GetProcessId64From32(system, std::addressof(out_process_id), process_handle); |
| 575 | 575 | ||
| 576 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 576 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 577 | auto out_process_id_scatter = Convert<std::array<uint32_t, 2>>(out_process_id); | 577 | auto out_process_id_scatter = Convert<std::array<uint32_t, 2>>(out_process_id); |
| @@ -587,7 +587,7 @@ static void SvcWrap_GetThreadId64From32(Core::System& system) { | |||
| 587 | 587 | ||
| 588 | thread_handle = Convert<Handle>(GetReg32(system, 1)); | 588 | thread_handle = Convert<Handle>(GetReg32(system, 1)); |
| 589 | 589 | ||
| 590 | ret = GetThreadId64From32(system, &out_thread_id, thread_handle); | 590 | ret = GetThreadId64From32(system, std::addressof(out_thread_id), thread_handle); |
| 591 | 591 | ||
| 592 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 592 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 593 | auto out_thread_id_scatter = Convert<std::array<uint32_t, 2>>(out_thread_id); | 593 | auto out_thread_id_scatter = Convert<std::array<uint32_t, 2>>(out_thread_id); |
| @@ -644,7 +644,7 @@ static void SvcWrap_GetInfo64From32(Core::System& system) { | |||
| 644 | info_subtype_gather[1] = GetReg32(system, 3); | 644 | info_subtype_gather[1] = GetReg32(system, 3); |
| 645 | info_subtype = Convert<uint64_t>(info_subtype_gather); | 645 | info_subtype = Convert<uint64_t>(info_subtype_gather); |
| 646 | 646 | ||
| 647 | ret = GetInfo64From32(system, &out, info_type, handle, info_subtype); | 647 | ret = GetInfo64From32(system, std::addressof(out), info_type, handle, info_subtype); |
| 648 | 648 | ||
| 649 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 649 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 650 | auto out_scatter = Convert<std::array<uint32_t, 2>>(out); | 650 | auto out_scatter = Convert<std::array<uint32_t, 2>>(out); |
| @@ -712,7 +712,7 @@ static void SvcWrap_GetDebugFutureThreadInfo64From32(Core::System& system) { | |||
| 712 | ns_gather[1] = GetReg32(system, 1); | 712 | ns_gather[1] = GetReg32(system, 1); |
| 713 | ns = Convert<int64_t>(ns_gather); | 713 | ns = Convert<int64_t>(ns_gather); |
| 714 | 714 | ||
| 715 | ret = GetDebugFutureThreadInfo64From32(system, &out_context, &out_thread_id, debug_handle, ns); | 715 | ret = GetDebugFutureThreadInfo64From32(system, std::addressof(out_context), std::addressof(out_thread_id), debug_handle, ns); |
| 716 | 716 | ||
| 717 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 717 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 718 | auto out_context_scatter = Convert<std::array<uint32_t, 4>>(out_context); | 718 | auto out_context_scatter = Convert<std::array<uint32_t, 4>>(out_context); |
| @@ -732,7 +732,7 @@ static void SvcWrap_GetLastThreadInfo64From32(Core::System& system) { | |||
| 732 | uint64_t out_tls_address{}; | 732 | uint64_t out_tls_address{}; |
| 733 | uint32_t out_flags{}; | 733 | uint32_t out_flags{}; |
| 734 | 734 | ||
| 735 | ret = GetLastThreadInfo64From32(system, &out_context, &out_tls_address, &out_flags); | 735 | ret = GetLastThreadInfo64From32(system, std::addressof(out_context), std::addressof(out_tls_address), std::addressof(out_flags)); |
| 736 | 736 | ||
| 737 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 737 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 738 | auto out_context_scatter = Convert<std::array<uint32_t, 4>>(out_context); | 738 | auto out_context_scatter = Convert<std::array<uint32_t, 4>>(out_context); |
| @@ -754,7 +754,7 @@ static void SvcWrap_GetResourceLimitLimitValue64From32(Core::System& system) { | |||
| 754 | resource_limit_handle = Convert<Handle>(GetReg32(system, 1)); | 754 | resource_limit_handle = Convert<Handle>(GetReg32(system, 1)); |
| 755 | which = Convert<LimitableResource>(GetReg32(system, 2)); | 755 | which = Convert<LimitableResource>(GetReg32(system, 2)); |
| 756 | 756 | ||
| 757 | ret = GetResourceLimitLimitValue64From32(system, &out_limit_value, resource_limit_handle, which); | 757 | ret = GetResourceLimitLimitValue64From32(system, std::addressof(out_limit_value), resource_limit_handle, which); |
| 758 | 758 | ||
| 759 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 759 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 760 | auto out_limit_value_scatter = Convert<std::array<uint32_t, 2>>(out_limit_value); | 760 | auto out_limit_value_scatter = Convert<std::array<uint32_t, 2>>(out_limit_value); |
| @@ -772,7 +772,7 @@ static void SvcWrap_GetResourceLimitCurrentValue64From32(Core::System& system) { | |||
| 772 | resource_limit_handle = Convert<Handle>(GetReg32(system, 1)); | 772 | resource_limit_handle = Convert<Handle>(GetReg32(system, 1)); |
| 773 | which = Convert<LimitableResource>(GetReg32(system, 2)); | 773 | which = Convert<LimitableResource>(GetReg32(system, 2)); |
| 774 | 774 | ||
| 775 | ret = GetResourceLimitCurrentValue64From32(system, &out_current_value, resource_limit_handle, which); | 775 | ret = GetResourceLimitCurrentValue64From32(system, std::addressof(out_current_value), resource_limit_handle, which); |
| 776 | 776 | ||
| 777 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 777 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 778 | auto out_current_value_scatter = Convert<std::array<uint32_t, 2>>(out_current_value); | 778 | auto out_current_value_scatter = Convert<std::array<uint32_t, 2>>(out_current_value); |
| @@ -861,7 +861,7 @@ static void SvcWrap_GetResourceLimitPeakValue64From32(Core::System& system) { | |||
| 861 | resource_limit_handle = Convert<Handle>(GetReg32(system, 1)); | 861 | resource_limit_handle = Convert<Handle>(GetReg32(system, 1)); |
| 862 | which = Convert<LimitableResource>(GetReg32(system, 2)); | 862 | which = Convert<LimitableResource>(GetReg32(system, 2)); |
| 863 | 863 | ||
| 864 | ret = GetResourceLimitPeakValue64From32(system, &out_peak_value, resource_limit_handle, which); | 864 | ret = GetResourceLimitPeakValue64From32(system, std::addressof(out_peak_value), resource_limit_handle, which); |
| 865 | 865 | ||
| 866 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 866 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 867 | auto out_peak_value_scatter = Convert<std::array<uint32_t, 2>>(out_peak_value); | 867 | auto out_peak_value_scatter = Convert<std::array<uint32_t, 2>>(out_peak_value); |
| @@ -877,7 +877,7 @@ static void SvcWrap_CreateIoPool64From32(Core::System& system) { | |||
| 877 | 877 | ||
| 878 | which = Convert<IoPoolType>(GetReg32(system, 1)); | 878 | which = Convert<IoPoolType>(GetReg32(system, 1)); |
| 879 | 879 | ||
| 880 | ret = CreateIoPool64From32(system, &out_handle, which); | 880 | ret = CreateIoPool64From32(system, std::addressof(out_handle), which); |
| 881 | 881 | ||
| 882 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 882 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 883 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 883 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -902,7 +902,7 @@ static void SvcWrap_CreateIoRegion64From32(Core::System& system) { | |||
| 902 | mapping = Convert<MemoryMapping>(GetReg32(system, 4)); | 902 | mapping = Convert<MemoryMapping>(GetReg32(system, 4)); |
| 903 | perm = Convert<MemoryPermission>(GetReg32(system, 5)); | 903 | perm = Convert<MemoryPermission>(GetReg32(system, 5)); |
| 904 | 904 | ||
| 905 | ret = CreateIoRegion64From32(system, &out_handle, io_pool, physical_address, size, mapping, perm); | 905 | ret = CreateIoRegion64From32(system, std::addressof(out_handle), io_pool, physical_address, size, mapping, perm); |
| 906 | 906 | ||
| 907 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 907 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 908 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 908 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -950,7 +950,7 @@ static void SvcWrap_CreateSession64From32(Core::System& system) { | |||
| 950 | is_light = Convert<bool>(GetReg32(system, 2)); | 950 | is_light = Convert<bool>(GetReg32(system, 2)); |
| 951 | name = Convert<uint32_t>(GetReg32(system, 3)); | 951 | name = Convert<uint32_t>(GetReg32(system, 3)); |
| 952 | 952 | ||
| 953 | ret = CreateSession64From32(system, &out_server_session_handle, &out_client_session_handle, is_light, name); | 953 | ret = CreateSession64From32(system, std::addressof(out_server_session_handle), std::addressof(out_client_session_handle), is_light, name); |
| 954 | 954 | ||
| 955 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 955 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 956 | SetReg32(system, 1, Convert<uint32_t>(out_server_session_handle)); | 956 | SetReg32(system, 1, Convert<uint32_t>(out_server_session_handle)); |
| @@ -965,7 +965,7 @@ static void SvcWrap_AcceptSession64From32(Core::System& system) { | |||
| 965 | 965 | ||
| 966 | port = Convert<Handle>(GetReg32(system, 1)); | 966 | port = Convert<Handle>(GetReg32(system, 1)); |
| 967 | 967 | ||
| 968 | ret = AcceptSession64From32(system, &out_handle, port); | 968 | ret = AcceptSession64From32(system, std::addressof(out_handle), port); |
| 969 | 969 | ||
| 970 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 970 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 971 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 971 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -988,7 +988,7 @@ static void SvcWrap_ReplyAndReceive64From32(Core::System& system) { | |||
| 988 | timeout_ns_gather[1] = GetReg32(system, 4); | 988 | timeout_ns_gather[1] = GetReg32(system, 4); |
| 989 | timeout_ns = Convert<int64_t>(timeout_ns_gather); | 989 | timeout_ns = Convert<int64_t>(timeout_ns_gather); |
| 990 | 990 | ||
| 991 | ret = ReplyAndReceive64From32(system, &out_index, handles, num_handles, reply_target, timeout_ns); | 991 | ret = ReplyAndReceive64From32(system, std::addressof(out_index), handles, num_handles, reply_target, timeout_ns); |
| 992 | 992 | ||
| 993 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 993 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 994 | SetReg32(system, 1, Convert<uint32_t>(out_index)); | 994 | SetReg32(system, 1, Convert<uint32_t>(out_index)); |
| @@ -1015,7 +1015,7 @@ static void SvcWrap_ReplyAndReceiveWithUserBuffer64From32(Core::System& system) | |||
| 1015 | timeout_ns_gather[1] = GetReg32(system, 6); | 1015 | timeout_ns_gather[1] = GetReg32(system, 6); |
| 1016 | timeout_ns = Convert<int64_t>(timeout_ns_gather); | 1016 | timeout_ns = Convert<int64_t>(timeout_ns_gather); |
| 1017 | 1017 | ||
| 1018 | ret = ReplyAndReceiveWithUserBuffer64From32(system, &out_index, message_buffer, message_buffer_size, handles, num_handles, reply_target, timeout_ns); | 1018 | ret = ReplyAndReceiveWithUserBuffer64From32(system, std::addressof(out_index), message_buffer, message_buffer_size, handles, num_handles, reply_target, timeout_ns); |
| 1019 | 1019 | ||
| 1020 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1020 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1021 | SetReg32(system, 1, Convert<uint32_t>(out_index)); | 1021 | SetReg32(system, 1, Convert<uint32_t>(out_index)); |
| @@ -1027,7 +1027,7 @@ static void SvcWrap_CreateEvent64From32(Core::System& system) { | |||
| 1027 | Handle out_write_handle{}; | 1027 | Handle out_write_handle{}; |
| 1028 | Handle out_read_handle{}; | 1028 | Handle out_read_handle{}; |
| 1029 | 1029 | ||
| 1030 | ret = CreateEvent64From32(system, &out_write_handle, &out_read_handle); | 1030 | ret = CreateEvent64From32(system, std::addressof(out_write_handle), std::addressof(out_read_handle)); |
| 1031 | 1031 | ||
| 1032 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1032 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1033 | SetReg32(system, 1, Convert<uint32_t>(out_write_handle)); | 1033 | SetReg32(system, 1, Convert<uint32_t>(out_write_handle)); |
| @@ -1118,7 +1118,7 @@ static void SvcWrap_CreateCodeMemory64From32(Core::System& system) { | |||
| 1118 | address = Convert<uint32_t>(GetReg32(system, 1)); | 1118 | address = Convert<uint32_t>(GetReg32(system, 1)); |
| 1119 | size = Convert<uint32_t>(GetReg32(system, 2)); | 1119 | size = Convert<uint32_t>(GetReg32(system, 2)); |
| 1120 | 1120 | ||
| 1121 | ret = CreateCodeMemory64From32(system, &out_handle, address, size); | 1121 | ret = CreateCodeMemory64From32(system, std::addressof(out_handle), address, size); |
| 1122 | 1122 | ||
| 1123 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1123 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1124 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 1124 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -1169,7 +1169,7 @@ static void SvcWrap_ReadWriteRegister64From32(Core::System& system) { | |||
| 1169 | mask = Convert<uint32_t>(GetReg32(system, 0)); | 1169 | mask = Convert<uint32_t>(GetReg32(system, 0)); |
| 1170 | value = Convert<uint32_t>(GetReg32(system, 1)); | 1170 | value = Convert<uint32_t>(GetReg32(system, 1)); |
| 1171 | 1171 | ||
| 1172 | ret = ReadWriteRegister64From32(system, &out_value, address, mask, value); | 1172 | ret = ReadWriteRegister64From32(system, std::addressof(out_value), address, mask, value); |
| 1173 | 1173 | ||
| 1174 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1174 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1175 | SetReg32(system, 1, Convert<uint32_t>(out_value)); | 1175 | SetReg32(system, 1, Convert<uint32_t>(out_value)); |
| @@ -1201,7 +1201,7 @@ static void SvcWrap_CreateSharedMemory64From32(Core::System& system) { | |||
| 1201 | owner_perm = Convert<MemoryPermission>(GetReg32(system, 2)); | 1201 | owner_perm = Convert<MemoryPermission>(GetReg32(system, 2)); |
| 1202 | remote_perm = Convert<MemoryPermission>(GetReg32(system, 3)); | 1202 | remote_perm = Convert<MemoryPermission>(GetReg32(system, 3)); |
| 1203 | 1203 | ||
| 1204 | ret = CreateSharedMemory64From32(system, &out_handle, size, owner_perm, remote_perm); | 1204 | ret = CreateSharedMemory64From32(system, std::addressof(out_handle), size, owner_perm, remote_perm); |
| 1205 | 1205 | ||
| 1206 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1206 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1207 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 1207 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -1251,7 +1251,7 @@ static void SvcWrap_CreateInterruptEvent64From32(Core::System& system) { | |||
| 1251 | interrupt_id = Convert<int32_t>(GetReg32(system, 1)); | 1251 | interrupt_id = Convert<int32_t>(GetReg32(system, 1)); |
| 1252 | interrupt_type = Convert<InterruptType>(GetReg32(system, 2)); | 1252 | interrupt_type = Convert<InterruptType>(GetReg32(system, 2)); |
| 1253 | 1253 | ||
| 1254 | ret = CreateInterruptEvent64From32(system, &out_read_handle, interrupt_id, interrupt_type); | 1254 | ret = CreateInterruptEvent64From32(system, std::addressof(out_read_handle), interrupt_id, interrupt_type); |
| 1255 | 1255 | ||
| 1256 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1256 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1257 | SetReg32(system, 1, Convert<uint32_t>(out_read_handle)); | 1257 | SetReg32(system, 1, Convert<uint32_t>(out_read_handle)); |
| @@ -1265,7 +1265,7 @@ static void SvcWrap_QueryPhysicalAddress64From32(Core::System& system) { | |||
| 1265 | 1265 | ||
| 1266 | address = Convert<uint32_t>(GetReg32(system, 1)); | 1266 | address = Convert<uint32_t>(GetReg32(system, 1)); |
| 1267 | 1267 | ||
| 1268 | ret = QueryPhysicalAddress64From32(system, &out_info, address); | 1268 | ret = QueryPhysicalAddress64From32(system, std::addressof(out_info), address); |
| 1269 | 1269 | ||
| 1270 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1270 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1271 | auto out_info_scatter = Convert<std::array<uint32_t, 4>>(out_info); | 1271 | auto out_info_scatter = Convert<std::array<uint32_t, 4>>(out_info); |
| @@ -1289,7 +1289,7 @@ static void SvcWrap_QueryIoMapping64From32(Core::System& system) { | |||
| 1289 | physical_address = Convert<uint64_t>(physical_address_gather); | 1289 | physical_address = Convert<uint64_t>(physical_address_gather); |
| 1290 | size = Convert<uint32_t>(GetReg32(system, 0)); | 1290 | size = Convert<uint32_t>(GetReg32(system, 0)); |
| 1291 | 1291 | ||
| 1292 | ret = QueryIoMapping64From32(system, &out_address, &out_size, physical_address, size); | 1292 | ret = QueryIoMapping64From32(system, std::addressof(out_address), std::addressof(out_size), physical_address, size); |
| 1293 | 1293 | ||
| 1294 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1294 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1295 | SetReg32(system, 1, Convert<uint32_t>(out_address)); | 1295 | SetReg32(system, 1, Convert<uint32_t>(out_address)); |
| @@ -1312,7 +1312,7 @@ static void SvcWrap_CreateDeviceAddressSpace64From32(Core::System& system) { | |||
| 1312 | das_size_gather[1] = GetReg32(system, 1); | 1312 | das_size_gather[1] = GetReg32(system, 1); |
| 1313 | das_size = Convert<uint64_t>(das_size_gather); | 1313 | das_size = Convert<uint64_t>(das_size_gather); |
| 1314 | 1314 | ||
| 1315 | ret = CreateDeviceAddressSpace64From32(system, &out_handle, das_address, das_size); | 1315 | ret = CreateDeviceAddressSpace64From32(system, std::addressof(out_handle), das_address, das_size); |
| 1316 | 1316 | ||
| 1317 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1317 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1318 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 1318 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -1505,7 +1505,7 @@ static void SvcWrap_DebugActiveProcess64From32(Core::System& system) { | |||
| 1505 | process_id_gather[1] = GetReg32(system, 3); | 1505 | process_id_gather[1] = GetReg32(system, 3); |
| 1506 | process_id = Convert<uint64_t>(process_id_gather); | 1506 | process_id = Convert<uint64_t>(process_id_gather); |
| 1507 | 1507 | ||
| 1508 | ret = DebugActiveProcess64From32(system, &out_handle, process_id); | 1508 | ret = DebugActiveProcess64From32(system, std::addressof(out_handle), process_id); |
| 1509 | 1509 | ||
| 1510 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1510 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1511 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 1511 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -1577,7 +1577,7 @@ static void SvcWrap_GetProcessList64From32(Core::System& system) { | |||
| 1577 | out_process_ids = Convert<uint32_t>(GetReg32(system, 1)); | 1577 | out_process_ids = Convert<uint32_t>(GetReg32(system, 1)); |
| 1578 | max_out_count = Convert<int32_t>(GetReg32(system, 2)); | 1578 | max_out_count = Convert<int32_t>(GetReg32(system, 2)); |
| 1579 | 1579 | ||
| 1580 | ret = GetProcessList64From32(system, &out_num_processes, out_process_ids, max_out_count); | 1580 | ret = GetProcessList64From32(system, std::addressof(out_num_processes), out_process_ids, max_out_count); |
| 1581 | 1581 | ||
| 1582 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1582 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1583 | SetReg32(system, 1, Convert<uint32_t>(out_num_processes)); | 1583 | SetReg32(system, 1, Convert<uint32_t>(out_num_processes)); |
| @@ -1595,7 +1595,7 @@ static void SvcWrap_GetThreadList64From32(Core::System& system) { | |||
| 1595 | max_out_count = Convert<int32_t>(GetReg32(system, 2)); | 1595 | max_out_count = Convert<int32_t>(GetReg32(system, 2)); |
| 1596 | debug_handle = Convert<Handle>(GetReg32(system, 3)); | 1596 | debug_handle = Convert<Handle>(GetReg32(system, 3)); |
| 1597 | 1597 | ||
| 1598 | ret = GetThreadList64From32(system, &out_num_threads, out_thread_ids, max_out_count, debug_handle); | 1598 | ret = GetThreadList64From32(system, std::addressof(out_num_threads), out_thread_ids, max_out_count, debug_handle); |
| 1599 | 1599 | ||
| 1600 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1600 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1601 | SetReg32(system, 1, Convert<uint32_t>(out_num_threads)); | 1601 | SetReg32(system, 1, Convert<uint32_t>(out_num_threads)); |
| @@ -1655,7 +1655,7 @@ static void SvcWrap_QueryDebugProcessMemory64From32(Core::System& system) { | |||
| 1655 | process_handle = Convert<Handle>(GetReg32(system, 2)); | 1655 | process_handle = Convert<Handle>(GetReg32(system, 2)); |
| 1656 | address = Convert<uint32_t>(GetReg32(system, 3)); | 1656 | address = Convert<uint32_t>(GetReg32(system, 3)); |
| 1657 | 1657 | ||
| 1658 | ret = QueryDebugProcessMemory64From32(system, out_memory_info, &out_page_info, process_handle, address); | 1658 | ret = QueryDebugProcessMemory64From32(system, out_memory_info, std::addressof(out_page_info), process_handle, address); |
| 1659 | 1659 | ||
| 1660 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1660 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1661 | SetReg32(system, 1, Convert<uint32_t>(out_page_info)); | 1661 | SetReg32(system, 1, Convert<uint32_t>(out_page_info)); |
| @@ -1735,7 +1735,7 @@ static void SvcWrap_GetDebugThreadParam64From32(Core::System& system) { | |||
| 1735 | thread_id = Convert<uint64_t>(thread_id_gather); | 1735 | thread_id = Convert<uint64_t>(thread_id_gather); |
| 1736 | param = Convert<DebugThreadParam>(GetReg32(system, 3)); | 1736 | param = Convert<DebugThreadParam>(GetReg32(system, 3)); |
| 1737 | 1737 | ||
| 1738 | ret = GetDebugThreadParam64From32(system, &out_64, &out_32, debug_handle, thread_id, param); | 1738 | ret = GetDebugThreadParam64From32(system, std::addressof(out_64), std::addressof(out_32), debug_handle, thread_id, param); |
| 1739 | 1739 | ||
| 1740 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1740 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1741 | auto out_64_scatter = Convert<std::array<uint32_t, 2>>(out_64); | 1741 | auto out_64_scatter = Convert<std::array<uint32_t, 2>>(out_64); |
| @@ -1759,7 +1759,7 @@ static void SvcWrap_GetSystemInfo64From32(Core::System& system) { | |||
| 1759 | info_subtype_gather[1] = GetReg32(system, 3); | 1759 | info_subtype_gather[1] = GetReg32(system, 3); |
| 1760 | info_subtype = Convert<uint64_t>(info_subtype_gather); | 1760 | info_subtype = Convert<uint64_t>(info_subtype_gather); |
| 1761 | 1761 | ||
| 1762 | ret = GetSystemInfo64From32(system, &out, info_type, handle, info_subtype); | 1762 | ret = GetSystemInfo64From32(system, std::addressof(out), info_type, handle, info_subtype); |
| 1763 | 1763 | ||
| 1764 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1764 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1765 | auto out_scatter = Convert<std::array<uint32_t, 2>>(out); | 1765 | auto out_scatter = Convert<std::array<uint32_t, 2>>(out); |
| @@ -1780,7 +1780,7 @@ static void SvcWrap_CreatePort64From32(Core::System& system) { | |||
| 1780 | is_light = Convert<bool>(GetReg32(system, 3)); | 1780 | is_light = Convert<bool>(GetReg32(system, 3)); |
| 1781 | name = Convert<uint32_t>(GetReg32(system, 0)); | 1781 | name = Convert<uint32_t>(GetReg32(system, 0)); |
| 1782 | 1782 | ||
| 1783 | ret = CreatePort64From32(system, &out_server_handle, &out_client_handle, max_sessions, is_light, name); | 1783 | ret = CreatePort64From32(system, std::addressof(out_server_handle), std::addressof(out_client_handle), max_sessions, is_light, name); |
| 1784 | 1784 | ||
| 1785 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1785 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1786 | SetReg32(system, 1, Convert<uint32_t>(out_server_handle)); | 1786 | SetReg32(system, 1, Convert<uint32_t>(out_server_handle)); |
| @@ -1797,7 +1797,7 @@ static void SvcWrap_ManageNamedPort64From32(Core::System& system) { | |||
| 1797 | name = Convert<uint32_t>(GetReg32(system, 1)); | 1797 | name = Convert<uint32_t>(GetReg32(system, 1)); |
| 1798 | max_sessions = Convert<int32_t>(GetReg32(system, 2)); | 1798 | max_sessions = Convert<int32_t>(GetReg32(system, 2)); |
| 1799 | 1799 | ||
| 1800 | ret = ManageNamedPort64From32(system, &out_server_handle, name, max_sessions); | 1800 | ret = ManageNamedPort64From32(system, std::addressof(out_server_handle), name, max_sessions); |
| 1801 | 1801 | ||
| 1802 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1802 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1803 | SetReg32(system, 1, Convert<uint32_t>(out_server_handle)); | 1803 | SetReg32(system, 1, Convert<uint32_t>(out_server_handle)); |
| @@ -1811,7 +1811,7 @@ static void SvcWrap_ConnectToPort64From32(Core::System& system) { | |||
| 1811 | 1811 | ||
| 1812 | port = Convert<Handle>(GetReg32(system, 1)); | 1812 | port = Convert<Handle>(GetReg32(system, 1)); |
| 1813 | 1813 | ||
| 1814 | ret = ConnectToPort64From32(system, &out_handle, port); | 1814 | ret = ConnectToPort64From32(system, std::addressof(out_handle), port); |
| 1815 | 1815 | ||
| 1816 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1816 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1817 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 1817 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -1898,7 +1898,7 @@ static void SvcWrap_QueryProcessMemory64From32(Core::System& system) { | |||
| 1898 | address_gather[1] = GetReg32(system, 3); | 1898 | address_gather[1] = GetReg32(system, 3); |
| 1899 | address = Convert<uint64_t>(address_gather); | 1899 | address = Convert<uint64_t>(address_gather); |
| 1900 | 1900 | ||
| 1901 | ret = QueryProcessMemory64From32(system, out_memory_info, &out_page_info, process_handle, address); | 1901 | ret = QueryProcessMemory64From32(system, out_memory_info, std::addressof(out_page_info), process_handle, address); |
| 1902 | 1902 | ||
| 1903 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1903 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1904 | SetReg32(system, 1, Convert<uint32_t>(out_page_info)); | 1904 | SetReg32(system, 1, Convert<uint32_t>(out_page_info)); |
| @@ -1970,7 +1970,7 @@ static void SvcWrap_CreateProcess64From32(Core::System& system) { | |||
| 1970 | caps = Convert<uint32_t>(GetReg32(system, 2)); | 1970 | caps = Convert<uint32_t>(GetReg32(system, 2)); |
| 1971 | num_caps = Convert<int32_t>(GetReg32(system, 3)); | 1971 | num_caps = Convert<int32_t>(GetReg32(system, 3)); |
| 1972 | 1972 | ||
| 1973 | ret = CreateProcess64From32(system, &out_handle, parameters, caps, num_caps); | 1973 | ret = CreateProcess64From32(system, std::addressof(out_handle), parameters, caps, num_caps); |
| 1974 | 1974 | ||
| 1975 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 1975 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 1976 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 1976 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -2019,7 +2019,7 @@ static void SvcWrap_GetProcessInfo64From32(Core::System& system) { | |||
| 2019 | process_handle = Convert<Handle>(GetReg32(system, 1)); | 2019 | process_handle = Convert<Handle>(GetReg32(system, 1)); |
| 2020 | info_type = Convert<ProcessInfoType>(GetReg32(system, 2)); | 2020 | info_type = Convert<ProcessInfoType>(GetReg32(system, 2)); |
| 2021 | 2021 | ||
| 2022 | ret = GetProcessInfo64From32(system, &out_info, process_handle, info_type); | 2022 | ret = GetProcessInfo64From32(system, std::addressof(out_info), process_handle, info_type); |
| 2023 | 2023 | ||
| 2024 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 2024 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 2025 | auto out_info_scatter = Convert<std::array<uint32_t, 2>>(out_info); | 2025 | auto out_info_scatter = Convert<std::array<uint32_t, 2>>(out_info); |
| @@ -2032,7 +2032,7 @@ static void SvcWrap_CreateResourceLimit64From32(Core::System& system) { | |||
| 2032 | 2032 | ||
| 2033 | Handle out_handle{}; | 2033 | Handle out_handle{}; |
| 2034 | 2034 | ||
| 2035 | ret = CreateResourceLimit64From32(system, &out_handle); | 2035 | ret = CreateResourceLimit64From32(system, std::addressof(out_handle)); |
| 2036 | 2036 | ||
| 2037 | SetReg32(system, 0, Convert<uint32_t>(ret)); | 2037 | SetReg32(system, 0, Convert<uint32_t>(ret)); |
| 2038 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); | 2038 | SetReg32(system, 1, Convert<uint32_t>(out_handle)); |
| @@ -2093,7 +2093,7 @@ static void SvcWrap_SetHeapSize64(Core::System& system) { | |||
| 2093 | 2093 | ||
| 2094 | size = Convert<uint64_t>(GetReg64(system, 1)); | 2094 | size = Convert<uint64_t>(GetReg64(system, 1)); |
| 2095 | 2095 | ||
| 2096 | ret = SetHeapSize64(system, &out_address, size); | 2096 | ret = SetHeapSize64(system, std::addressof(out_address), size); |
| 2097 | 2097 | ||
| 2098 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2098 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2099 | SetReg64(system, 1, Convert<uint64_t>(out_address)); | 2099 | SetReg64(system, 1, Convert<uint64_t>(out_address)); |
| @@ -2175,7 +2175,7 @@ static void SvcWrap_QueryMemory64(Core::System& system) { | |||
| 2175 | out_memory_info = Convert<uint64_t>(GetReg64(system, 0)); | 2175 | out_memory_info = Convert<uint64_t>(GetReg64(system, 0)); |
| 2176 | address = Convert<uint64_t>(GetReg64(system, 2)); | 2176 | address = Convert<uint64_t>(GetReg64(system, 2)); |
| 2177 | 2177 | ||
| 2178 | ret = QueryMemory64(system, out_memory_info, &out_page_info, address); | 2178 | ret = QueryMemory64(system, out_memory_info, std::addressof(out_page_info), address); |
| 2179 | 2179 | ||
| 2180 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2180 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2181 | SetReg64(system, 1, Convert<uint64_t>(out_page_info)); | 2181 | SetReg64(system, 1, Convert<uint64_t>(out_page_info)); |
| @@ -2201,7 +2201,7 @@ static void SvcWrap_CreateThread64(Core::System& system) { | |||
| 2201 | priority = Convert<int32_t>(GetReg64(system, 4)); | 2201 | priority = Convert<int32_t>(GetReg64(system, 4)); |
| 2202 | core_id = Convert<int32_t>(GetReg64(system, 5)); | 2202 | core_id = Convert<int32_t>(GetReg64(system, 5)); |
| 2203 | 2203 | ||
| 2204 | ret = CreateThread64(system, &out_handle, func, arg, stack_bottom, priority, core_id); | 2204 | ret = CreateThread64(system, std::addressof(out_handle), func, arg, stack_bottom, priority, core_id); |
| 2205 | 2205 | ||
| 2206 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2206 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2207 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 2207 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -2239,7 +2239,7 @@ static void SvcWrap_GetThreadPriority64(Core::System& system) { | |||
| 2239 | 2239 | ||
| 2240 | thread_handle = Convert<Handle>(GetReg64(system, 1)); | 2240 | thread_handle = Convert<Handle>(GetReg64(system, 1)); |
| 2241 | 2241 | ||
| 2242 | ret = GetThreadPriority64(system, &out_priority, thread_handle); | 2242 | ret = GetThreadPriority64(system, std::addressof(out_priority), thread_handle); |
| 2243 | 2243 | ||
| 2244 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2244 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2245 | SetReg64(system, 1, Convert<uint64_t>(out_priority)); | 2245 | SetReg64(system, 1, Convert<uint64_t>(out_priority)); |
| @@ -2268,7 +2268,7 @@ static void SvcWrap_GetThreadCoreMask64(Core::System& system) { | |||
| 2268 | 2268 | ||
| 2269 | thread_handle = Convert<Handle>(GetReg64(system, 2)); | 2269 | thread_handle = Convert<Handle>(GetReg64(system, 2)); |
| 2270 | 2270 | ||
| 2271 | ret = GetThreadCoreMask64(system, &out_core_id, &out_affinity_mask, thread_handle); | 2271 | ret = GetThreadCoreMask64(system, std::addressof(out_core_id), std::addressof(out_affinity_mask), thread_handle); |
| 2272 | 2272 | ||
| 2273 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2273 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2274 | SetReg64(system, 1, Convert<uint64_t>(out_core_id)); | 2274 | SetReg64(system, 1, Convert<uint64_t>(out_core_id)); |
| @@ -2369,7 +2369,7 @@ static void SvcWrap_CreateTransferMemory64(Core::System& system) { | |||
| 2369 | size = Convert<uint64_t>(GetReg64(system, 2)); | 2369 | size = Convert<uint64_t>(GetReg64(system, 2)); |
| 2370 | map_perm = Convert<MemoryPermission>(GetReg64(system, 3)); | 2370 | map_perm = Convert<MemoryPermission>(GetReg64(system, 3)); |
| 2371 | 2371 | ||
| 2372 | ret = CreateTransferMemory64(system, &out_handle, address, size, map_perm); | 2372 | ret = CreateTransferMemory64(system, std::addressof(out_handle), address, size, map_perm); |
| 2373 | 2373 | ||
| 2374 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2374 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2375 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 2375 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -2411,7 +2411,7 @@ static void SvcWrap_WaitSynchronization64(Core::System& system) { | |||
| 2411 | num_handles = Convert<int32_t>(GetReg64(system, 2)); | 2411 | num_handles = Convert<int32_t>(GetReg64(system, 2)); |
| 2412 | timeout_ns = Convert<int64_t>(GetReg64(system, 3)); | 2412 | timeout_ns = Convert<int64_t>(GetReg64(system, 3)); |
| 2413 | 2413 | ||
| 2414 | ret = WaitSynchronization64(system, &out_index, handles, num_handles, timeout_ns); | 2414 | ret = WaitSynchronization64(system, std::addressof(out_index), handles, num_handles, timeout_ns); |
| 2415 | 2415 | ||
| 2416 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2416 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2417 | SetReg64(system, 1, Convert<uint64_t>(out_index)); | 2417 | SetReg64(system, 1, Convert<uint64_t>(out_index)); |
| @@ -2501,7 +2501,7 @@ static void SvcWrap_ConnectToNamedPort64(Core::System& system) { | |||
| 2501 | 2501 | ||
| 2502 | name = Convert<uint64_t>(GetReg64(system, 1)); | 2502 | name = Convert<uint64_t>(GetReg64(system, 1)); |
| 2503 | 2503 | ||
| 2504 | ret = ConnectToNamedPort64(system, &out_handle, name); | 2504 | ret = ConnectToNamedPort64(system, std::addressof(out_handle), name); |
| 2505 | 2505 | ||
| 2506 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2506 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2507 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 2507 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -2547,7 +2547,7 @@ static void SvcWrap_SendAsyncRequestWithUserBuffer64(Core::System& system) { | |||
| 2547 | message_buffer_size = Convert<uint64_t>(GetReg64(system, 2)); | 2547 | message_buffer_size = Convert<uint64_t>(GetReg64(system, 2)); |
| 2548 | session_handle = Convert<Handle>(GetReg64(system, 3)); | 2548 | session_handle = Convert<Handle>(GetReg64(system, 3)); |
| 2549 | 2549 | ||
| 2550 | ret = SendAsyncRequestWithUserBuffer64(system, &out_event_handle, message_buffer, message_buffer_size, session_handle); | 2550 | ret = SendAsyncRequestWithUserBuffer64(system, std::addressof(out_event_handle), message_buffer, message_buffer_size, session_handle); |
| 2551 | 2551 | ||
| 2552 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2552 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2553 | SetReg64(system, 1, Convert<uint64_t>(out_event_handle)); | 2553 | SetReg64(system, 1, Convert<uint64_t>(out_event_handle)); |
| @@ -2561,7 +2561,7 @@ static void SvcWrap_GetProcessId64(Core::System& system) { | |||
| 2561 | 2561 | ||
| 2562 | process_handle = Convert<Handle>(GetReg64(system, 1)); | 2562 | process_handle = Convert<Handle>(GetReg64(system, 1)); |
| 2563 | 2563 | ||
| 2564 | ret = GetProcessId64(system, &out_process_id, process_handle); | 2564 | ret = GetProcessId64(system, std::addressof(out_process_id), process_handle); |
| 2565 | 2565 | ||
| 2566 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2566 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2567 | SetReg64(system, 1, Convert<uint64_t>(out_process_id)); | 2567 | SetReg64(system, 1, Convert<uint64_t>(out_process_id)); |
| @@ -2575,7 +2575,7 @@ static void SvcWrap_GetThreadId64(Core::System& system) { | |||
| 2575 | 2575 | ||
| 2576 | thread_handle = Convert<Handle>(GetReg64(system, 1)); | 2576 | thread_handle = Convert<Handle>(GetReg64(system, 1)); |
| 2577 | 2577 | ||
| 2578 | ret = GetThreadId64(system, &out_thread_id, thread_handle); | 2578 | ret = GetThreadId64(system, std::addressof(out_thread_id), thread_handle); |
| 2579 | 2579 | ||
| 2580 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2580 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2581 | SetReg64(system, 1, Convert<uint64_t>(out_thread_id)); | 2581 | SetReg64(system, 1, Convert<uint64_t>(out_thread_id)); |
| @@ -2627,7 +2627,7 @@ static void SvcWrap_GetInfo64(Core::System& system) { | |||
| 2627 | handle = Convert<Handle>(GetReg64(system, 2)); | 2627 | handle = Convert<Handle>(GetReg64(system, 2)); |
| 2628 | info_subtype = Convert<uint64_t>(GetReg64(system, 3)); | 2628 | info_subtype = Convert<uint64_t>(GetReg64(system, 3)); |
| 2629 | 2629 | ||
| 2630 | ret = GetInfo64(system, &out, info_type, handle, info_subtype); | 2630 | ret = GetInfo64(system, std::addressof(out), info_type, handle, info_subtype); |
| 2631 | 2631 | ||
| 2632 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2632 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2633 | SetReg64(system, 1, Convert<uint64_t>(out)); | 2633 | SetReg64(system, 1, Convert<uint64_t>(out)); |
| @@ -2690,7 +2690,7 @@ static void SvcWrap_GetDebugFutureThreadInfo64(Core::System& system) { | |||
| 2690 | debug_handle = Convert<Handle>(GetReg64(system, 2)); | 2690 | debug_handle = Convert<Handle>(GetReg64(system, 2)); |
| 2691 | ns = Convert<int64_t>(GetReg64(system, 3)); | 2691 | ns = Convert<int64_t>(GetReg64(system, 3)); |
| 2692 | 2692 | ||
| 2693 | ret = GetDebugFutureThreadInfo64(system, &out_context, &out_thread_id, debug_handle, ns); | 2693 | ret = GetDebugFutureThreadInfo64(system, std::addressof(out_context), std::addressof(out_thread_id), debug_handle, ns); |
| 2694 | 2694 | ||
| 2695 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2695 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2696 | auto out_context_scatter = Convert<std::array<uint64_t, 4>>(out_context); | 2696 | auto out_context_scatter = Convert<std::array<uint64_t, 4>>(out_context); |
| @@ -2708,7 +2708,7 @@ static void SvcWrap_GetLastThreadInfo64(Core::System& system) { | |||
| 2708 | uint64_t out_tls_address{}; | 2708 | uint64_t out_tls_address{}; |
| 2709 | uint32_t out_flags{}; | 2709 | uint32_t out_flags{}; |
| 2710 | 2710 | ||
| 2711 | ret = GetLastThreadInfo64(system, &out_context, &out_tls_address, &out_flags); | 2711 | ret = GetLastThreadInfo64(system, std::addressof(out_context), std::addressof(out_tls_address), std::addressof(out_flags)); |
| 2712 | 2712 | ||
| 2713 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2713 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2714 | auto out_context_scatter = Convert<std::array<uint64_t, 4>>(out_context); | 2714 | auto out_context_scatter = Convert<std::array<uint64_t, 4>>(out_context); |
| @@ -2730,7 +2730,7 @@ static void SvcWrap_GetResourceLimitLimitValue64(Core::System& system) { | |||
| 2730 | resource_limit_handle = Convert<Handle>(GetReg64(system, 1)); | 2730 | resource_limit_handle = Convert<Handle>(GetReg64(system, 1)); |
| 2731 | which = Convert<LimitableResource>(GetReg64(system, 2)); | 2731 | which = Convert<LimitableResource>(GetReg64(system, 2)); |
| 2732 | 2732 | ||
| 2733 | ret = GetResourceLimitLimitValue64(system, &out_limit_value, resource_limit_handle, which); | 2733 | ret = GetResourceLimitLimitValue64(system, std::addressof(out_limit_value), resource_limit_handle, which); |
| 2734 | 2734 | ||
| 2735 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2735 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2736 | SetReg64(system, 1, Convert<uint64_t>(out_limit_value)); | 2736 | SetReg64(system, 1, Convert<uint64_t>(out_limit_value)); |
| @@ -2746,7 +2746,7 @@ static void SvcWrap_GetResourceLimitCurrentValue64(Core::System& system) { | |||
| 2746 | resource_limit_handle = Convert<Handle>(GetReg64(system, 1)); | 2746 | resource_limit_handle = Convert<Handle>(GetReg64(system, 1)); |
| 2747 | which = Convert<LimitableResource>(GetReg64(system, 2)); | 2747 | which = Convert<LimitableResource>(GetReg64(system, 2)); |
| 2748 | 2748 | ||
| 2749 | ret = GetResourceLimitCurrentValue64(system, &out_current_value, resource_limit_handle, which); | 2749 | ret = GetResourceLimitCurrentValue64(system, std::addressof(out_current_value), resource_limit_handle, which); |
| 2750 | 2750 | ||
| 2751 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2751 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2752 | SetReg64(system, 1, Convert<uint64_t>(out_current_value)); | 2752 | SetReg64(system, 1, Convert<uint64_t>(out_current_value)); |
| @@ -2830,7 +2830,7 @@ static void SvcWrap_GetResourceLimitPeakValue64(Core::System& system) { | |||
| 2830 | resource_limit_handle = Convert<Handle>(GetReg64(system, 1)); | 2830 | resource_limit_handle = Convert<Handle>(GetReg64(system, 1)); |
| 2831 | which = Convert<LimitableResource>(GetReg64(system, 2)); | 2831 | which = Convert<LimitableResource>(GetReg64(system, 2)); |
| 2832 | 2832 | ||
| 2833 | ret = GetResourceLimitPeakValue64(system, &out_peak_value, resource_limit_handle, which); | 2833 | ret = GetResourceLimitPeakValue64(system, std::addressof(out_peak_value), resource_limit_handle, which); |
| 2834 | 2834 | ||
| 2835 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2835 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2836 | SetReg64(system, 1, Convert<uint64_t>(out_peak_value)); | 2836 | SetReg64(system, 1, Convert<uint64_t>(out_peak_value)); |
| @@ -2844,7 +2844,7 @@ static void SvcWrap_CreateIoPool64(Core::System& system) { | |||
| 2844 | 2844 | ||
| 2845 | which = Convert<IoPoolType>(GetReg64(system, 1)); | 2845 | which = Convert<IoPoolType>(GetReg64(system, 1)); |
| 2846 | 2846 | ||
| 2847 | ret = CreateIoPool64(system, &out_handle, which); | 2847 | ret = CreateIoPool64(system, std::addressof(out_handle), which); |
| 2848 | 2848 | ||
| 2849 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2849 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2850 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 2850 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -2866,7 +2866,7 @@ static void SvcWrap_CreateIoRegion64(Core::System& system) { | |||
| 2866 | mapping = Convert<MemoryMapping>(GetReg64(system, 4)); | 2866 | mapping = Convert<MemoryMapping>(GetReg64(system, 4)); |
| 2867 | perm = Convert<MemoryPermission>(GetReg64(system, 5)); | 2867 | perm = Convert<MemoryPermission>(GetReg64(system, 5)); |
| 2868 | 2868 | ||
| 2869 | ret = CreateIoRegion64(system, &out_handle, io_pool, physical_address, size, mapping, perm); | 2869 | ret = CreateIoRegion64(system, std::addressof(out_handle), io_pool, physical_address, size, mapping, perm); |
| 2870 | 2870 | ||
| 2871 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2871 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2872 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 2872 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -2905,7 +2905,7 @@ static void SvcWrap_CreateSession64(Core::System& system) { | |||
| 2905 | is_light = Convert<bool>(GetReg64(system, 2)); | 2905 | is_light = Convert<bool>(GetReg64(system, 2)); |
| 2906 | name = Convert<uint64_t>(GetReg64(system, 3)); | 2906 | name = Convert<uint64_t>(GetReg64(system, 3)); |
| 2907 | 2907 | ||
| 2908 | ret = CreateSession64(system, &out_server_session_handle, &out_client_session_handle, is_light, name); | 2908 | ret = CreateSession64(system, std::addressof(out_server_session_handle), std::addressof(out_client_session_handle), is_light, name); |
| 2909 | 2909 | ||
| 2910 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2910 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2911 | SetReg64(system, 1, Convert<uint64_t>(out_server_session_handle)); | 2911 | SetReg64(system, 1, Convert<uint64_t>(out_server_session_handle)); |
| @@ -2920,7 +2920,7 @@ static void SvcWrap_AcceptSession64(Core::System& system) { | |||
| 2920 | 2920 | ||
| 2921 | port = Convert<Handle>(GetReg64(system, 1)); | 2921 | port = Convert<Handle>(GetReg64(system, 1)); |
| 2922 | 2922 | ||
| 2923 | ret = AcceptSession64(system, &out_handle, port); | 2923 | ret = AcceptSession64(system, std::addressof(out_handle), port); |
| 2924 | 2924 | ||
| 2925 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2925 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2926 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 2926 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -2940,7 +2940,7 @@ static void SvcWrap_ReplyAndReceive64(Core::System& system) { | |||
| 2940 | reply_target = Convert<Handle>(GetReg64(system, 3)); | 2940 | reply_target = Convert<Handle>(GetReg64(system, 3)); |
| 2941 | timeout_ns = Convert<int64_t>(GetReg64(system, 4)); | 2941 | timeout_ns = Convert<int64_t>(GetReg64(system, 4)); |
| 2942 | 2942 | ||
| 2943 | ret = ReplyAndReceive64(system, &out_index, handles, num_handles, reply_target, timeout_ns); | 2943 | ret = ReplyAndReceive64(system, std::addressof(out_index), handles, num_handles, reply_target, timeout_ns); |
| 2944 | 2944 | ||
| 2945 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2945 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2946 | SetReg64(system, 1, Convert<uint64_t>(out_index)); | 2946 | SetReg64(system, 1, Convert<uint64_t>(out_index)); |
| @@ -2964,7 +2964,7 @@ static void SvcWrap_ReplyAndReceiveWithUserBuffer64(Core::System& system) { | |||
| 2964 | reply_target = Convert<Handle>(GetReg64(system, 5)); | 2964 | reply_target = Convert<Handle>(GetReg64(system, 5)); |
| 2965 | timeout_ns = Convert<int64_t>(GetReg64(system, 6)); | 2965 | timeout_ns = Convert<int64_t>(GetReg64(system, 6)); |
| 2966 | 2966 | ||
| 2967 | ret = ReplyAndReceiveWithUserBuffer64(system, &out_index, message_buffer, message_buffer_size, handles, num_handles, reply_target, timeout_ns); | 2967 | ret = ReplyAndReceiveWithUserBuffer64(system, std::addressof(out_index), message_buffer, message_buffer_size, handles, num_handles, reply_target, timeout_ns); |
| 2968 | 2968 | ||
| 2969 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2969 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2970 | SetReg64(system, 1, Convert<uint64_t>(out_index)); | 2970 | SetReg64(system, 1, Convert<uint64_t>(out_index)); |
| @@ -2976,7 +2976,7 @@ static void SvcWrap_CreateEvent64(Core::System& system) { | |||
| 2976 | Handle out_write_handle{}; | 2976 | Handle out_write_handle{}; |
| 2977 | Handle out_read_handle{}; | 2977 | Handle out_read_handle{}; |
| 2978 | 2978 | ||
| 2979 | ret = CreateEvent64(system, &out_write_handle, &out_read_handle); | 2979 | ret = CreateEvent64(system, std::addressof(out_write_handle), std::addressof(out_read_handle)); |
| 2980 | 2980 | ||
| 2981 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 2981 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 2982 | SetReg64(system, 1, Convert<uint64_t>(out_write_handle)); | 2982 | SetReg64(system, 1, Convert<uint64_t>(out_write_handle)); |
| @@ -3067,7 +3067,7 @@ static void SvcWrap_CreateCodeMemory64(Core::System& system) { | |||
| 3067 | address = Convert<uint64_t>(GetReg64(system, 1)); | 3067 | address = Convert<uint64_t>(GetReg64(system, 1)); |
| 3068 | size = Convert<uint64_t>(GetReg64(system, 2)); | 3068 | size = Convert<uint64_t>(GetReg64(system, 2)); |
| 3069 | 3069 | ||
| 3070 | ret = CreateCodeMemory64(system, &out_handle, address, size); | 3070 | ret = CreateCodeMemory64(system, std::addressof(out_handle), address, size); |
| 3071 | 3071 | ||
| 3072 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3072 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3073 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 3073 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -3109,7 +3109,7 @@ static void SvcWrap_ReadWriteRegister64(Core::System& system) { | |||
| 3109 | mask = Convert<uint32_t>(GetReg64(system, 2)); | 3109 | mask = Convert<uint32_t>(GetReg64(system, 2)); |
| 3110 | value = Convert<uint32_t>(GetReg64(system, 3)); | 3110 | value = Convert<uint32_t>(GetReg64(system, 3)); |
| 3111 | 3111 | ||
| 3112 | ret = ReadWriteRegister64(system, &out_value, address, mask, value); | 3112 | ret = ReadWriteRegister64(system, std::addressof(out_value), address, mask, value); |
| 3113 | 3113 | ||
| 3114 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3114 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3115 | SetReg64(system, 1, Convert<uint64_t>(out_value)); | 3115 | SetReg64(system, 1, Convert<uint64_t>(out_value)); |
| @@ -3141,7 +3141,7 @@ static void SvcWrap_CreateSharedMemory64(Core::System& system) { | |||
| 3141 | owner_perm = Convert<MemoryPermission>(GetReg64(system, 2)); | 3141 | owner_perm = Convert<MemoryPermission>(GetReg64(system, 2)); |
| 3142 | remote_perm = Convert<MemoryPermission>(GetReg64(system, 3)); | 3142 | remote_perm = Convert<MemoryPermission>(GetReg64(system, 3)); |
| 3143 | 3143 | ||
| 3144 | ret = CreateSharedMemory64(system, &out_handle, size, owner_perm, remote_perm); | 3144 | ret = CreateSharedMemory64(system, std::addressof(out_handle), size, owner_perm, remote_perm); |
| 3145 | 3145 | ||
| 3146 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3146 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3147 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 3147 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -3191,7 +3191,7 @@ static void SvcWrap_CreateInterruptEvent64(Core::System& system) { | |||
| 3191 | interrupt_id = Convert<int32_t>(GetReg64(system, 1)); | 3191 | interrupt_id = Convert<int32_t>(GetReg64(system, 1)); |
| 3192 | interrupt_type = Convert<InterruptType>(GetReg64(system, 2)); | 3192 | interrupt_type = Convert<InterruptType>(GetReg64(system, 2)); |
| 3193 | 3193 | ||
| 3194 | ret = CreateInterruptEvent64(system, &out_read_handle, interrupt_id, interrupt_type); | 3194 | ret = CreateInterruptEvent64(system, std::addressof(out_read_handle), interrupt_id, interrupt_type); |
| 3195 | 3195 | ||
| 3196 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3196 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3197 | SetReg64(system, 1, Convert<uint64_t>(out_read_handle)); | 3197 | SetReg64(system, 1, Convert<uint64_t>(out_read_handle)); |
| @@ -3205,7 +3205,7 @@ static void SvcWrap_QueryPhysicalAddress64(Core::System& system) { | |||
| 3205 | 3205 | ||
| 3206 | address = Convert<uint64_t>(GetReg64(system, 1)); | 3206 | address = Convert<uint64_t>(GetReg64(system, 1)); |
| 3207 | 3207 | ||
| 3208 | ret = QueryPhysicalAddress64(system, &out_info, address); | 3208 | ret = QueryPhysicalAddress64(system, std::addressof(out_info), address); |
| 3209 | 3209 | ||
| 3210 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3210 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3211 | auto out_info_scatter = Convert<std::array<uint64_t, 3>>(out_info); | 3211 | auto out_info_scatter = Convert<std::array<uint64_t, 3>>(out_info); |
| @@ -3225,7 +3225,7 @@ static void SvcWrap_QueryIoMapping64(Core::System& system) { | |||
| 3225 | physical_address = Convert<uint64_t>(GetReg64(system, 2)); | 3225 | physical_address = Convert<uint64_t>(GetReg64(system, 2)); |
| 3226 | size = Convert<uint64_t>(GetReg64(system, 3)); | 3226 | size = Convert<uint64_t>(GetReg64(system, 3)); |
| 3227 | 3227 | ||
| 3228 | ret = QueryIoMapping64(system, &out_address, &out_size, physical_address, size); | 3228 | ret = QueryIoMapping64(system, std::addressof(out_address), std::addressof(out_size), physical_address, size); |
| 3229 | 3229 | ||
| 3230 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3230 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3231 | SetReg64(system, 1, Convert<uint64_t>(out_address)); | 3231 | SetReg64(system, 1, Convert<uint64_t>(out_address)); |
| @@ -3242,7 +3242,7 @@ static void SvcWrap_CreateDeviceAddressSpace64(Core::System& system) { | |||
| 3242 | das_address = Convert<uint64_t>(GetReg64(system, 1)); | 3242 | das_address = Convert<uint64_t>(GetReg64(system, 1)); |
| 3243 | das_size = Convert<uint64_t>(GetReg64(system, 2)); | 3243 | das_size = Convert<uint64_t>(GetReg64(system, 2)); |
| 3244 | 3244 | ||
| 3245 | ret = CreateDeviceAddressSpace64(system, &out_handle, das_address, das_size); | 3245 | ret = CreateDeviceAddressSpace64(system, std::addressof(out_handle), das_address, das_size); |
| 3246 | 3246 | ||
| 3247 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3247 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3248 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 3248 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -3396,7 +3396,7 @@ static void SvcWrap_DebugActiveProcess64(Core::System& system) { | |||
| 3396 | 3396 | ||
| 3397 | process_id = Convert<uint64_t>(GetReg64(system, 1)); | 3397 | process_id = Convert<uint64_t>(GetReg64(system, 1)); |
| 3398 | 3398 | ||
| 3399 | ret = DebugActiveProcess64(system, &out_handle, process_id); | 3399 | ret = DebugActiveProcess64(system, std::addressof(out_handle), process_id); |
| 3400 | 3400 | ||
| 3401 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3401 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3402 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 3402 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -3468,7 +3468,7 @@ static void SvcWrap_GetProcessList64(Core::System& system) { | |||
| 3468 | out_process_ids = Convert<uint64_t>(GetReg64(system, 1)); | 3468 | out_process_ids = Convert<uint64_t>(GetReg64(system, 1)); |
| 3469 | max_out_count = Convert<int32_t>(GetReg64(system, 2)); | 3469 | max_out_count = Convert<int32_t>(GetReg64(system, 2)); |
| 3470 | 3470 | ||
| 3471 | ret = GetProcessList64(system, &out_num_processes, out_process_ids, max_out_count); | 3471 | ret = GetProcessList64(system, std::addressof(out_num_processes), out_process_ids, max_out_count); |
| 3472 | 3472 | ||
| 3473 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3473 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3474 | SetReg64(system, 1, Convert<uint64_t>(out_num_processes)); | 3474 | SetReg64(system, 1, Convert<uint64_t>(out_num_processes)); |
| @@ -3486,7 +3486,7 @@ static void SvcWrap_GetThreadList64(Core::System& system) { | |||
| 3486 | max_out_count = Convert<int32_t>(GetReg64(system, 2)); | 3486 | max_out_count = Convert<int32_t>(GetReg64(system, 2)); |
| 3487 | debug_handle = Convert<Handle>(GetReg64(system, 3)); | 3487 | debug_handle = Convert<Handle>(GetReg64(system, 3)); |
| 3488 | 3488 | ||
| 3489 | ret = GetThreadList64(system, &out_num_threads, out_thread_ids, max_out_count, debug_handle); | 3489 | ret = GetThreadList64(system, std::addressof(out_num_threads), out_thread_ids, max_out_count, debug_handle); |
| 3490 | 3490 | ||
| 3491 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3491 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3492 | SetReg64(system, 1, Convert<uint64_t>(out_num_threads)); | 3492 | SetReg64(system, 1, Convert<uint64_t>(out_num_threads)); |
| @@ -3540,7 +3540,7 @@ static void SvcWrap_QueryDebugProcessMemory64(Core::System& system) { | |||
| 3540 | process_handle = Convert<Handle>(GetReg64(system, 2)); | 3540 | process_handle = Convert<Handle>(GetReg64(system, 2)); |
| 3541 | address = Convert<uint64_t>(GetReg64(system, 3)); | 3541 | address = Convert<uint64_t>(GetReg64(system, 3)); |
| 3542 | 3542 | ||
| 3543 | ret = QueryDebugProcessMemory64(system, out_memory_info, &out_page_info, process_handle, address); | 3543 | ret = QueryDebugProcessMemory64(system, out_memory_info, std::addressof(out_page_info), process_handle, address); |
| 3544 | 3544 | ||
| 3545 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3545 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3546 | SetReg64(system, 1, Convert<uint64_t>(out_page_info)); | 3546 | SetReg64(system, 1, Convert<uint64_t>(out_page_info)); |
| @@ -3611,7 +3611,7 @@ static void SvcWrap_GetDebugThreadParam64(Core::System& system) { | |||
| 3611 | thread_id = Convert<uint64_t>(GetReg64(system, 3)); | 3611 | thread_id = Convert<uint64_t>(GetReg64(system, 3)); |
| 3612 | param = Convert<DebugThreadParam>(GetReg64(system, 4)); | 3612 | param = Convert<DebugThreadParam>(GetReg64(system, 4)); |
| 3613 | 3613 | ||
| 3614 | ret = GetDebugThreadParam64(system, &out_64, &out_32, debug_handle, thread_id, param); | 3614 | ret = GetDebugThreadParam64(system, std::addressof(out_64), std::addressof(out_32), debug_handle, thread_id, param); |
| 3615 | 3615 | ||
| 3616 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3616 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3617 | SetReg64(system, 1, Convert<uint64_t>(out_64)); | 3617 | SetReg64(system, 1, Convert<uint64_t>(out_64)); |
| @@ -3630,7 +3630,7 @@ static void SvcWrap_GetSystemInfo64(Core::System& system) { | |||
| 3630 | handle = Convert<Handle>(GetReg64(system, 2)); | 3630 | handle = Convert<Handle>(GetReg64(system, 2)); |
| 3631 | info_subtype = Convert<uint64_t>(GetReg64(system, 3)); | 3631 | info_subtype = Convert<uint64_t>(GetReg64(system, 3)); |
| 3632 | 3632 | ||
| 3633 | ret = GetSystemInfo64(system, &out, info_type, handle, info_subtype); | 3633 | ret = GetSystemInfo64(system, std::addressof(out), info_type, handle, info_subtype); |
| 3634 | 3634 | ||
| 3635 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3635 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3636 | SetReg64(system, 1, Convert<uint64_t>(out)); | 3636 | SetReg64(system, 1, Convert<uint64_t>(out)); |
| @@ -3649,7 +3649,7 @@ static void SvcWrap_CreatePort64(Core::System& system) { | |||
| 3649 | is_light = Convert<bool>(GetReg64(system, 3)); | 3649 | is_light = Convert<bool>(GetReg64(system, 3)); |
| 3650 | name = Convert<uint64_t>(GetReg64(system, 4)); | 3650 | name = Convert<uint64_t>(GetReg64(system, 4)); |
| 3651 | 3651 | ||
| 3652 | ret = CreatePort64(system, &out_server_handle, &out_client_handle, max_sessions, is_light, name); | 3652 | ret = CreatePort64(system, std::addressof(out_server_handle), std::addressof(out_client_handle), max_sessions, is_light, name); |
| 3653 | 3653 | ||
| 3654 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3654 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3655 | SetReg64(system, 1, Convert<uint64_t>(out_server_handle)); | 3655 | SetReg64(system, 1, Convert<uint64_t>(out_server_handle)); |
| @@ -3666,7 +3666,7 @@ static void SvcWrap_ManageNamedPort64(Core::System& system) { | |||
| 3666 | name = Convert<uint64_t>(GetReg64(system, 1)); | 3666 | name = Convert<uint64_t>(GetReg64(system, 1)); |
| 3667 | max_sessions = Convert<int32_t>(GetReg64(system, 2)); | 3667 | max_sessions = Convert<int32_t>(GetReg64(system, 2)); |
| 3668 | 3668 | ||
| 3669 | ret = ManageNamedPort64(system, &out_server_handle, name, max_sessions); | 3669 | ret = ManageNamedPort64(system, std::addressof(out_server_handle), name, max_sessions); |
| 3670 | 3670 | ||
| 3671 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3671 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3672 | SetReg64(system, 1, Convert<uint64_t>(out_server_handle)); | 3672 | SetReg64(system, 1, Convert<uint64_t>(out_server_handle)); |
| @@ -3680,7 +3680,7 @@ static void SvcWrap_ConnectToPort64(Core::System& system) { | |||
| 3680 | 3680 | ||
| 3681 | port = Convert<Handle>(GetReg64(system, 1)); | 3681 | port = Convert<Handle>(GetReg64(system, 1)); |
| 3682 | 3682 | ||
| 3683 | ret = ConnectToPort64(system, &out_handle, port); | 3683 | ret = ConnectToPort64(system, std::addressof(out_handle), port); |
| 3684 | 3684 | ||
| 3685 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3685 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3686 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 3686 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -3752,7 +3752,7 @@ static void SvcWrap_QueryProcessMemory64(Core::System& system) { | |||
| 3752 | process_handle = Convert<Handle>(GetReg64(system, 2)); | 3752 | process_handle = Convert<Handle>(GetReg64(system, 2)); |
| 3753 | address = Convert<uint64_t>(GetReg64(system, 3)); | 3753 | address = Convert<uint64_t>(GetReg64(system, 3)); |
| 3754 | 3754 | ||
| 3755 | ret = QueryProcessMemory64(system, out_memory_info, &out_page_info, process_handle, address); | 3755 | ret = QueryProcessMemory64(system, out_memory_info, std::addressof(out_page_info), process_handle, address); |
| 3756 | 3756 | ||
| 3757 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3757 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3758 | SetReg64(system, 1, Convert<uint64_t>(out_page_info)); | 3758 | SetReg64(system, 1, Convert<uint64_t>(out_page_info)); |
| @@ -3806,7 +3806,7 @@ static void SvcWrap_CreateProcess64(Core::System& system) { | |||
| 3806 | caps = Convert<uint64_t>(GetReg64(system, 2)); | 3806 | caps = Convert<uint64_t>(GetReg64(system, 2)); |
| 3807 | num_caps = Convert<int32_t>(GetReg64(system, 3)); | 3807 | num_caps = Convert<int32_t>(GetReg64(system, 3)); |
| 3808 | 3808 | ||
| 3809 | ret = CreateProcess64(system, &out_handle, parameters, caps, num_caps); | 3809 | ret = CreateProcess64(system, std::addressof(out_handle), parameters, caps, num_caps); |
| 3810 | 3810 | ||
| 3811 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3811 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3812 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 3812 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
| @@ -3852,7 +3852,7 @@ static void SvcWrap_GetProcessInfo64(Core::System& system) { | |||
| 3852 | process_handle = Convert<Handle>(GetReg64(system, 1)); | 3852 | process_handle = Convert<Handle>(GetReg64(system, 1)); |
| 3853 | info_type = Convert<ProcessInfoType>(GetReg64(system, 2)); | 3853 | info_type = Convert<ProcessInfoType>(GetReg64(system, 2)); |
| 3854 | 3854 | ||
| 3855 | ret = GetProcessInfo64(system, &out_info, process_handle, info_type); | 3855 | ret = GetProcessInfo64(system, std::addressof(out_info), process_handle, info_type); |
| 3856 | 3856 | ||
| 3857 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3857 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3858 | SetReg64(system, 1, Convert<uint64_t>(out_info)); | 3858 | SetReg64(system, 1, Convert<uint64_t>(out_info)); |
| @@ -3863,7 +3863,7 @@ static void SvcWrap_CreateResourceLimit64(Core::System& system) { | |||
| 3863 | 3863 | ||
| 3864 | Handle out_handle{}; | 3864 | Handle out_handle{}; |
| 3865 | 3865 | ||
| 3866 | ret = CreateResourceLimit64(system, &out_handle); | 3866 | ret = CreateResourceLimit64(system, std::addressof(out_handle)); |
| 3867 | 3867 | ||
| 3868 | SetReg64(system, 0, Convert<uint64_t>(ret)); | 3868 | SetReg64(system, 0, Convert<uint64_t>(ret)); |
| 3869 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); | 3869 | SetReg64(system, 1, Convert<uint64_t>(out_handle)); |
diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index 806acb539..7d94347c5 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp | |||
| @@ -153,7 +153,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle | |||
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | Handle resource_handle{}; | 155 | Handle resource_handle{}; |
| 156 | R_TRY(handle_table.Add(&resource_handle, resource_limit)); | 156 | R_TRY(handle_table.Add(std::addressof(resource_handle), resource_limit)); |
| 157 | 157 | ||
| 158 | *result = resource_handle; | 158 | *result = resource_handle; |
| 159 | R_SUCCEED(); | 159 | R_SUCCEED(); |
| @@ -234,7 +234,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle | |||
| 234 | 234 | ||
| 235 | // Get a new handle for the current process. | 235 | // Get a new handle for the current process. |
| 236 | Handle tmp; | 236 | Handle tmp; |
| 237 | R_TRY(handle_table.Add(&tmp, current_process)); | 237 | R_TRY(handle_table.Add(std::addressof(tmp), current_process)); |
| 238 | 238 | ||
| 239 | // Set the output. | 239 | // Set the output. |
| 240 | *result = tmp; | 240 | *result = tmp; |
diff --git a/src/core/hle/kernel/svc/svc_ipc.cpp b/src/core/hle/kernel/svc/svc_ipc.cpp index bca303650..46fd0f2ea 100644 --- a/src/core/hle/kernel/svc/svc_ipc.cpp +++ b/src/core/hle/kernel/svc/svc_ipc.cpp | |||
| @@ -79,7 +79,7 @@ Result ReplyAndReceive(Core::System& system, s32* out_index, uint64_t handles_ad | |||
| 79 | while (true) { | 79 | while (true) { |
| 80 | // Wait for an object. | 80 | // Wait for an object. |
| 81 | s32 index; | 81 | s32 index; |
| 82 | Result result = KSynchronizationObject::Wait(kernel, &index, objs.data(), | 82 | Result result = KSynchronizationObject::Wait(kernel, std::addressof(index), objs.data(), |
| 83 | static_cast<s32>(objs.size()), timeout_ns); | 83 | static_cast<s32>(objs.size()), timeout_ns); |
| 84 | if (result == ResultTimedOut) { | 84 | if (result == ResultTimedOut) { |
| 85 | R_RETURN(result); | 85 | R_RETURN(result); |
diff --git a/src/core/hle/kernel/svc/svc_query_memory.cpp b/src/core/hle/kernel/svc/svc_query_memory.cpp index b2290164c..457ebf950 100644 --- a/src/core/hle/kernel/svc/svc_query_memory.cpp +++ b/src/core/hle/kernel/svc/svc_query_memory.cpp | |||
| @@ -33,7 +33,7 @@ Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageIn | |||
| 33 | auto& memory{system.Memory()}; | 33 | auto& memory{system.Memory()}; |
| 34 | const auto memory_info{process->PageTable().QueryInfo(address).GetSvcMemoryInfo()}; | 34 | const auto memory_info{process->PageTable().QueryInfo(address).GetSvcMemoryInfo()}; |
| 35 | 35 | ||
| 36 | memory.WriteBlock(out_memory_info, &memory_info, sizeof(memory_info)); | 36 | memory.WriteBlock(out_memory_info, std::addressof(memory_info), sizeof(memory_info)); |
| 37 | 37 | ||
| 38 | //! This is supposed to be part of the QueryInfo call. | 38 | //! This is supposed to be part of the QueryInfo call. |
| 39 | *out_page_info = {}; | 39 | *out_page_info = {}; |
diff --git a/src/core/hle/kernel/svc/svc_resource_limit.cpp b/src/core/hle/kernel/svc/svc_resource_limit.cpp index d96a7e879..732bc017e 100644 --- a/src/core/hle/kernel/svc/svc_resource_limit.cpp +++ b/src/core/hle/kernel/svc/svc_resource_limit.cpp | |||
| @@ -21,7 +21,7 @@ Result CreateResourceLimit(Core::System& system, Handle* out_handle) { | |||
| 21 | SCOPE_EXIT({ resource_limit->Close(); }); | 21 | SCOPE_EXIT({ resource_limit->Close(); }); |
| 22 | 22 | ||
| 23 | // Initialize the resource limit. | 23 | // Initialize the resource limit. |
| 24 | resource_limit->Initialize(&system.CoreTiming()); | 24 | resource_limit->Initialize(std::addressof(system.CoreTiming())); |
| 25 | 25 | ||
| 26 | // Register the limit. | 26 | // Register the limit. |
| 27 | KResourceLimit::Register(kernel, resource_limit); | 27 | KResourceLimit::Register(kernel, resource_limit); |
diff --git a/src/core/hle/kernel/svc/svc_secure_monitor_call.cpp b/src/core/hle/kernel/svc/svc_secure_monitor_call.cpp index 20f6ec643..62c781551 100644 --- a/src/core/hle/kernel/svc/svc_secure_monitor_call.cpp +++ b/src/core/hle/kernel/svc/svc_secure_monitor_call.cpp | |||
| @@ -29,7 +29,7 @@ void SvcWrap_CallSecureMonitor64(Core::System& system) { | |||
| 29 | args.r[i] = core.GetReg(i); | 29 | args.r[i] = core.GetReg(i); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | CallSecureMonitor64(system, &args); | 32 | CallSecureMonitor64(system, std::addressof(args)); |
| 33 | 33 | ||
| 34 | for (int i = 0; i < 8; i++) { | 34 | for (int i = 0; i < 8; i++) { |
| 35 | core.SetReg(i, args.r[i]); | 35 | core.SetReg(i, args.r[i]); |
| @@ -43,7 +43,7 @@ void SvcWrap_CallSecureMonitor64From32(Core::System& system) { | |||
| 43 | args.r[i] = static_cast<u32>(core.GetReg(i)); | 43 | args.r[i] = static_cast<u32>(core.GetReg(i)); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | CallSecureMonitor64From32(system, &args); | 46 | CallSecureMonitor64From32(system, std::addressof(args)); |
| 47 | 47 | ||
| 48 | for (int i = 0; i < 8; i++) { | 48 | for (int i = 0; i < 8; i++) { |
| 49 | core.SetReg(i, args.r[i]); | 49 | core.SetReg(i, args.r[i]); |
diff --git a/src/core/hle/kernel/svc/svc_session.cpp b/src/core/hle/kernel/svc/svc_session.cpp index d5a3d0120..01b8a52ad 100644 --- a/src/core/hle/kernel/svc/svc_session.cpp +++ b/src/core/hle/kernel/svc/svc_session.cpp | |||
| @@ -21,7 +21,8 @@ Result CreateSession(Core::System& system, Handle* out_server, Handle* out_clien | |||
| 21 | 21 | ||
| 22 | // Reserve a new session from the process resource limit. | 22 | // Reserve a new session from the process resource limit. |
| 23 | // FIXME: LimitableResource_SessionCountMax | 23 | // FIXME: LimitableResource_SessionCountMax |
| 24 | KScopedResourceReservation session_reservation(&process, LimitableResource::SessionCountMax); | 24 | KScopedResourceReservation session_reservation(std::addressof(process), |
| 25 | LimitableResource::SessionCountMax); | ||
| 25 | if (session_reservation.Succeeded()) { | 26 | if (session_reservation.Succeeded()) { |
| 26 | session = T::Create(system.Kernel()); | 27 | session = T::Create(system.Kernel()); |
| 27 | } else { | 28 | } else { |
| @@ -30,7 +31,7 @@ Result CreateSession(Core::System& system, Handle* out_server, Handle* out_clien | |||
| 30 | // // We couldn't reserve a session. Check that we support dynamically expanding the | 31 | // // We couldn't reserve a session. Check that we support dynamically expanding the |
| 31 | // // resource limit. | 32 | // // resource limit. |
| 32 | // R_UNLESS(process.GetResourceLimit() == | 33 | // R_UNLESS(process.GetResourceLimit() == |
| 33 | // &system.Kernel().GetSystemResourceLimit(), ResultLimitReached); | 34 | // std::addressof(system.Kernel().GetSystemResourceLimit()), ResultLimitReached); |
| 34 | // R_UNLESS(KTargetSystem::IsDynamicResourceLimitsEnabled(), ResultLimitReached()); | 35 | // R_UNLESS(KTargetSystem::IsDynamicResourceLimitsEnabled(), ResultLimitReached()); |
| 35 | 36 | ||
| 36 | // // Try to allocate a session from unused slab memory. | 37 | // // Try to allocate a session from unused slab memory. |
| @@ -75,7 +76,7 @@ Result CreateSession(Core::System& system, Handle* out_server, Handle* out_clien | |||
| 75 | T::Register(system.Kernel(), session); | 76 | T::Register(system.Kernel(), session); |
| 76 | 77 | ||
| 77 | // Add the server session to the handle table. | 78 | // Add the server session to the handle table. |
| 78 | R_TRY(handle_table.Add(out_server, &session->GetServerSession())); | 79 | R_TRY(handle_table.Add(out_server, std::addressof(session->GetServerSession()))); |
| 79 | 80 | ||
| 80 | // Ensure that we maintain a clean handle state on exit. | 81 | // Ensure that we maintain a clean handle state on exit. |
| 81 | ON_RESULT_FAILURE { | 82 | ON_RESULT_FAILURE { |
| @@ -83,7 +84,7 @@ Result CreateSession(Core::System& system, Handle* out_server, Handle* out_clien | |||
| 83 | }; | 84 | }; |
| 84 | 85 | ||
| 85 | // Add the client session to the handle table. | 86 | // Add the client session to the handle table. |
| 86 | R_RETURN(handle_table.Add(out_client, &session->GetClientSession())); | 87 | R_RETURN(handle_table.Add(out_client, std::addressof(session->GetClientSession()))); |
| 87 | } | 88 | } |
| 88 | 89 | ||
| 89 | } // namespace | 90 | } // namespace |
diff --git a/src/core/hle/kernel/svc/svc_thread.cpp b/src/core/hle/kernel/svc/svc_thread.cpp index 5e888153b..a16fc7ae3 100644 --- a/src/core/hle/kernel/svc/svc_thread.cpp +++ b/src/core/hle/kernel/svc/svc_thread.cpp | |||
| @@ -42,9 +42,9 @@ Result CreateThread(Core::System& system, Handle* out_handle, VAddr entry_point, | |||
| 42 | R_UNLESS(process.CheckThreadPriority(priority), ResultInvalidPriority); | 42 | R_UNLESS(process.CheckThreadPriority(priority), ResultInvalidPriority); |
| 43 | 43 | ||
| 44 | // Reserve a new thread from the process resource limit (waiting up to 100ms). | 44 | // Reserve a new thread from the process resource limit (waiting up to 100ms). |
| 45 | KScopedResourceReservation thread_reservation(&process, LimitableResource::ThreadCountMax, 1, | 45 | KScopedResourceReservation thread_reservation( |
| 46 | system.CoreTiming().GetGlobalTimeNs().count() + | 46 | std::addressof(process), LimitableResource::ThreadCountMax, 1, |
| 47 | 100000000); | 47 | system.CoreTiming().GetGlobalTimeNs().count() + 100000000); |
| 48 | R_UNLESS(thread_reservation.Succeeded(), ResultLimitReached); | 48 | R_UNLESS(thread_reservation.Succeeded(), ResultLimitReached); |
| 49 | 49 | ||
| 50 | // Create the thread. | 50 | // Create the thread. |
| @@ -56,7 +56,7 @@ Result CreateThread(Core::System& system, Handle* out_handle, VAddr entry_point, | |||
| 56 | { | 56 | { |
| 57 | KScopedLightLock lk{process.GetStateLock()}; | 57 | KScopedLightLock lk{process.GetStateLock()}; |
| 58 | R_TRY(KThread::InitializeUserThread(system, thread, entry_point, arg, stack_bottom, | 58 | R_TRY(KThread::InitializeUserThread(system, thread, entry_point, arg, stack_bottom, |
| 59 | priority, core_id, &process)); | 59 | priority, core_id, std::addressof(process))); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | // Set the thread name for debugging purposes. | 62 | // Set the thread name for debugging purposes. |
diff --git a/src/core/hle/kernel/svc/svc_transfer_memory.cpp b/src/core/hle/kernel/svc/svc_transfer_memory.cpp index ff4a87916..394f06728 100644 --- a/src/core/hle/kernel/svc/svc_transfer_memory.cpp +++ b/src/core/hle/kernel/svc/svc_transfer_memory.cpp | |||
| @@ -43,7 +43,7 @@ Result CreateTransferMemory(Core::System& system, Handle* out, VAddr address, u6 | |||
| 43 | auto& handle_table = process.GetHandleTable(); | 43 | auto& handle_table = process.GetHandleTable(); |
| 44 | 44 | ||
| 45 | // Reserve a new transfer memory from the process resource limit. | 45 | // Reserve a new transfer memory from the process resource limit. |
| 46 | KScopedResourceReservation trmem_reservation(&process, | 46 | KScopedResourceReservation trmem_reservation(std::addressof(process), |
| 47 | LimitableResource::TransferMemoryCountMax); | 47 | LimitableResource::TransferMemoryCountMax); |
| 48 | R_UNLESS(trmem_reservation.Succeeded(), ResultLimitReached); | 48 | R_UNLESS(trmem_reservation.Succeeded(), ResultLimitReached); |
| 49 | 49 | ||
diff --git a/src/core/hle/kernel/svc_generator.py b/src/core/hle/kernel/svc_generator.py index 0cce69e85..7fcbb1ba1 100644 --- a/src/core/hle/kernel/svc_generator.py +++ b/src/core/hle/kernel/svc_generator.py | |||
| @@ -460,7 +460,7 @@ def emit_wrapper(wrapped_fn, suffix, register_info, arguments, byte_size): | |||
| 460 | call_arguments = ["system"] | 460 | call_arguments = ["system"] |
| 461 | for arg in arguments: | 461 | for arg in arguments: |
| 462 | if arg.is_output and not arg.is_outptr: | 462 | if arg.is_output and not arg.is_outptr: |
| 463 | call_arguments.append(f"&{arg.var_name}") | 463 | call_arguments.append(f"std::addressof({arg.var_name})") |
| 464 | else: | 464 | else: |
| 465 | call_arguments.append(arg.var_name) | 465 | call_arguments.append(arg.var_name) |
| 466 | 466 | ||
| @@ -574,9 +574,9 @@ static To Convert(const From& from) { | |||
| 574 | To to{}; | 574 | To to{}; |
| 575 | 575 | ||
| 576 | if constexpr (sizeof(To) >= sizeof(From)) { | 576 | if constexpr (sizeof(To) >= sizeof(From)) { |
| 577 | std::memcpy(&to, &from, sizeof(From)); | 577 | std::memcpy(std::addressof(to), std::addressof(from), sizeof(From)); |
| 578 | } else { | 578 | } else { |
| 579 | std::memcpy(&to, &from, sizeof(To)); | 579 | std::memcpy(std::addressof(to), std::addressof(from), sizeof(To)); |
| 580 | } | 580 | } |
| 581 | 581 | ||
| 582 | return to; | 582 | return to; |