mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 16:31:19 +12:00
COS: Implement PPC va_list, va_arg and update related functions
This commit is contained in:
parent
9812a47cb1
commit
e02cc42d67
5 changed files with 182 additions and 71 deletions
|
@ -92,19 +92,6 @@ public:
|
|||
template <typename X>
|
||||
explicit operator MEMPTR<X>() const { return MEMPTR<X>(this->m_value); }
|
||||
|
||||
//bool operator==(const MEMPTR<T>& v) const { return m_value == v.m_value; }
|
||||
//bool operator==(const T* rhs) const { return (T*)(m_value == 0 ? nullptr : memory_base + (uint32)m_value) == rhs; } -> ambigious (implicit cast to T* allows for T* == T*)
|
||||
//bool operator==(std::nullptr_t rhs) const { return m_value == 0; }
|
||||
|
||||
//bool operator!=(const MEMPTR<T>& v) const { return !(*this == v); }
|
||||
//bool operator!=(const void* rhs) const { return !(*this == rhs); }
|
||||
//bool operator!=(int rhs) const { return !(*this == rhs); }
|
||||
|
||||
//bool operator==(const void* rhs) const { return (void*)(m_value == 0 ? nullptr : memory_base + (uint32)m_value) == rhs; }
|
||||
|
||||
//explicit bool operator==(int rhs) const { return *this == (const void*)(size_t)rhs; }
|
||||
|
||||
|
||||
MEMPTR operator+(const MEMPTR& ptr) { return MEMPTR(this->GetMPTR() + ptr.GetMPTR()); }
|
||||
MEMPTR operator-(const MEMPTR& ptr) { return MEMPTR(this->GetMPTR() - ptr.GetMPTR()); }
|
||||
|
||||
|
@ -120,6 +107,12 @@ public:
|
|||
return MEMPTR(this->GetMPTR() - v * 4);
|
||||
}
|
||||
|
||||
MEMPTR& operator+=(sint32 v)
|
||||
{
|
||||
m_value += v * sizeof(T);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class Q = T>
|
||||
typename std::enable_if<!std::is_same<Q, void>::value, Q>::type&
|
||||
operator*() const { return *GetPtr(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue