add big endian platform support

This commit is contained in:
kub 2021-02-22 22:25:03 +01:00
parent b053cb2044
commit 57c5a5e505
21 changed files with 224 additions and 178 deletions

View file

@ -183,19 +183,22 @@
// internals core macros
/////////////////////////
#define XB MEM_LE4(0)
#define XW MEM_LE2(0)
#define DREG(X) (ctx->dreg[(X)].D)
#define DREGu32(X) (ctx->dreg[(X)].D)
#define DREGs32(X) (ctx->dreg[(X)].SD)
#define DREGu16(X) (ctx->dreg[(X)].W)
#define DREGs16(X) (ctx->dreg[(X)].SW)
#define DREGu8(X) (ctx->dreg[(X)].B)
#define DREGs8(X) (ctx->dreg[(X)].SB)
#define DREGu16(X) (ctx->dreg[(X)].W[XW])
#define DREGs16(X) (ctx->dreg[(X)].SW[XW])
#define DREGu8(X) (ctx->dreg[(X)].B[XB])
#define DREGs8(X) (ctx->dreg[(X)].SB[XB])
#define AREG(X) (ctx->areg[(X)].D)
#define AREGu32(X) (ctx->areg[(X)].D)
#define AREGs32(X) (ctx->areg[(X)].SD)
#define AREGu16(X) (ctx->areg[(X)].W)
#define AREGs16(X) (ctx->areg[(X)].SW)
#define AREGu16(X) (ctx->areg[(X)].W[XW])
#define AREGs16(X) (ctx->areg[(X)].SW[XW])
#define ASP (ctx->asp)