moved tsc and asm utilities to rx

This commit is contained in:
DH 2025-10-05 19:28:03 +03:00
parent bd215fab92
commit 640df36c48
121 changed files with 706 additions and 1225 deletions

View file

@ -1,5 +1,6 @@
#include "stdafx.h"
#include "util/asm.hpp"
#include "rx/asm.hpp"
#include "rx/align.hpp"
#include "np_gui_cache.h"
LOG_CHANNEL(np_gui_cache);
@ -72,7 +73,7 @@ namespace np
const auto& room = ::at32(rooms, room_id);
const u32 room_size = ::narrow<u32>(utils::align(sizeof(SceNpMatchingRoomStatus), 8) + (utils::align(sizeof(SceNpMatchingRoomMember), 8) * room.members.size()));
const u32 room_size = ::narrow<u32>(rx::alignUp(sizeof(SceNpMatchingRoomStatus), 8) + (rx::alignUp(sizeof(SceNpMatchingRoomMember), 8) * room.members.size()));
if (!data)
return not_an_error(room_size);
@ -94,12 +95,12 @@ namespace np
{
if (!cur_member_ptr)
{
room_status->members = vm::cast(data.addr() + utils::align(sizeof(SceNpMatchingRoomStatus), 8));
room_status->members = vm::cast(data.addr() + rx::alignUp(sizeof(SceNpMatchingRoomStatus), 8));
cur_member_ptr = room_status->members;
}
else
{
cur_member_ptr->next = vm::cast(cur_member_ptr.addr() + utils::align(sizeof(SceNpMatchingRoomMember), 8));
cur_member_ptr->next = vm::cast(cur_member_ptr.addr() + rx::alignUp(sizeof(SceNpMatchingRoomMember), 8));
cur_member_ptr = cur_member_ptr->next;
}