mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
More asterisks
This commit is contained in:
parent
78aa398e7c
commit
3e283ea9f1
@ -43,7 +43,7 @@ static bool IsPowerOfTwo(uint64_t x)
|
||||
|
||||
#define V8_UINT64_C(x) ((uint64_t)(x))
|
||||
|
||||
bool IsImmArithmetic(uint64_t input, u32 *val, bool *shift)
|
||||
bool IsImmArithmetic(uint64_t input, u32* val, bool* shift)
|
||||
{
|
||||
if (input < 4096)
|
||||
{
|
||||
@ -1002,7 +1002,7 @@ void ARM64XEmitter::BL(const void* ptr)
|
||||
EncodeUnconditionalBranchInst(1, ptr);
|
||||
}
|
||||
|
||||
void ARM64XEmitter::QuickCallFunction(ARM64Reg scratchreg, const void *func)
|
||||
void ARM64XEmitter::QuickCallFunction(ARM64Reg scratchreg, const void* func)
|
||||
{
|
||||
s64 distance = (s64)func - (s64)m_code;
|
||||
distance >>= 2; // Can only branch to opcode-aligned (4) addresses
|
||||
@ -4094,7 +4094,7 @@ float FPImm8ToFloat(uint8_t bits)
|
||||
return fl;
|
||||
}
|
||||
|
||||
bool FPImm8FromFloat(float value, uint8_t *immOut)
|
||||
bool FPImm8FromFloat(float value, uint8_t* immOut)
|
||||
{
|
||||
uint32_t f;
|
||||
memcpy(&f, &value, sizeof(float));
|
||||
|
@ -98,10 +98,10 @@ constexpr ARM64Reg EncodeRegToQuad(ARM64Reg reg) { return static_cast<ARM64Reg
|
||||
// For AND/TST/ORR/EOR etc
|
||||
bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned int* imm_s, unsigned int* imm_r);
|
||||
// For ADD/SUB
|
||||
bool IsImmArithmetic(uint64_t input, u32 *val, bool *shift);
|
||||
bool IsImmArithmetic(uint64_t input, u32* val, bool* shift);
|
||||
|
||||
float FPImm8ToFloat(uint8_t bits);
|
||||
bool FPImm8FromFloat(float value, uint8_t *immOut);
|
||||
bool FPImm8FromFloat(float value, uint8_t* immOut);
|
||||
|
||||
enum OpType
|
||||
{
|
||||
@ -677,7 +677,7 @@ public:
|
||||
// Wrapper around MOVZ+MOVK
|
||||
void MOVI2R(ARM64Reg Rd, u64 imm, bool optimize = true);
|
||||
template <class P>
|
||||
void MOVP2R(ARM64Reg Rd, P *ptr)
|
||||
void MOVP2R(ARM64Reg Rd, P* ptr)
|
||||
{
|
||||
_assert_msg_(DYNA_REC, Is64Bit(Rd), "Can't store pointers in 32-bit registers");
|
||||
MOVI2R(Rd, (uintptr_t)ptr);
|
||||
@ -730,7 +730,7 @@ public:
|
||||
}
|
||||
|
||||
// Plain function call
|
||||
void QuickCallFunction(ARM64Reg scratchreg, const void *func);
|
||||
void QuickCallFunction(ARM64Reg scratchreg, const void* func);
|
||||
template <typename T> void QuickCallFunction(ARM64Reg scratchreg, T func)
|
||||
{
|
||||
QuickCallFunction(scratchreg, (const void *)func);
|
||||
|
@ -188,7 +188,7 @@ void MemChecks::Remove(u32 _Address)
|
||||
jit->ClearCache();
|
||||
}
|
||||
|
||||
TMemCheck *MemChecks::GetMemCheck(u32 address)
|
||||
TMemCheck* MemChecks::GetMemCheck(u32 address)
|
||||
{
|
||||
for (TMemCheck& bp : m_MemChecks)
|
||||
{
|
||||
@ -207,7 +207,7 @@ TMemCheck *MemChecks::GetMemCheck(u32 address)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc)
|
||||
bool TMemCheck::Action(DebugInterface* debug_interface, u32 iValue, u32 addr, bool write, int size, u32 pc)
|
||||
{
|
||||
if ((write && OnWrite) || (!write && OnRead))
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ struct TMemCheck
|
||||
u32 numHits;
|
||||
|
||||
// returns whether to break
|
||||
bool Action(DebugInterface *dbg_interface, u32 _iValue, u32 addr,
|
||||
bool Action(DebugInterface* dbg_interface, u32 _iValue, u32 addr,
|
||||
bool write, int size, u32 pc);
|
||||
};
|
||||
|
||||
@ -99,7 +99,7 @@ public:
|
||||
void Add(const TMemCheck& _rMemoryCheck);
|
||||
|
||||
// memory breakpoint
|
||||
TMemCheck *GetMemCheck(u32 address);
|
||||
TMemCheck* GetMemCheck(u32 address);
|
||||
void Remove(u32 _Address);
|
||||
|
||||
void Clear() { m_MemChecks.clear(); }
|
||||
|
@ -311,7 +311,7 @@ private:
|
||||
}
|
||||
|
||||
__forceinline
|
||||
void DoVoid(void *data, u32 size)
|
||||
void DoVoid(void* data, u32 size)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
@ -421,7 +421,7 @@ public:
|
||||
}
|
||||
|
||||
// Get data
|
||||
u8 *ptr = nullptr;
|
||||
u8* ptr = nullptr;
|
||||
PointerWrap p(&ptr, PointerWrap::MODE_MEASURE);
|
||||
_class.DoState(p);
|
||||
size_t const sz = (size_t)ptr;
|
||||
|
@ -21,7 +21,7 @@ private:
|
||||
virtual void PoisonMemory() = 0;
|
||||
|
||||
protected:
|
||||
u8 *region;
|
||||
u8* region;
|
||||
size_t region_size;
|
||||
size_t parent_region_size;
|
||||
|
||||
@ -68,7 +68,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool IsInSpace(u8 *ptr) const
|
||||
bool IsInSpace(u8* ptr) const
|
||||
{
|
||||
return (ptr >= region) && (ptr < (region + region_size));
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ void decodeCI8image(u32* dst, u8* src, u16* pal, int width, int height)
|
||||
{
|
||||
for (int iy = 0; iy < 4; iy++, src += 8)
|
||||
{
|
||||
u32 *tdst = dst+(y+iy)*width+x;
|
||||
u32* tdst = dst+(y+iy)*width+x;
|
||||
for (int ix = 0; ix < 8; ix++)
|
||||
{
|
||||
// huh, this seems wrong. CI8, not 5A3, no?
|
||||
|
@ -8,17 +8,17 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Crypto/bn.h"
|
||||
|
||||
static void bn_zero(u8 *d, u32 n)
|
||||
static void bn_zero(u8* d, u32 n)
|
||||
{
|
||||
memset(d, 0, n);
|
||||
}
|
||||
|
||||
static void bn_copy(u8 *d, const u8 *a, u32 n)
|
||||
static void bn_copy(u8* d, const u8* a, u32 n)
|
||||
{
|
||||
memcpy(d, a, n);
|
||||
}
|
||||
|
||||
int bn_compare(const u8 *a, const u8 *b, u32 n)
|
||||
int bn_compare(const u8* a, const u8* b, u32 n)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@ -32,7 +32,7 @@ int bn_compare(const u8 *a, const u8 *b, u32 n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void bn_sub_modulus(u8 *a, const u8 *N, u32 n)
|
||||
void bn_sub_modulus(u8* a, const u8* N, u32 n)
|
||||
{
|
||||
u32 i;
|
||||
u32 dig;
|
||||
@ -46,7 +46,7 @@ void bn_sub_modulus(u8 *a, const u8 *N, u32 n)
|
||||
}
|
||||
}
|
||||
|
||||
void bn_add(u8 *d, const u8 *a, const u8 *b, const u8 *N, u32 n)
|
||||
void bn_add(u8* d, const u8* a, const u8* b, const u8* N, u32 n)
|
||||
{
|
||||
u32 i;
|
||||
u32 dig;
|
||||
@ -66,7 +66,7 @@ void bn_add(u8 *d, const u8 *a, const u8 *b, const u8 *N, u32 n)
|
||||
bn_sub_modulus(d, N, n);
|
||||
}
|
||||
|
||||
void bn_mul(u8 *d, const u8 *a, const u8 *b, const u8 *N, u32 n)
|
||||
void bn_mul(u8* d, const u8* a, const u8* b, const u8* N, u32 n)
|
||||
{
|
||||
u32 i;
|
||||
u8 mask;
|
||||
@ -81,7 +81,7 @@ void bn_mul(u8 *d, const u8 *a, const u8 *b, const u8 *N, u32 n)
|
||||
}
|
||||
}
|
||||
|
||||
void bn_exp(u8 *d, const u8 *a, const u8 *N, u32 n, const u8 *e, u32 en)
|
||||
void bn_exp(u8* d, const u8* a, const u8* N, u32 n, const u8* e, u32 en)
|
||||
{
|
||||
u8 t[512];
|
||||
u32 i;
|
||||
@ -100,7 +100,7 @@ void bn_exp(u8 *d, const u8 *a, const u8 *N, u32 n, const u8 *e, u32 en)
|
||||
}
|
||||
|
||||
// only for prime N -- stupid but lazy, see if I care
|
||||
void bn_inv(u8 *d, const u8 *a, const u8 *N, u32 n)
|
||||
void bn_inv(u8* d, const u8* a, const u8* N, u32 n)
|
||||
{
|
||||
u8 t[512], s[512];
|
||||
|
||||
|
@ -8,9 +8,9 @@
|
||||
|
||||
// bignum arithmetic
|
||||
|
||||
int bn_compare(const u8 *a, const u8 *b, u32 n);
|
||||
void bn_sub_modulus(u8 *a, const u8 *N, u32 n);
|
||||
void bn_add(u8 *d, const u8 *a, const u8 *b, const u8 *N, u32 n);
|
||||
void bn_mul(u8 *d, const u8 *a, const u8 *b, const u8 *N, u32 n);
|
||||
void bn_inv(u8 *d, const u8 *a, const u8 *N, u32 n); // only for prime N
|
||||
void bn_exp(u8 *d, const u8 *a, const u8 *N, u32 n, const u8 *e, u32 en);
|
||||
int bn_compare(const u8* a, const u8* b, u32 n);
|
||||
void bn_sub_modulus(u8* a, const u8* N, u32 n);
|
||||
void bn_add(u8* d, const u8* a, const u8* b, const u8* N, u32 n);
|
||||
void bn_mul(u8* d, const u8* a, const u8* b, const u8* N, u32 n);
|
||||
void bn_inv(u8* d, const u8* a, const u8* N, u32 n); // only for prime N
|
||||
void bn_exp(u8* d, const u8* a, const u8* N, u32 n, const u8* e, u32 en);
|
||||
|
@ -32,17 +32,17 @@ static const u8 ec_G[60] =
|
||||
,0x01,0x00,0x6a,0x08,0xa4,0x19,0x03,0x35,0x06,0x78,0xe5,0x85,0x28,0xbe,0xbf
|
||||
,0x8a,0x0b,0xef,0xf8,0x67,0xa7,0xca,0x36,0x71,0x6f,0x7e,0x01,0xf8,0x10,0x52};
|
||||
|
||||
static void elt_copy(u8 *d, const u8 *a)
|
||||
static void elt_copy(u8* d, const u8* a)
|
||||
{
|
||||
memcpy(d, a, 30);
|
||||
}
|
||||
|
||||
static void elt_zero(u8 *d)
|
||||
static void elt_zero(u8* d)
|
||||
{
|
||||
memset(d, 0, 30);
|
||||
}
|
||||
|
||||
static int elt_is_zero(const u8 *d)
|
||||
static int elt_is_zero(const u8* d)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@ -53,7 +53,7 @@ static int elt_is_zero(const u8 *d)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void elt_add(u8 *d, const u8 *a, const u8 *b)
|
||||
static void elt_add(u8* d, const u8* a, const u8* b)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@ -61,7 +61,7 @@ static void elt_add(u8 *d, const u8 *a, const u8 *b)
|
||||
d[i] = a[i] ^ b[i];
|
||||
}
|
||||
|
||||
static void elt_mul_x(u8 *d, const u8 *a)
|
||||
static void elt_mul_x(u8* d, const u8* a)
|
||||
{
|
||||
u8 carry, x, y;
|
||||
u32 i;
|
||||
@ -79,7 +79,7 @@ static void elt_mul_x(u8 *d, const u8 *a)
|
||||
d[20] ^= carry << 2;
|
||||
}
|
||||
|
||||
static void elt_mul(u8 *d, const u8 *a, const u8 *b)
|
||||
static void elt_mul(u8* d, const u8* a, const u8* b)
|
||||
{
|
||||
u32 i, n;
|
||||
u8 mask;
|
||||
@ -105,7 +105,7 @@ static void elt_mul(u8 *d, const u8 *a, const u8 *b)
|
||||
static const u8 square[16] =
|
||||
{0x00,0x01,0x04,0x05,0x10,0x11,0x14,0x15,0x40,0x41,0x44,0x45,0x50,0x51,0x54,0x55};
|
||||
|
||||
static void elt_square_to_wide(u8 *d, const u8 *a)
|
||||
static void elt_square_to_wide(u8* d, const u8* a)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@ -115,7 +115,7 @@ static void elt_square_to_wide(u8 *d, const u8 *a)
|
||||
}
|
||||
}
|
||||
|
||||
static void wide_reduce(u8 *d)
|
||||
static void wide_reduce(u8* d)
|
||||
{
|
||||
u32 i;
|
||||
u8 x;
|
||||
@ -140,7 +140,7 @@ static void wide_reduce(u8 *d)
|
||||
d[30] &= 1;
|
||||
}
|
||||
|
||||
static void elt_square(u8 *d, const u8 *a)
|
||||
static void elt_square(u8* d, const u8* a)
|
||||
{
|
||||
u8 wide[60];
|
||||
|
||||
@ -150,7 +150,7 @@ static void elt_square(u8 *d, const u8 *a)
|
||||
elt_copy(d, wide + 30);
|
||||
}
|
||||
|
||||
static void itoh_tsujii(u8 *d, const u8 *a, const u8 *b, u32 j)
|
||||
static void itoh_tsujii(u8* d, const u8* a, const u8* b, u32 j)
|
||||
{
|
||||
u8 t[30];
|
||||
|
||||
@ -163,7 +163,7 @@ static void itoh_tsujii(u8 *d, const u8 *a, const u8 *b, u32 j)
|
||||
elt_mul(d, t, b);
|
||||
}
|
||||
|
||||
static void elt_inv(u8 *d, const u8 *a)
|
||||
static void elt_inv(u8* d, const u8* a)
|
||||
{
|
||||
u8 t[30];
|
||||
u8 s[30];
|
||||
@ -181,10 +181,10 @@ static void elt_inv(u8 *d, const u8 *a)
|
||||
elt_square(d, s);
|
||||
}
|
||||
|
||||
UNUSED static int point_is_on_curve(u8 *p)
|
||||
UNUSED static int point_is_on_curve(u8* p)
|
||||
{
|
||||
u8 s[30], t[30];
|
||||
u8 *x, *y;
|
||||
u8* x, *y;
|
||||
|
||||
x = p;
|
||||
y = p + 30;
|
||||
@ -205,16 +205,16 @@ UNUSED static int point_is_on_curve(u8 *p)
|
||||
return elt_is_zero(s);
|
||||
}
|
||||
|
||||
static int point_is_zero(const u8 *p)
|
||||
static int point_is_zero(const u8* p)
|
||||
{
|
||||
return elt_is_zero(p) && elt_is_zero(p + 30);
|
||||
}
|
||||
|
||||
static void point_double(u8 *r, const u8 *p)
|
||||
static void point_double(u8* r, const u8* p)
|
||||
{
|
||||
u8 s[30], t[30];
|
||||
const u8 *px, *py;
|
||||
u8 *rx, *ry;
|
||||
const u8* px, *py;
|
||||
u8* rx, *ry;
|
||||
|
||||
px = p;
|
||||
py = p + 30;
|
||||
@ -243,11 +243,11 @@ static void point_double(u8 *r, const u8 *p)
|
||||
elt_add(ry, ry, t);
|
||||
}
|
||||
|
||||
static void point_add(u8 *r, const u8 *p, const u8 *q)
|
||||
static void point_add(u8* r, const u8* p, const u8* q)
|
||||
{
|
||||
u8 s[30], t[30], u[30];
|
||||
const u8 *px, *py, *qx, *qy;
|
||||
u8 *rx, *ry;
|
||||
const u8* px, *py, *qx, *qy;
|
||||
u8* rx, *ry;
|
||||
|
||||
px = p;
|
||||
py = p + 30;
|
||||
@ -297,7 +297,7 @@ static void point_add(u8 *r, const u8 *p, const u8 *q)
|
||||
elt_add(ry, s, rx);
|
||||
}
|
||||
|
||||
static void point_mul(u8 *d, const u8 *a, const u8 *b) // a is bignum
|
||||
static void point_mul(u8* d, const u8* a, const u8* b) // a is bignum
|
||||
{
|
||||
u32 i;
|
||||
u8 mask;
|
||||
@ -324,7 +324,7 @@ static void silly_random(u8 * rndArea, u8 count)
|
||||
}
|
||||
}
|
||||
|
||||
void generate_ecdsa(u8 *R, u8 *S, const u8 *k, const u8 *hash)
|
||||
void generate_ecdsa(u8* R, u8* S, const u8* k, const u8* hash)
|
||||
{
|
||||
u8 e[30];
|
||||
u8 kk[30];
|
||||
@ -362,7 +362,7 @@ void generate_ecdsa(u8 *R, u8 *S, const u8 *k, const u8 *hash)
|
||||
bn_mul(S, minv, kk, ec_N, 30);
|
||||
}
|
||||
|
||||
UNUSED static int check_ecdsa(u8 *Q, u8 *R, u8 *S, const u8 *hash)
|
||||
UNUSED static int check_ecdsa(u8* Q, u8* R, u8* S, const u8* hash)
|
||||
{
|
||||
u8 Sinv[30];
|
||||
u8 e[30];
|
||||
@ -388,7 +388,7 @@ UNUSED static int check_ecdsa(u8 *Q, u8 *R, u8 *S, const u8 *hash)
|
||||
return (bn_compare(r1, R, 30) == 0);
|
||||
}
|
||||
|
||||
void ec_priv_to_pub(const u8 *k, u8 *Q)
|
||||
void ec_priv_to_pub(const u8* k, u8* Q)
|
||||
{
|
||||
point_mul(Q, k, ec_G);
|
||||
}
|
||||
|
@ -6,6 +6,6 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
void generate_ecdsa(u8 *R, u8 *S, const u8 *k, const u8 *hash);
|
||||
void generate_ecdsa(u8* R, u8* S, const u8* k, const u8* hash);
|
||||
|
||||
void ec_priv_to_pub(const u8 *k, u8 *Q);
|
||||
void ec_priv_to_pub(const u8* k, u8* Q);
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
{
|
||||
if (NeedSize)
|
||||
m_size--;
|
||||
ElementPtr *tmpptr = m_read_ptr;
|
||||
ElementPtr* tmpptr = m_read_ptr;
|
||||
// advance the read pointer
|
||||
m_read_ptr = tmpptr->next.load();
|
||||
// set the next element to nullptr to stop the recursive deletion
|
||||
@ -81,7 +81,7 @@ public:
|
||||
if (NeedSize)
|
||||
m_size--;
|
||||
|
||||
ElementPtr *tmpptr = m_read_ptr;
|
||||
ElementPtr* tmpptr = m_read_ptr;
|
||||
m_read_ptr = tmpptr->next.load(std::memory_order_acquire);
|
||||
t = std::move(tmpptr->current);
|
||||
tmpptr->next.store(nullptr);
|
||||
@ -117,8 +117,8 @@ private:
|
||||
std::atomic<ElementPtr*> next;
|
||||
};
|
||||
|
||||
ElementPtr *m_write_ptr;
|
||||
ElementPtr *m_read_ptr;
|
||||
ElementPtr* m_write_ptr;
|
||||
ElementPtr* m_read_ptr;
|
||||
std::atomic<u32> m_size;
|
||||
};
|
||||
|
||||
|
@ -417,7 +417,7 @@ u64 GetSize(const int fd)
|
||||
}
|
||||
|
||||
// Overloaded GetSize, accepts FILE*
|
||||
u64 GetSize(FILE *f)
|
||||
u64 GetSize(FILE* f)
|
||||
{
|
||||
// can't use off_t here because it can be 32-bit
|
||||
u64 pos = ftello(f);
|
||||
@ -482,7 +482,7 @@ FSTEntry ScanDirectoryTree(const std::string &directory, bool recursive)
|
||||
#else
|
||||
struct dirent dirent, *result = nullptr;
|
||||
|
||||
DIR *dirp = opendir(directory.c_str());
|
||||
DIR* dirp = opendir(directory.c_str());
|
||||
if (!dirp)
|
||||
return parent_entry;
|
||||
|
||||
@ -547,7 +547,7 @@ bool DeleteDirRecursively(const std::string &directory)
|
||||
const std::string virtualName(TStrToUTF8(ffd.cFileName));
|
||||
#else
|
||||
struct dirent dirent, *result = nullptr;
|
||||
DIR *dirp = opendir(directory.c_str());
|
||||
DIR* dirp = opendir(directory.c_str());
|
||||
if (!dirp)
|
||||
return false;
|
||||
|
||||
@ -621,7 +621,7 @@ void CopyDir(const std::string &source_path, const std::string &dest_path)
|
||||
const std::string virtualName(TStrToUTF8(ffd.cFileName));
|
||||
#else
|
||||
struct dirent dirent, *result = nullptr;
|
||||
DIR *dirp = opendir(source_path.c_str());
|
||||
DIR* dirp = opendir(source_path.c_str());
|
||||
if (!dirp) return;
|
||||
|
||||
while (!readdir_r(dirp, &dirent, &result) && result)
|
||||
|
@ -82,7 +82,7 @@ u64 GetSize(const std::string &filename);
|
||||
u64 GetSize(const int fd);
|
||||
|
||||
// Overloaded GetSize, accepts FILE*
|
||||
u64 GetSize(FILE *f);
|
||||
u64 GetSize(FILE* f);
|
||||
|
||||
// Returns true if successful, or path already exists.
|
||||
bool CreateDir(const std::string &filename);
|
||||
|
@ -16,7 +16,7 @@
|
||||
template <class T, int N>
|
||||
class FixedSizeQueue
|
||||
{
|
||||
T *storage;
|
||||
T* storage;
|
||||
int head;
|
||||
int tail;
|
||||
int count; // sacrifice 4 bytes for a simpler implementation. may optimize away in the future.
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "Common/Hash.h"
|
||||
#include "Common/Intrinsics.h"
|
||||
|
||||
static u64 (*ptrHashFunction)(const u8 *src, u32 len, u32 samples) = &GetMurmurHash3;
|
||||
static u64 (*ptrHashFunction)(const u8* src, u32 len, u32 samples) = &GetMurmurHash3;
|
||||
|
||||
// uint32_t
|
||||
// WARNING - may read one more byte!
|
||||
@ -149,7 +149,7 @@ inline u64 fmix64(u64 k)
|
||||
return k;
|
||||
}
|
||||
|
||||
u64 GetMurmurHash3(const u8 *src, u32 len, u32 samples)
|
||||
u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
const u8 * data = (const u8*)src;
|
||||
const int nblocks = len / 16;
|
||||
@ -227,13 +227,13 @@ u64 GetMurmurHash3(const u8 *src, u32 len, u32 samples)
|
||||
|
||||
|
||||
// CRC32 hash using the SSE4.2 instruction
|
||||
u64 GetCRC32(const u8 *src, u32 len, u32 samples)
|
||||
u64 GetCRC32(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
#if _M_SSE >= 0x402 || defined(_M_ARM_64)
|
||||
u64 h[4] = { len, 0, 0, 0 };
|
||||
u32 Step = (len / 8);
|
||||
const u64 *data = (const u64 *)src;
|
||||
const u64 *end = data + Step;
|
||||
const u64* data = (const u64 *)src;
|
||||
const u64* end = data + Step;
|
||||
if (samples == 0)
|
||||
samples = std::max(Step, 1u);
|
||||
Step = Step / samples;
|
||||
@ -333,14 +333,14 @@ u64 GetCRC32(const u8 *src, u32 len, u32 samples)
|
||||
* changed, make sure this one is still used when the legacy parameter is
|
||||
* true.
|
||||
*/
|
||||
u64 GetHashHiresTexture(const u8 *src, u32 len, u32 samples)
|
||||
u64 GetHashHiresTexture(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
const u64 m = 0xc6a4a7935bd1e995;
|
||||
u64 h = len * m;
|
||||
const int r = 47;
|
||||
u32 Step = (len / 8);
|
||||
const u64 *data = (const u64 *)src;
|
||||
const u64 *end = data + Step;
|
||||
const u64* data = (const u64 *)src;
|
||||
const u64* end = data + Step;
|
||||
if (samples == 0)
|
||||
samples = std::max(Step, 1u);
|
||||
Step = Step / samples;
|
||||
@ -379,13 +379,13 @@ u64 GetHashHiresTexture(const u8 *src, u32 len, u32 samples)
|
||||
}
|
||||
#else
|
||||
// CRC32 hash using the SSE4.2 instruction
|
||||
u64 GetCRC32(const u8 *src, u32 len, u32 samples)
|
||||
u64 GetCRC32(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
#if _M_SSE >= 0x402
|
||||
u32 h = len;
|
||||
u32 Step = (len/4);
|
||||
const u32 *data = (const u32 *)src;
|
||||
const u32 *end = data + Step;
|
||||
const u32* data = (const u32 *)src;
|
||||
const u32* end = data + Step;
|
||||
if (samples == 0)
|
||||
samples = std::max(Step, 1u);
|
||||
Step = Step / samples;
|
||||
@ -397,7 +397,7 @@ u64 GetCRC32(const u8 *src, u32 len, u32 samples)
|
||||
data += Step;
|
||||
}
|
||||
|
||||
const u8 *data2 = (const u8*)end;
|
||||
const u8* data2 = (const u8*)end;
|
||||
return (u64)_mm_crc32_u32(h, u32(data2[0]));
|
||||
#else
|
||||
return 0;
|
||||
@ -530,14 +530,14 @@ u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
* 64-bit version. Until someone can make a new version of the 32-bit one that
|
||||
* makes identical hashes, this is just a c/p of the 64-bit one.
|
||||
*/
|
||||
u64 GetHashHiresTexture(const u8 *src, u32 len, u32 samples)
|
||||
u64 GetHashHiresTexture(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
const u64 m = 0xc6a4a7935bd1e995ULL;
|
||||
u64 h = len * m;
|
||||
const int r = 47;
|
||||
u32 Step = (len / 8);
|
||||
const u64 *data = (const u64 *)src;
|
||||
const u64 *end = data + Step;
|
||||
const u64* data = (const u64 *)src;
|
||||
const u64* end = data + Step;
|
||||
if (samples == 0)
|
||||
samples = std::max(Step, 1u);
|
||||
Step = Step / samples;
|
||||
@ -576,7 +576,7 @@ u64 GetHashHiresTexture(const u8 *src, u32 len, u32 samples)
|
||||
}
|
||||
#endif
|
||||
|
||||
u64 GetHash64(const u8 *src, u32 len, u32 samples)
|
||||
u64 GetHash64(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
return ptrHashFunction(src, len, samples);
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
u32 HashFletcher(const u8* data_u8, size_t length); // FAST. Length & 1 == 0.
|
||||
u32 HashAdler32(const u8* data, size_t len); // Fairly accurate, slightly slower
|
||||
u32 HashEctor(const u8* ptr, int length); // JUNK. DO NOT USE FOR NEW THINGS
|
||||
u64 GetCRC32(const u8 *src, u32 len, u32 samples); // SSE4.2 version of CRC32
|
||||
u64 GetHashHiresTexture(const u8 *src, u32 len, u32 samples = 0);
|
||||
u64 GetMurmurHash3(const u8 *src, u32 len, u32 samples);
|
||||
u64 GetHash64(const u8 *src, u32 len, u32 samples);
|
||||
u64 GetCRC32(const u8* src, u32 len, u32 samples); // SSE4.2 version of CRC32
|
||||
u64 GetHashHiresTexture(const u8* src, u32 len, u32 samples = 0);
|
||||
u64 GetMurmurHash3(const u8* src, u32 len, u32 samples);
|
||||
u64 GetHash64(const u8* src, u32 len, u32 samples);
|
||||
void SetHash64Function();
|
||||
|
@ -31,7 +31,7 @@ template <typename K, typename V>
|
||||
class LinearDiskCacheReader
|
||||
{
|
||||
public:
|
||||
virtual void Read(const K &key, const V *value, u32 value_size) = 0;
|
||||
virtual void Read(const K &key, const V* value, u32 value_size) = 0;
|
||||
};
|
||||
|
||||
// Dead simple unsorted key-value store with append functionality.
|
||||
@ -82,7 +82,7 @@ public:
|
||||
// good header, read some key/value pairs
|
||||
K key;
|
||||
|
||||
V *value = nullptr;
|
||||
V* value = nullptr;
|
||||
u32 value_size = 0;
|
||||
u32 entry_number = 0;
|
||||
|
||||
@ -142,7 +142,7 @@ public:
|
||||
}
|
||||
|
||||
// Appends a key-value pair to the store.
|
||||
void Append(const K &key, const V *value, u32 value_size)
|
||||
void Append(const K &key, const V* value, u32 value_size)
|
||||
{
|
||||
// TODO: Should do a check that we don't already have "key"? (I think each caller does that already.)
|
||||
Write(&value_size);
|
||||
@ -167,13 +167,13 @@ private:
|
||||
}
|
||||
|
||||
template <typename D>
|
||||
bool Write(const D *data, u32 count = 1)
|
||||
bool Write(const D* data, u32 count = 1)
|
||||
{
|
||||
return m_file.write((const char*)data, count * sizeof(D)).good();
|
||||
}
|
||||
|
||||
template <typename D>
|
||||
bool Read(const D *data, u32 count = 1)
|
||||
bool Read(const D* data, u32 count = 1)
|
||||
{
|
||||
return m_file.read((char*)data, count * sizeof(D)).good();
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ class LogManager : NonCopyable
|
||||
{
|
||||
private:
|
||||
LogContainer* m_Log[LogTypes::NUMBER_OF_LOGS];
|
||||
static LogManager *m_logManager; // Singleton. Ugh.
|
||||
static LogManager* m_logManager; // Singleton. Ugh.
|
||||
std::array<LogListener*, LogListener::NUMBER_OF_LISTENERS> m_listeners;
|
||||
|
||||
LogManager();
|
||||
@ -132,7 +132,7 @@ public:
|
||||
return m_Log[type]->GetFullName();
|
||||
}
|
||||
|
||||
void RegisterListener(LogListener::LISTENER id, LogListener *listener)
|
||||
void RegisterListener(LogListener::LISTENER id, LogListener* listener)
|
||||
{
|
||||
m_listeners[id] = listener;
|
||||
}
|
||||
@ -152,7 +152,7 @@ public:
|
||||
return m_logManager;
|
||||
}
|
||||
|
||||
static void SetInstance(LogManager *logManager)
|
||||
static void SetInstance(LogManager* logManager)
|
||||
{
|
||||
m_logManager = logManager;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ double ApproximateReciprocal(double val)
|
||||
|
||||
} // namespace
|
||||
|
||||
inline void MatrixMul(int n, const float *a, const float *b, float *result)
|
||||
inline void MatrixMul(int n, const float* a, const float* b, float* result)
|
||||
{
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
|
@ -95,12 +95,12 @@ void MemArena::ReleaseSHMSegment()
|
||||
}
|
||||
|
||||
|
||||
void *MemArena::CreateView(s64 offset, size_t size, void *base)
|
||||
void* MemArena::CreateView(s64 offset, size_t size, void* base)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return MapViewOfFileEx(hMemoryMapping, FILE_MAP_ALL_ACCESS, 0, (DWORD)((u64)offset), size, base);
|
||||
#else
|
||||
void *retval = mmap(
|
||||
void* retval = mmap(
|
||||
base, size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED | ((base == nullptr) ? 0 : MAP_FIXED),
|
||||
@ -172,7 +172,7 @@ u8* MemArena::FindMemoryBase()
|
||||
if (!(a_flags & MV_FAKE_VMEM) && (b_flags & MV_FAKE_VMEM)) \
|
||||
continue; \
|
||||
|
||||
static bool Memory_TryBase(u8 *base, MemoryView *views, int num_views, u32 flags, MemArena *arena)
|
||||
static bool Memory_TryBase(u8* base, MemoryView* views, int num_views, u32 flags, MemArena* arena)
|
||||
{
|
||||
// OK, we know where to find free space. Now grab it!
|
||||
// We just mimic the popular BAT setup.
|
||||
@ -223,7 +223,7 @@ static bool Memory_TryBase(u8 *base, MemoryView *views, int num_views, u32 flags
|
||||
return true;
|
||||
}
|
||||
|
||||
static u32 MemoryMap_InitializeViews(MemoryView *views, int num_views, u32 flags)
|
||||
static u32 MemoryMap_InitializeViews(MemoryView* views, int num_views, u32 flags)
|
||||
{
|
||||
u32 shm_position = 0;
|
||||
u32 last_position = 0;
|
||||
@ -245,14 +245,14 @@ static u32 MemoryMap_InitializeViews(MemoryView *views, int num_views, u32 flags
|
||||
return shm_position;
|
||||
}
|
||||
|
||||
u8 *MemoryMap_Setup(MemoryView *views, int num_views, u32 flags, MemArena *arena)
|
||||
u8* MemoryMap_Setup(MemoryView* views, int num_views, u32 flags, MemArena* arena)
|
||||
{
|
||||
u32 total_mem = MemoryMap_InitializeViews(views, num_views, flags);
|
||||
|
||||
arena->GrabSHMSegment(total_mem);
|
||||
|
||||
// Now, create views in high memory where there's plenty of space.
|
||||
u8 *base = MemArena::FindMemoryBase();
|
||||
u8* base = MemArena::FindMemoryBase();
|
||||
// This really shouldn't fail - in 64-bit, there will always be enough
|
||||
// address space.
|
||||
if (!Memory_TryBase(base, views, num_views, flags, arena))
|
||||
@ -265,7 +265,7 @@ u8 *MemoryMap_Setup(MemoryView *views, int num_views, u32 flags, MemArena *arena
|
||||
return base;
|
||||
}
|
||||
|
||||
void MemoryMap_Shutdown(MemoryView *views, int num_views, u32 flags, MemArena *arena)
|
||||
void MemoryMap_Shutdown(MemoryView* views, int num_views, u32 flags, MemArena* arena)
|
||||
{
|
||||
std::set<void*> freeset;
|
||||
for (int i = 0; i < num_views; i++)
|
||||
|
@ -21,11 +21,11 @@ class MemArena
|
||||
public:
|
||||
void GrabSHMSegment(size_t size);
|
||||
void ReleaseSHMSegment();
|
||||
void *CreateView(s64 offset, size_t size, void *base = nullptr);
|
||||
void ReleaseView(void *view, size_t size);
|
||||
void* CreateView(s64 offset, size_t size, void* base = nullptr);
|
||||
void ReleaseView(void* view, size_t size);
|
||||
|
||||
// This finds 1 GB in 32-bit, 16 GB in 64-bit.
|
||||
static u8 *FindMemoryBase();
|
||||
static u8* FindMemoryBase();
|
||||
private:
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -54,5 +54,5 @@ struct MemoryView
|
||||
|
||||
// Uses a memory arena to set up an emulator-friendly memory map according to
|
||||
// a passed-in list of MemoryView structures.
|
||||
u8 *MemoryMap_Setup(MemoryView *views, int num_views, u32 flags, MemArena *arena);
|
||||
void MemoryMap_Shutdown(MemoryView *views, int num_views, u32 flags, MemArena *arena);
|
||||
u8* MemoryMap_Setup(MemoryView* views, int num_views, u32 flags, MemArena* arena);
|
||||
void MemoryMap_Shutdown(MemoryView* views, int num_views, u32 flags, MemArena* arena);
|
||||
|
@ -62,7 +62,7 @@ const std::string SettingsHandler::GetValue(const std::string& key)
|
||||
|
||||
void SettingsHandler::Decrypt()
|
||||
{
|
||||
const u8 *str = m_buffer;
|
||||
const u8* str = m_buffer;
|
||||
while (*str != 0)
|
||||
{
|
||||
if (m_position >= SETTINGS_SIZE)
|
||||
@ -113,7 +113,7 @@ void SettingsHandler::WriteByte(u8 b)
|
||||
const std::string SettingsHandler::generateSerialNumber()
|
||||
{
|
||||
time_t rawtime;
|
||||
tm *timeinfo;
|
||||
tm* timeinfo;
|
||||
char buffer[12];
|
||||
char serialNumber[12];
|
||||
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
|
||||
void AddSetting(const std::string& key, const std::string& value);
|
||||
|
||||
const u8 *GetData() const;
|
||||
const u8* GetData() const;
|
||||
const std::string GetValue(const std::string& key);
|
||||
|
||||
void Decrypt();
|
||||
|
@ -145,7 +145,7 @@ std::string StringFromFormatV(const char* format, va_list args)
|
||||
}
|
||||
|
||||
// For Debugging. Read out an u8 array.
|
||||
std::string ArrayToString(const u8 *data, u32 size, int line_len, bool spaces)
|
||||
std::string ArrayToString(const u8* data, u32 size, int line_len, bool spaces)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << std::setfill('0') << std::hex;
|
||||
@ -188,7 +188,7 @@ std::string StripQuotes(const std::string& s)
|
||||
return s;
|
||||
}
|
||||
|
||||
bool TryParse(const std::string &str, u32 *const output)
|
||||
bool TryParse(const std::string &str, u32* const output)
|
||||
{
|
||||
char* endptr = nullptr;
|
||||
|
||||
@ -213,7 +213,7 @@ bool TryParse(const std::string &str, u32 *const output)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TryParse(const std::string &str, bool *const output)
|
||||
bool TryParse(const std::string &str, bool* const output)
|
||||
{
|
||||
if ("1" == str || !strcasecmp("true", str.c_str()))
|
||||
*output = true;
|
||||
|
@ -36,7 +36,7 @@ inline void CharArrayFromFormat(char (& out)[Count], const char* format, ...)
|
||||
}
|
||||
|
||||
// Good
|
||||
std::string ArrayToString(const u8 *data, u32 size, int line_len = 20, bool spaces = true);
|
||||
std::string ArrayToString(const u8* data, u32 size, int line_len = 20, bool spaces = true);
|
||||
|
||||
std::string StripSpaces(const std::string &s);
|
||||
std::string StripQuotes(const std::string &s);
|
||||
@ -59,11 +59,11 @@ std::string ThousandSeparate(I value, int spaces = 0)
|
||||
std::string StringFromInt(int value);
|
||||
std::string StringFromBool(bool value);
|
||||
|
||||
bool TryParse(const std::string &str, bool *output);
|
||||
bool TryParse(const std::string &str, u32 *output);
|
||||
bool TryParse(const std::string &str, bool* output);
|
||||
bool TryParse(const std::string &str, u32* output);
|
||||
|
||||
template <typename N>
|
||||
static bool TryParse(const std::string &str, N *const output)
|
||||
static bool TryParse(const std::string &str, N* const output)
|
||||
{
|
||||
std::istringstream iss(str);
|
||||
// is this right? not doing this breaks reading floats on locales that use different decimal separators
|
||||
|
@ -79,8 +79,8 @@ protected:
|
||||
public:
|
||||
SymbolDB() {}
|
||||
virtual ~SymbolDB() {}
|
||||
virtual Symbol *GetSymbolFromAddr(u32 addr) { return nullptr; }
|
||||
virtual Symbol *AddFunction(u32 startAddr) { return nullptr; }
|
||||
virtual Symbol* GetSymbolFromAddr(u32 addr) { return nullptr; }
|
||||
virtual Symbol* AddFunction(u32 startAddr) { return nullptr; }
|
||||
|
||||
void AddCompleteSymbol(const Symbol &symbol);
|
||||
|
||||
|
@ -81,7 +81,7 @@ bool SysConf::LoadFromFile(const std::string& filename)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SysConf::LoadFromFileInternal(FILE *fh)
|
||||
bool SysConf::LoadFromFileInternal(FILE* fh)
|
||||
{
|
||||
File::IOFile f(fh);
|
||||
// Fill in infos
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
void UpdateLocation();
|
||||
|
||||
private:
|
||||
bool LoadFromFileInternal(FILE *fh);
|
||||
bool LoadFromFileInternal(FILE* fh);
|
||||
void GenerateSysConf();
|
||||
void Clear();
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <Windows.h>
|
||||
|
||||
struct PatchInfo {
|
||||
const wchar_t *module_name;
|
||||
const wchar_t* module_name;
|
||||
u32 checksum;
|
||||
u32 rva;
|
||||
u32 length;
|
||||
@ -35,7 +35,7 @@ bool ApplyPatch(const PatchInfo &patch) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void *patch_addr = (void *)((uintptr_t)module + patch.rva);
|
||||
void* patch_addr = (void *)((uintptr_t)module + patch.rva);
|
||||
size_t patch_size = patch.length;
|
||||
|
||||
DWORD old_protect;
|
||||
|
@ -81,7 +81,7 @@ void XEmitter::ABI_PopRegistersAndAdjustStack(BitSet32 mask, size_t rsp_alignmen
|
||||
}
|
||||
|
||||
// Common functions
|
||||
void XEmitter::ABI_CallFunction(const void *func)
|
||||
void XEmitter::ABI_CallFunction(const void* func)
|
||||
{
|
||||
u64 distance = u64(func) - (u64(code) + 5);
|
||||
if (distance >= 0x0000000080000000ULL &&
|
||||
@ -97,40 +97,40 @@ void XEmitter::ABI_CallFunction(const void *func)
|
||||
}
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC16(const void *func, u16 param1)
|
||||
void XEmitter::ABI_CallFunctionC16(const void* func, u16 param1)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32((u32)param1));
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionCC16(const void *func, u32 param1, u16 param2)
|
||||
void XEmitter::ABI_CallFunctionCC16(const void* func, u32 param1, u16 param2)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
MOV(32, R(ABI_PARAM2), Imm32((u32)param2));
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionC(const void *func, u32 param1)
|
||||
void XEmitter::ABI_CallFunctionC(const void* func, u32 param1)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionCC(const void *func, u32 param1, u32 param2)
|
||||
void XEmitter::ABI_CallFunctionCC(const void* func, u32 param1, u32 param2)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
MOV(32, R(ABI_PARAM2), Imm32(param2));
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionCP(const void *func, u32 param1, void *param2)
|
||||
void XEmitter::ABI_CallFunctionCP(const void* func, u32 param1, void* param2)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
MOV(64, R(ABI_PARAM2), Imm64((u64)param2));
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionCCC(const void *func, u32 param1, u32 param2, u32 param3)
|
||||
void XEmitter::ABI_CallFunctionCCC(const void* func, u32 param1, u32 param2, u32 param3)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
MOV(32, R(ABI_PARAM2), Imm32(param2));
|
||||
@ -138,7 +138,7 @@ void XEmitter::ABI_CallFunctionCCC(const void *func, u32 param1, u32 param2, u32
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionCCP(const void *func, u32 param1, u32 param2, void *param3)
|
||||
void XEmitter::ABI_CallFunctionCCP(const void* func, u32 param1, u32 param2, void* param3)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
MOV(32, R(ABI_PARAM2), Imm32(param2));
|
||||
@ -146,7 +146,7 @@ void XEmitter::ABI_CallFunctionCCP(const void *func, u32 param1, u32 param2, voi
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionCCCP(const void *func, u32 param1, u32 param2, u32 param3, void *param4)
|
||||
void XEmitter::ABI_CallFunctionCCCP(const void* func, u32 param1, u32 param2, u32 param3, void* param4)
|
||||
{
|
||||
MOV(32, R(ABI_PARAM1), Imm32(param1));
|
||||
MOV(32, R(ABI_PARAM2), Imm32(param2));
|
||||
@ -155,14 +155,14 @@ void XEmitter::ABI_CallFunctionCCCP(const void *func, u32 param1, u32 param2, u3
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionPC(const void *func, void *param1, u32 param2)
|
||||
void XEmitter::ABI_CallFunctionPC(const void* func, void* param1, u32 param2)
|
||||
{
|
||||
MOV(64, R(ABI_PARAM1), Imm64((u64)param1));
|
||||
MOV(32, R(ABI_PARAM2), Imm32(param2));
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionPPC(const void *func, void *param1, void *param2, u32 param3)
|
||||
void XEmitter::ABI_CallFunctionPPC(const void* func, void* param1, void* param2, u32 param3)
|
||||
{
|
||||
MOV(64, R(ABI_PARAM1), Imm64((u64)param1));
|
||||
MOV(64, R(ABI_PARAM2), Imm64((u64)param2));
|
||||
@ -171,7 +171,7 @@ void XEmitter::ABI_CallFunctionPPC(const void *func, void *param1, void *param2,
|
||||
}
|
||||
|
||||
// Pass a register as a parameter.
|
||||
void XEmitter::ABI_CallFunctionR(const void *func, X64Reg reg1)
|
||||
void XEmitter::ABI_CallFunctionR(const void* func, X64Reg reg1)
|
||||
{
|
||||
if (reg1 != ABI_PARAM1)
|
||||
MOV(32, R(ABI_PARAM1), R(reg1));
|
||||
@ -179,7 +179,7 @@ void XEmitter::ABI_CallFunctionR(const void *func, X64Reg reg1)
|
||||
}
|
||||
|
||||
// Pass two registers as parameters.
|
||||
void XEmitter::ABI_CallFunctionRR(const void *func, X64Reg reg1, X64Reg reg2)
|
||||
void XEmitter::ABI_CallFunctionRR(const void* func, X64Reg reg1, X64Reg reg2)
|
||||
{
|
||||
MOVTwo(64, ABI_PARAM1, reg1, 0, ABI_PARAM2, reg2);
|
||||
ABI_CallFunction(func);
|
||||
@ -217,7 +217,7 @@ void XEmitter::MOVTwo(int bits, Gen::X64Reg dst1, Gen::X64Reg src1, s32 offset1,
|
||||
}
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionAC(int bits, const void *func, const Gen::OpArg &arg1, u32 param2)
|
||||
void XEmitter::ABI_CallFunctionAC(int bits, const void* func, const Gen::OpArg &arg1, u32 param2)
|
||||
{
|
||||
if (!arg1.IsSimpleReg(ABI_PARAM1))
|
||||
MOV(bits, R(ABI_PARAM1), arg1);
|
||||
@ -225,7 +225,7 @@ void XEmitter::ABI_CallFunctionAC(int bits, const void *func, const Gen::OpArg &
|
||||
ABI_CallFunction(func);
|
||||
}
|
||||
|
||||
void XEmitter::ABI_CallFunctionA(int bits, const void *func, const Gen::OpArg &arg1)
|
||||
void XEmitter::ABI_CallFunctionA(int bits, const void* func, const Gen::OpArg &arg1)
|
||||
{
|
||||
if (!arg1.IsSimpleReg(ABI_PARAM1))
|
||||
MOV(bits, R(ABI_PARAM1), arg1);
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "Common/x64Analyzer.h"
|
||||
|
||||
bool DisassembleMov(const unsigned char* codePtr, InstructionInfo *info)
|
||||
bool DisassembleMov(const unsigned char* codePtr, InstructionInfo* info)
|
||||
{
|
||||
unsigned const char* startCodePtr = codePtr;
|
||||
u8 rex = 0;
|
||||
|
@ -41,4 +41,4 @@ enum AccessType
|
||||
OP_ACCESS_WRITE = 1
|
||||
};
|
||||
|
||||
bool DisassembleMov(const unsigned char* codePtr, InstructionInfo *info);
|
||||
bool DisassembleMov(const unsigned char* codePtr, InstructionInfo* info);
|
||||
|
Loading…
x
Reference in New Issue
Block a user