This commit is contained in:
Sajid
2024-09-13 20:53:21 +06:00
2 changed files with 6 additions and 14 deletions

View File

@@ -9,6 +9,7 @@
#define _byteswap_ushort __builtin_bswap16
#define _byteswap_ulong __builtin_bswap32
#define _byteswap_uint64 __builtin_bswap64
#define isnan __builtin_isnan
#define PPC_FUNC __attribute__((weak,noinline))
#else
#include <intrin.h>
@@ -25,6 +26,8 @@
#define PPC_STORE_U32(x, y) *(uint32_t*)(base + (x)) = _byteswap_ulong(y)
#define PPC_STORE_U64(x, y) *(uint64_t*)(base + (x)) = _byteswap_uint64(y)
typedef void PPCFunc(struct PPCContext& __restrict ctx, uint8_t* base);
struct PPCRegister
{
union
@@ -82,6 +85,7 @@ typedef float float128[4];
struct PPCContext
{
PPCFunc** fn;
uint64_t lr;
uint64_t ctr;
PPCXERRegister xer;