mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
refactor(libc): remove the unused register save area vararg helpers
The VA_ARGS parameter list and VarArgsAbi.hpp (RegSaveArea, FillRegSaveArea, BuildVaList and the Xmm alias in SimdTypes.hpp) were only used by the four Linux exports that now take their arguments with va_start.
This commit is contained in:
@@ -1846,12 +1846,6 @@ struct LibcHeapInfo {
|
||||
|
||||
using Info = LibcHeapInfo;
|
||||
|
||||
#define VA_ARGS \
|
||||
std::uint64_t rdi, std::uint64_t rsi, std::uint64_t rdx, std::uint64_t rcx, \
|
||||
std::uint64_t r8, std::uint64_t r9, std::uint64_t overflow_arg_area, \
|
||||
__m128 xmm0, __m128 xmm1, __m128 xmm2, __m128 xmm3, \
|
||||
__m128 xmm4, __m128 xmm5, __m128 xmm6, __m128 xmm7, ...
|
||||
|
||||
struct Packet {
|
||||
std::uint32_t* addr;
|
||||
std::uint32_t dw_num;
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBC_INCLUDE_EXCEPTIONS_VARARGSABI_HPP
|
||||
#define CORE_LIBS_PRX_LIBC_INCLUDE_EXCEPTIONS_VARARGSABI_HPP
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include "SceTypes.hpp"
|
||||
#include "prx/libc/include/specifics/x86_64/SimdTypes.hpp"
|
||||
|
||||
namespace LibcDetail {
|
||||
|
||||
struct RegSaveArea {
|
||||
std::uint64_t gp[6];
|
||||
X86_64::Xmm fp[8];
|
||||
};
|
||||
|
||||
struct VaListLayout {
|
||||
unsigned int gpOffset;
|
||||
unsigned int fpOffset;
|
||||
void* overflowArgArea;
|
||||
void* regSaveArea;
|
||||
};
|
||||
|
||||
inline void FillRegSaveArea(
|
||||
RegSaveArea& regs,
|
||||
std::uint64_t gp0, std::uint64_t gp1, std::uint64_t gp2,
|
||||
std::uint64_t gp3, std::uint64_t gp4, std::uint64_t gp5,
|
||||
X86_64::Xmm fp0, X86_64::Xmm fp1, X86_64::Xmm fp2, X86_64::Xmm fp3,
|
||||
X86_64::Xmm fp4, X86_64::Xmm fp5, X86_64::Xmm fp6, X86_64::Xmm fp7
|
||||
) {
|
||||
regs.gp[0] = gp0;
|
||||
regs.gp[1] = gp1;
|
||||
regs.gp[2] = gp2;
|
||||
regs.gp[3] = gp3;
|
||||
regs.gp[4] = gp4;
|
||||
regs.gp[5] = gp5;
|
||||
regs.fp[0] = fp0;
|
||||
regs.fp[1] = fp1;
|
||||
regs.fp[2] = fp2;
|
||||
regs.fp[3] = fp3;
|
||||
regs.fp[4] = fp4;
|
||||
regs.fp[5] = fp5;
|
||||
regs.fp[6] = fp6;
|
||||
regs.fp[7] = fp7;
|
||||
}
|
||||
|
||||
inline std::va_list* BuildVaList(
|
||||
VaListLayout& layout, RegSaveArea& regs,
|
||||
unsigned int consumedGpRegisters, void* overflowArgArea
|
||||
) {
|
||||
layout.gpOffset = consumedGpRegisters * 8u;
|
||||
layout.fpOffset = 6u * 8u;
|
||||
layout.overflowArgArea = overflowArgArea;
|
||||
layout.regSaveArea = ®s;
|
||||
return reinterpret_cast<std::va_list*>(&layout);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBC_INCLUDE_X86_64_SIMDTYPES_HPP
|
||||
#define CORE_LIBS_PRX_LIBC_INCLUDE_X86_64_SIMDTYPES_HPP
|
||||
|
||||
#include <xmmintrin.h>
|
||||
|
||||
namespace X86_64 {
|
||||
using Xmm = __m128;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "prx/libc/include/General.hpp"
|
||||
#include "SceTypes.hpp"
|
||||
#include "prx/libc/include/VarArgsAbi.hpp"
|
||||
#include "prx/libc/include/FileStream.hpp"
|
||||
#include "prx/libc/include/ApplicationHeap.hpp"
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "prx/libc/include/General.hpp"
|
||||
#include "prx/libc/include/VarArgsAbi.hpp"
|
||||
#include "prx/libc/include/FileStream.hpp"
|
||||
#include "prx/libc/include/WindowsFormatting.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user