Merge pull request #1218 from SuperDude88/main

More Consistent Macro Usage
This commit is contained in:
LagoLunatic
2026-09-25 19:15:55 -04:00
committed by GitHub
40 changed files with 287 additions and 285 deletions
+4 -4
View File
@@ -157,7 +157,7 @@ struct J3DIndTexOrderInfo {
};
struct J3DTevSwapModeInfo {
/* 0x0 */ u8 mRasSel ALIGN_DECL(4);
/* 0x0 */ ALIGN_DECL(4, u8 mRasSel);
/* 0x1 */ u8 mTexSel;
};
@@ -192,7 +192,7 @@ struct J3DTevStageInfo {
};
struct J3DIndTevStageInfo {
/* 0x0 */ u8 mIndStage ALIGN_DECL(4);
/* 0x0 */ ALIGN_DECL(4, u8 mIndStage);
/* 0x1 */ u8 mIndFormat;
/* 0x2 */ u8 mBiasSel;
/* 0x3 */ u8 mMtxSel;
@@ -210,7 +210,7 @@ struct J3DTexCoordInfo {
mTexGenMtx = other.mTexGenMtx;
}
/* 0x0 */ u8 mTexGenType ALIGN_DECL(4);
/* 0x0 */ ALIGN_DECL(4, u8 mTexGenType);
/* 0x1 */ u8 mTexGenSrc;
/* 0x2 */ u8 mTexGenMtx;
};
@@ -235,7 +235,7 @@ struct J3DBlendInfo {
};
struct J3DTevOrderInfo {
/* 0x0 */ u8 mTexCoord ALIGN_DECL(2);
/* 0x0 */ ALIGN_DECL(2, u8 mTexCoord);
/* 0x1 */ u8 mTexMap;
/* 0x2 */ u8 mColorChan;
};
+4 -4
View File
@@ -42,7 +42,7 @@ void J3DPSMtx33Copy(Mtx3P src, Mtx3P dst);
void J3DPSMtx33CopyFrom34(MtxP src, Mtx3P dst);
void J3DPSMtxArrayConcat(Mtx, Mtx, Mtx, u32);
inline void J3DPSMulMtxVec(register MtxP mtx, register Vec* vec, register Vec* dst) {
inline void J3DPSMulMtxVec(__REGISTER MtxP mtx, __REGISTER Vec* vec, __REGISTER Vec* dst) {
#ifdef __MWERKS__
asm {
psq_l f0, 0(vec), 0, 0
@@ -69,7 +69,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register Vec* vec, register Vec* d
#endif
}
inline void J3DPSMulMtxVec(register MtxP mtx, register S16Vec* vec, register S16Vec* dst) {
inline void J3DPSMulMtxVec(__REGISTER MtxP mtx, __REGISTER S16Vec* vec, __REGISTER S16Vec* dst) {
#ifdef __MWERKS__
asm {
psq_l f0, 0(vec), 0, 7
@@ -97,7 +97,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register S16Vec* vec, register S16
}
// regalloc issues
inline void J3DPSMulMtxVec(register Mtx3P mtx, register Vec* vec, register Vec* dst) {
inline void J3DPSMulMtxVec(__REGISTER Mtx3P mtx, __REGISTER Vec* vec, __REGISTER Vec* dst) {
#ifdef __MWERKS__
asm {
lis r6, PSMulUnit01@ha
@@ -129,7 +129,7 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register Vec* vec, register Vec*
}
// regalloc issues
inline void J3DPSMulMtxVec(register Mtx3P mtx, register S16Vec* vec, register S16Vec* dst) {
inline void J3DPSMulMtxVec(__REGISTER Mtx3P mtx, __REGISTER S16Vec* vec, __REGISTER S16Vec* dst) {
#ifdef __MWERKS__
asm {
lis r6, PSMulUnit01@ha
+1 -1
View File
@@ -16,7 +16,7 @@ namespace JASystem {
void start(JKRSolidHeap*, u32, u32);
extern OSThread sAudioThread;
extern u8 saAudioStack[4096] ALIGN_DECL(32);
ALIGN_DECL(32, extern u8 saAudioStack[4096]);
extern OSMessageQueue sAudioprocMQ;
extern OSMessage saAudioMsgBuf[16];
extern u32 sAudioprocMQInit;
+2 -2
View File
@@ -9,8 +9,8 @@ namespace JASystem {
extern f32 C5BASE_PITCHTABLE[];
}
namespace DSPInterface {
extern u16 DSPADPCM_FILTER[] ALIGN_DECL(32);
extern u16 DSPRES_FILTER[] ALIGN_DECL(32);
ALIGN_DECL(32, extern u16 DSPADPCM_FILTER[]);
ALIGN_DECL(32, extern u16 DSPRES_FILTER[]);
}
}
+27 -27
View File
@@ -13,8 +13,8 @@ inline f32 JMAFastReciprocal(f32 value) {
return __fres(value);
}
inline float __frsqrtes(register double f) {
register float out;
inline float __frsqrtes(__REGISTER double f) {
__REGISTER float out;
// clang-format off
#ifdef __MWERKS__
asm {
@@ -25,9 +25,9 @@ inline float __frsqrtes(register double f) {
return out;
}
inline f32 JMAFastSqrt(register f32 input) {
inline f32 JMAFastSqrt(__REGISTER f32 input) {
if (input > 0.0f) {
register f32 out;
__REGISTER f32 out;
#ifdef __MWERKS__
asm {
frsqrte out, input
@@ -45,9 +45,9 @@ inline f32 fastReciprocal(f32 value) {
return JMAFastReciprocal(value);
}
inline void gekko_ps_copy3(register void* dst, register const void* src) {
register f32 src0;
register f32 src1;
inline void gekko_ps_copy3(__REGISTER void* dst, __REGISTER const void* src) {
__REGISTER f32 src0;
__REGISTER f32 src1;
#ifdef __MWERKS__
asm {
psq_l src0, 0(src), 0, 0
@@ -58,10 +58,10 @@ inline void gekko_ps_copy3(register void* dst, register const void* src) {
#endif
}
inline void gekko_ps_copy6(register void* dst, register const void* src) {
register f32 src0;
register f32 src1;
register f32 src2;
inline void gekko_ps_copy6(__REGISTER void* dst, __REGISTER const void* src) {
__REGISTER f32 src0;
__REGISTER f32 src1;
__REGISTER f32 src2;
#ifdef __MWERKS__
asm {
psq_l src0, 0(src), 0, 0
@@ -74,13 +74,13 @@ inline void gekko_ps_copy6(register void* dst, register const void* src) {
#endif
}
inline void gekko_ps_copy12(register void* dst, register const void* src) {
register f32 src0;
register f32 src1;
register f32 src2;
register f32 src3;
register f32 src4;
register f32 src5;
inline void gekko_ps_copy12(__REGISTER void* dst, __REGISTER const void* src) {
__REGISTER f32 src0;
__REGISTER f32 src1;
__REGISTER f32 src2;
__REGISTER f32 src3;
__REGISTER f32 src4;
__REGISTER f32 src5;
#ifdef __MWERKS__
asm {
psq_l src0, 0(src), 0, 0
@@ -99,15 +99,15 @@ inline void gekko_ps_copy12(register void* dst, register const void* src) {
#endif
}
inline void gekko_ps_copy16(register void* dst, register const void* src) {
register f32 src0;
register f32 src1;
register f32 src2;
register f32 src3;
register f32 src4;
register f32 src5;
register f32 src6;
register f32 src7;
inline void gekko_ps_copy16(__REGISTER void* dst, __REGISTER const void* src) {
__REGISTER f32 src0;
__REGISTER f32 src1;
__REGISTER f32 src2;
__REGISTER f32 src3;
__REGISTER f32 src4;
__REGISTER f32 src5;
__REGISTER f32 src6;
__REGISTER f32 src7;
#ifdef __MWERKS__
asm {
psq_l src0, 0(src), 0, 0
@@ -3,6 +3,6 @@
#include "global.h"
extern const u8 JUTResFONT_Ascfont_fix12[] ALIGN_DECL(32);
ALIGN_DECL(32, extern const u8 JUTResFONT_Ascfont_fix12[]);
#endif /* JUTFONTDATA_ASCFONT_FIX12_H */
+2 -2
View File
@@ -128,13 +128,13 @@ public:
struct daAgb_Item {
/* 0x0 */ u8 field_0x0;
/* 0x1 */ u8 field_0x1;
} ALIGN_DECL(4);
} ATTRIBUTE_ALIGN(4);
struct daAgb_Shop {
/* 0x0 */ u8 field_0x0;
/* 0x1 */ u8 field_0x1;
/* 0x2 */ u8 field_0x2;
} ALIGN_DECL(4);
} ATTRIBUTE_ALIGN(4);
static int mEffect;
static daAgb_ItemBuy mItemBuy;
+13 -13
View File
@@ -467,25 +467,25 @@ typedef union {
#endif
u32 PPCMfmsr(void);
void PPCMtmsr(register u32 newMSR);
void PPCMtmsr(__REGISTER u32 newMSR);
u32 PPCMfhid0(void);
void PPCMthid0(register u32 newHID0);
void PPCMthid0(__REGISTER u32 newHID0);
u32 PPCMfl2cr(void);
void PPCMtl2cr(register u32 newL2cr);
void PPCMtdec(register u32 newDec);
void PPCMtl2cr(__REGISTER u32 newL2cr);
void PPCMtdec(__REGISTER u32 newDec);
void PPCSync(void);
void PPCHalt(void);
void PPCMtmmcr0(register u32 newMmcr0);
void PPCMtmmcr1(register u32 newMmcr1);
void PPCMtpmc1(register u32 newPmc1);
void PPCMtpmc2(register u32 newPmc2);
void PPCMtpmc3(register u32 newPmc3);
void PPCMtpmc4(register u32 newPmc4);
void PPCMtmmcr0(__REGISTER u32 newMmcr0);
void PPCMtmmcr1(__REGISTER u32 newMmcr1);
void PPCMtpmc1(__REGISTER u32 newPmc1);
void PPCMtpmc2(__REGISTER u32 newPmc2);
void PPCMtpmc3(__REGISTER u32 newPmc3);
void PPCMtpmc4(__REGISTER u32 newPmc4);
u32 PPCMffpscr(void);
void PPCMtfpscr(register u32 newFPSCR);
void PPCMtfpscr(__REGISTER u32 newFPSCR);
u32 PPCMfhid2(void);
void PPCMthid2(register u32 newhid2);
void PPCMtwpar(register u32 newwpar);
void PPCMthid2(__REGISTER u32 newhid2);
void PPCMtwpar(__REGISTER u32 newwpar);
void PPCDisableSpeculation(void);
void PPCSetFpNonIEEEMode(void);
+1 -1
View File
@@ -88,7 +88,7 @@ typedef struct DVDDriveInfo {
/* 0x02 */ u16 device_code;
/* 0x04 */ u32 release_date;
/* 0x08 */ u8 padding[24];
} DVDDriveInfo ALIGN_DECL(32);
} ALIGN_DECL(32, DVDDriveInfo);
typedef struct DVDBB1 {
u32 appLoaderLength;
+1 -1
View File
@@ -22,7 +22,7 @@ typedef struct GBASecParam {
/* 0x20 */ u32 keyA;
/* 0x24 */ s32 keyB;
/* 0x28 */ u8 _padding1[24];
} GBASecParam ALIGN_DECL(32); // Size: 0x40
} ALIGN_DECL(32, GBASecParam); // Size: 0x40
typedef struct GBABootInfo {
/* 0x00 */ s32 paletteColor;
+9 -9
View File
@@ -117,10 +117,10 @@ u32 __OSGetDIConfig(void);
void OSRegisterVersion(const char* version);
void OSSwitchFiberEx(u32, u32, u32, u32, u32, u32);
inline s16 __OSf32tos16(register f32 inF) {
register s16 out;
inline s16 __OSf32tos16(__REGISTER f32 inF) {
__REGISTER s16 out;
u32 tmp;
register u32* tmpPtr = &tmp;
__REGISTER u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
@@ -137,10 +137,10 @@ inline void OSf32tos16(f32* f, s16* out) {
*out = __OSf32tos16(*f);
}
inline u8 __OSf32tou8(register f32 inF) {
register u8 out;
inline u8 __OSf32tou8(__REGISTER f32 inF) {
__REGISTER u8 out;
u32 tmp;
register u32* tmpPtr = &tmp;
__REGISTER u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
@@ -157,10 +157,10 @@ inline void OSf32tou8(f32* f, u8* out) {
*out = __OSf32tou8(*f);
}
inline s8 __OSf32tos8(register f32 inF) {
register u8 out;
inline s8 __OSf32tos8(__REGISTER f32 inF) {
__REGISTER u8 out;
u32 tmp;
register u32* tmpPtr = &tmp;
__REGISTER u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
+2 -2
View File
@@ -34,14 +34,14 @@
#define GLUE(a, b) a##b
#define GLUE2(a, b) GLUE(a, b)
#define STATIC_ASSERT(cond) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]
#define ALIGN_DECL(ALIGNMENT) __attribute__((aligned(ALIGNMENT)))
#define ALIGN_DECL(alignment, decl) decl ATTRIBUTE_ALIGN(alignment)
#define SECTION_DATA __declspec(section ".data")
#define SECTION_INIT __declspec(section ".init")
#define ASM asm
#define WEAKFUNC __declspec(weak)
#else
#define STATIC_ASSERT(...)
#define ALIGN_DECL(...)
#define ALIGN_DECL(alignment, decl) ATTRIBUTE_ALIGN(alignment) decl
#define SECTION_DATA
#define SECTION_INIT
#define ASM
+2 -2
View File
@@ -106,8 +106,8 @@ private:
}; // Size = 0x28
struct mDoDvdThdStack {
u8 stack[4096];
} ALIGN_DECL(32);
ALIGN_DECL(32, u8 stack[4096]);
};
struct mDoDvdThd {
static s32 main(void*);
@@ -330,14 +330,14 @@ f32 J3DHermiteInterpolationS(f32 t, s16* time0, s16* value0, s16* tangent0, s16*
return (t1 * kt * kt + (timeRange * *(f32*)tangent0 + t2) * kt + v0) - t2;
*/
register f32 p1 = t;
register s16* p2 = time0;
register s16* p3 = value0;
register s16* p4 = tangent0;
register s16* p5 = time1;
register s16* p6 = value1;
register s16* p7 = tangent1;
register f32 fout;
__REGISTER f32 p1 = t;
__REGISTER s16* p2 = time0;
__REGISTER s16* p3 = value0;
__REGISTER s16* p4 = tangent0;
__REGISTER s16* p5 = time1;
__REGISTER s16* p6 = value1;
__REGISTER s16* p7 = tangent1;
__REGISTER f32 fout;
#ifdef __MWERKS__
asm {
psq_l f0, 0(p2), 0x1, 5
+1 -1
View File
@@ -102,7 +102,7 @@ void J3DFifoLoadNrmMtxImm3x3(Mtx33 mtx, u32 idx) {
J3DGXCmd1f32ptr(&mtx[2][2]);
}
u8 NullTexData[16] ALIGN_DECL(32) = {
ALIGN_DECL(32, u8 NullTexData[16]) = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+18 -18
View File
@@ -29,7 +29,7 @@ const Mtx j3dDefaultMtx = {
};
/* 802DA0A8-802DA0B0 .text __MTGQR7__FUl */
void __MTGQR7(register u32 v) {
void __MTGQR7(__REGISTER u32 v) {
#ifdef __MWERKS__
asm {
mtspr GQR7, v
@@ -105,7 +105,7 @@ void J3DCalcYBBoardMtx(Mtx mtx) {
}
/* 802DA584-802DA64C .text J3DPSCalcInverseTranspose__FPA4_fPA3_f */
ASM void J3DPSCalcInverseTranspose(register Mtx src, register Mtx33 dst) {
ASM void J3DPSCalcInverseTranspose(__REGISTER Mtx src, __REGISTER Mtx33 dst) {
#ifdef __MWERKS__
psq_l f0, 0(src), 1, 0
psq_l f1, 4(src), 0, 0
@@ -311,8 +311,8 @@ void J3DGetTextureMtxMayaOld(const J3DTextureSRTInfo& srt, Mtx dst) {
}
/* 802DAB04-802DAB68 .text J3DScaleNrmMtx__FPA4_fRC3Vec */
void J3DScaleNrmMtx(register Mtx mtx, const register Vec& scl) {
register f32 mtx_xy, mtx_z_, scl_xy, scl_z_;
void J3DScaleNrmMtx(__REGISTER Mtx mtx, const __REGISTER Vec& scl) {
__REGISTER f32 mtx_xy, mtx_z_, scl_xy, scl_z_;
#ifdef __MWERKS__
asm {
@@ -350,11 +350,11 @@ asm {
}
/* 802DAB68-802DABBC .text J3DScaleNrmMtx33__FPA3_fRC3Vec */
void J3DScaleNrmMtx33(register Mtx33 mtx, const register Vec& scl) {
register f32 mtx0_xy, mtx0_z_;
register f32 mtx1_xy, mtx1_z_;
register f32 mtx2_xy, mtx2_z_;
register f32 scl__xy, scl__z_;
void J3DScaleNrmMtx33(__REGISTER Mtx33 mtx, const __REGISTER Vec& scl) {
__REGISTER f32 mtx0_xy, mtx0_z_;
__REGISTER f32 mtx1_xy, mtx1_z_;
__REGISTER f32 mtx2_xy, mtx2_z_;
__REGISTER f32 scl__xy, scl__z_;
#ifdef __MWERKS__
asm {
@@ -383,7 +383,7 @@ asm {
}
/* 802DABBC-802DACE0 .text J3DMtxProjConcat__FPA4_fPA4_fPA4_f */
void J3DMtxProjConcat(register Mtx a, register Mtx b, register Mtx dst) {
void J3DMtxProjConcat(__REGISTER Mtx a, __REGISTER Mtx b, __REGISTER Mtx dst) {
/* Nonmatching */
#ifdef __MWERKS__
asm {
@@ -470,12 +470,12 @@ void J3DMtxProjConcat(register Mtx a, register Mtx b, register Mtx dst) {
}
/* 802DACE0-802DAD0C .text J3DPSMtx33Copy__FPA3_fPA3_f */
void J3DPSMtx33Copy(register Mtx3P src, register Mtx3P dst) {
register f32 x1_y1;
register f32 z1_x2;
register f32 y2_z2;
register f32 x3_y3;
register f32 z3;
void J3DPSMtx33Copy(__REGISTER Mtx3P src, __REGISTER Mtx3P dst) {
__REGISTER f32 x1_y1;
__REGISTER f32 z1_x2;
__REGISTER f32 y2_z2;
__REGISTER f32 x3_y3;
__REGISTER f32 z3;
#ifdef __MWERKS__
asm {
@@ -494,7 +494,7 @@ asm {
}
/* 802DAD0C-802DAD40 .text J3DPSMtx33CopyFrom34__FPA4_fPA3_f */
void J3DPSMtx33CopyFrom34(register MtxP src, register Mtx3P dst) {
void J3DPSMtx33CopyFrom34(__REGISTER MtxP src, __REGISTER Mtx3P dst) {
#ifdef __MWERKS__
asm {
psq_l f0, 0(src), 0, 0
@@ -516,7 +516,7 @@ asm {
static f32 Unit01[2] = { 0.0f, 1.0f };
/* 802DAD40-802DAE1C .text J3DPSMtxArrayConcat__FPA4_fPA4_fPA4_fUl */
ASM void J3DPSMtxArrayConcat(register Mtx mA, register Mtx mB, register Mtx mAB, register u32 count) {
ASM void J3DPSMtxArrayConcat(__REGISTER Mtx mA, __REGISTER Mtx mB, __REGISTER Mtx mAB, __REGISTER u32 count) {
#ifdef __MWERKS__
nofralloc
+2 -2
View File
@@ -488,9 +488,9 @@ static u8 jdsp[] = {
0x80, 0x01, 0x02, 0xBF, 0x00, 0xEB, 0x02, 0xDF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static DSPTaskInfo audio_task ALIGN_DECL(32);
ALIGN_DECL(32, static DSPTaskInfo audio_task);
static u8 AUDIO_YIELD_BUFFER[8192] ALIGN_DECL(32);
ALIGN_DECL(32, static u8 AUDIO_YIELD_BUFFER[8192]);
/* 8028E8A0-8028E94C .text DspBoot__FPFPv_v */
void DspBoot(void (*param_1)(void*)) {
+1 -1
View File
@@ -24,7 +24,7 @@ Mtx e_mtx = {
{0.0f, 0.0f, 1.0f, 0.0f},
};
static GXTexObj clear_z_tobj;
u8 clear_z_TX[64] ALIGN_DECL(32) = {
ALIGN_DECL(32, u8 clear_z_TX[64]) = {
0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF,
0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+2 -2
View File
@@ -68,7 +68,7 @@ DSError TRKDoSupportMask(TRKBuffer*) {
}
DSError TRKDoReadMemory(TRKBuffer* buffer) {
u8 buf[0x820] ATTRIBUTE_ALIGN(32);
ALIGN_DECL(32, u8 buf[0x820]);
size_t tempLength;
int result;
int replyErr;
@@ -138,7 +138,7 @@ DSError TRKDoReadMemory(TRKBuffer* buffer) {
}
DSError TRKDoWriteMemory(TRKBuffer* b) {
u8 buf[0x820] ATTRIBUTE_ALIGN(32);
ALIGN_DECL(32, u8 buf[0x820]);
size_t tempLength;
int options;
int result;
+4 -4
View File
@@ -99,13 +99,13 @@ void daBoomerang_blur_c::copyBlur(MtxP mtx, s16 yRot) {
void daBoomerang_blur_c::draw() {
#include "assets/l_matDL__draw__18daBoomerang_blur_cFv.h"
static GXVtxDescList l_vtxDescList[] ALIGN_DECL(32) = {
ALIGN_DECL(32, static GXVtxDescList l_vtxDescList[]) = {
{GX_VA_POS, GX_DIRECT},
{GX_VA_TEX0, GX_DIRECT},
{GX_VA_NULL, GX_NONE},
};
static GXVtxAttrFmtList l_vtxAttrFmtList[] ALIGN_DECL(32) = {
ALIGN_DECL(32, static GXVtxAttrFmtList l_vtxAttrFmtList[]) = {
{GX_VA_POS, GX_POS_XYZ, GX_F32, 0x00},
{GX_VA_TEX0, GX_TEX_ST, GX_S16, 0x08},
{GX_VA_NULL, GX_POS_XYZ, GX_F32, 0x00},
@@ -186,13 +186,13 @@ void daBoomerang_blur_c::draw() {
/* 800E13A4-800E14F0 .text draw__25daBoomerang_sightPacket_cFv */
void daBoomerang_sightPacket_c::draw() {
static GXVtxDescList l_vtxDescList[] ALIGN_DECL(32) = {
ALIGN_DECL(32, static GXVtxDescList l_vtxDescList[]) = {
{GX_VA_POS, GX_DIRECT},
{GX_VA_TEX0, GX_DIRECT},
{GX_VA_NULL, GX_NONE},
};
static GXVtxAttrFmtList l_vtxAttrFmtList[] ALIGN_DECL(32) = {
ALIGN_DECL(32, static GXVtxAttrFmtList l_vtxAttrFmtList[]) = {
{GX_VA_POS, GX_POS_XYZ, GX_S8, 0x00},
{GX_VA_TEX0, GX_TEX_ST, GX_U8, 0x00},
{GX_VA_NULL, GX_POS_XYZ, GX_F32, 0x00},
+111 -111
View File
@@ -28,19 +28,19 @@ inline s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer* readBuf) {
static u8 THPStatistics[1120];
static THPHuffmanTab* Ydchuff ALIGN_DECL(32);
static THPHuffmanTab* Udchuff ALIGN_DECL(32);
static THPHuffmanTab* Vdchuff ALIGN_DECL(32);
static THPHuffmanTab* Yachuff ALIGN_DECL(32);
static THPHuffmanTab* Uachuff ALIGN_DECL(32);
static THPHuffmanTab* Vachuff ALIGN_DECL(32);
static f32 __THPIDCTWorkspace[64] ALIGN_DECL(32);
ALIGN_DECL(32, static THPHuffmanTab* Ydchuff);
ALIGN_DECL(32, static THPHuffmanTab* Udchuff);
ALIGN_DECL(32, static THPHuffmanTab* Vdchuff);
ALIGN_DECL(32, static THPHuffmanTab* Yachuff);
ALIGN_DECL(32, static THPHuffmanTab* Uachuff);
ALIGN_DECL(32, static THPHuffmanTab* Vachuff);
ALIGN_DECL(32, static f32 __THPIDCTWorkspace[64]);
static u8* __THPHuffmanBits;
static u8* __THPHuffmanSizeTab;
static u16* __THPHuffmanCodeTab;
static THPSample* Gbase ALIGN_DECL(32);
static u32 Gwid ALIGN_DECL(32);
static f32* Gq ALIGN_DECL(32);
ALIGN_DECL(32, static THPSample* Gbase);
ALIGN_DECL(32, static u32 Gwid);
ALIGN_DECL(32, static f32* Gq);
static u8* __THPLCWork512[3];
static u8* __THPLCWork640[3];
static u32 __THPOldGQR5;
@@ -94,7 +94,7 @@ static OSMessage daMP_FreeAudioBufferMessage[3];
static OSMessage daMP_DecodedAudioBufferMessage[3];
static BOOL daMP_Initialized;
static u32 daMP_WorkBuffer[16] ALIGN_DECL(32);
ALIGN_DECL(32, static u32 daMP_WorkBuffer[16]);
static OSMessageQueue daMP_PrepareReadyQueue;
static OSMessageQueue daMP_UsedTextureSetQueue;
static OSMessage daMP_PrepareReadyMessage;
@@ -107,7 +107,7 @@ static u32 daMP_OldAIDCallback;
static void* daMP_LastAudioBuffer;
static void* daMP_CurAudioBuffer;
static s32 daMP_AudioSystem;
static s16 daMP_SoundBuffer[2][0x460] ALIGN_DECL(32);
ALIGN_DECL(32, static s16 daMP_SoundBuffer[2][0x460]);
static THPVideoInfo daMP_videoInfo;
static THPAudioInfo daMP_audioInfo;
@@ -761,7 +761,7 @@ static void __THPDecompressYUV(void* tileY, void* tileU, void* tileV) {
/* 000016B0-000016D0 .text __THPGQRRestore */
static void __THPGQRRestore() {
register u32 tmp1, tmp2;
__REGISTER u32 tmp1, tmp2;
tmp1 = __THPOldGQR5;
tmp2 = __THPOldGQR6;
@@ -777,7 +777,7 @@ static void __THPGQRRestore() {
/* 000016D0-00001704 .text __THPGQRSetup */
static void __THPGQRSetup() {
register u32 tmp1, tmp2;
__REGISTER u32 tmp1, tmp2;
// clang-format off
#ifdef __MWERKS__
@@ -868,22 +868,22 @@ static void __THPDecompressiMCURow512x448() {
}
/* 00001944-00001DE4 .text __THPInverseDCTY8 */
static void __THPInverseDCTY8(register THPCoeff* in, register u32 xPos) {
register f32 *q, *ws;
register f32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9;
register f32 tmp10, tmp11, tmp12, tmp13;
register f32 tmp20, tmp21, tmp22, tmp23;
register f32 cc4 = 1.414213562F;
register f32 cc2 = 1.847759065F;
register f32 cc2c6s = 1.082392200F;
register f32 cc2c6a = -2.613125930F;
register f32 bias = 1024.0F;
static void __THPInverseDCTY8(__REGISTER THPCoeff* in, __REGISTER u32 xPos) {
__REGISTER f32 *q, *ws;
__REGISTER f32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9;
__REGISTER f32 tmp10, tmp11, tmp12, tmp13;
__REGISTER f32 tmp20, tmp21, tmp22, tmp23;
__REGISTER f32 cc4 = 1.414213562F;
__REGISTER f32 cc2 = 1.847759065F;
__REGISTER f32 cc2c6s = 1.082392200F;
__REGISTER f32 cc2c6a = -2.613125930F;
__REGISTER f32 bias = 1024.0F;
q = Gq;
ws = &__THPIDCTWorkspace[0] - 2;
{
register u32 itmp0, itmp1, itmp2, itmp3;
__REGISTER u32 itmp0, itmp1, itmp2, itmp3;
// clang-format off
#ifdef __MWERKS__
@@ -1052,11 +1052,11 @@ static void __THPInverseDCTY8(register THPCoeff* in, register u32 xPos) {
ws = &__THPIDCTWorkspace[0];
{
register THPSample* obase = Gbase;
register u32 wid = Gwid;
__REGISTER THPSample* obase = Gbase;
__REGISTER u32 wid = Gwid;
register u32 itmp0, off0, off1;
register THPSample *out0, *out1;
__REGISTER u32 itmp0, off0, off1;
__REGISTER THPSample *out0, *out1;
// clang-format off
#ifdef __MWERKS__
@@ -1183,21 +1183,21 @@ static void __THPInverseDCTY8(register THPCoeff* in, register u32 xPos) {
}
/* 00001DE4-0000227C .text __THPInverseDCTNoYPos */
static void __THPInverseDCTNoYPos(register THPCoeff* in, register u32 xPos) {
register f32 *q, *ws;
register f32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9;
register f32 tmp10, tmp11, tmp12, tmp13;
register f32 tmp20, tmp21, tmp22, tmp23;
register f32 cc4 = 1.414213562F;
register f32 cc2 = 1.847759065F;
register f32 cc2c6s = 1.082392200F;
register f32 cc2c6a = -2.613125930F;
register f32 bias = 1024.0F;
static void __THPInverseDCTNoYPos(__REGISTER THPCoeff* in, __REGISTER u32 xPos) {
__REGISTER f32 *q, *ws;
__REGISTER f32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9;
__REGISTER f32 tmp10, tmp11, tmp12, tmp13;
__REGISTER f32 tmp20, tmp21, tmp22, tmp23;
__REGISTER f32 cc4 = 1.414213562F;
__REGISTER f32 cc2 = 1.847759065F;
__REGISTER f32 cc2c6s = 1.082392200F;
__REGISTER f32 cc2c6a = -2.613125930F;
__REGISTER f32 bias = 1024.0F;
q = Gq;
ws = &__THPIDCTWorkspace[0] - 2;
{
register u32 itmp0, itmp1, itmp2, itmp3;
__REGISTER u32 itmp0, itmp1, itmp2, itmp3;
// clang-format off
#ifdef __MWERKS__
asm {
@@ -1365,11 +1365,11 @@ static void __THPInverseDCTNoYPos(register THPCoeff* in, register u32 xPos) {
ws = &__THPIDCTWorkspace[0];
{
register THPSample* obase = Gbase;
register u32 wid = Gwid;
__REGISTER THPSample* obase = Gbase;
__REGISTER u32 wid = Gwid;
register u32 itmp0, off0, off1;
register THPSample *out0, *out1;
__REGISTER u32 itmp0, off0, off1;
__REGISTER THPSample *out0, *out1;
// clang-format off
#ifdef __MWERKS__
@@ -1626,11 +1626,11 @@ static void __THPDecompressiMCURowNxN() {
}
/* 00002714-00002B20 .text __THPHuffDecodeDCTCompY */
static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block) {
static void __THPHuffDecodeDCTCompY(__REGISTER THPFileInfo* info, THPCoeff* block) {
{
register s32 t;
__REGISTER s32 t;
THPCoeff dc;
register THPCoeff diff;
__REGISTER THPCoeff diff;
__dcbz((void*)block, 0);
t = __THPHuffDecodeTab(info, Ydchuff);
@@ -1640,13 +1640,13 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
if (t) {
{
register s32 v;
register u32 cb;
register u32 cnt;
register u32 code;
register u32 tmp;
register u32 cnt1;
register u32 tmp1;
__REGISTER s32 v;
__REGISTER u32 cb;
__REGISTER u32 cnt;
__REGISTER u32 code;
__REGISTER u32 tmp;
__REGISTER u32 cnt1;
__REGISTER u32 tmp1;
// clang-format off
#ifdef __MWERKS__
asm {
@@ -1702,13 +1702,13 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
}
{
register s32 k;
register s32 code;
register u32 cnt;
register u32 cb;
register u32 increment;
register s32 tmp;
register THPHuffmanTab* h = Yachuff;
__REGISTER s32 k;
__REGISTER s32 code;
__REGISTER u32 cnt;
__REGISTER u32 cb;
__REGISTER u32 increment;
__REGISTER s32 tmp;
__REGISTER THPHuffmanTab* h = Yachuff;
// clang-format off
#ifdef __MWERKS__
@@ -1723,8 +1723,8 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
for (k = 1; k < 64; k++)
{
register s32 ssss;
register s32 rrrr;
__REGISTER s32 ssss;
__REGISTER s32 rrrr;
// clang-format off
#ifdef __MWERKS__
@@ -1746,8 +1746,8 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
// clang-format on
{
register u32 maxcodebase;
register u32 tmp2;
__REGISTER u32 maxcodebase;
__REGISTER u32 tmp2;
_FailedCheckEnoughBits:
cnt += 5;
@@ -1892,8 +1892,8 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
goto _DoneDecodeTab;
_Read4 : {
register u32 maxcodebase = (u32) & (h->maxCode);
register u32 tmp2;
__REGISTER u32 maxcodebase = (u32) & (h->maxCode);
__REGISTER u32 tmp2;
// clang-format off
#ifdef __MWERKS__
@@ -1925,9 +1925,9 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
_FailedCheckNoBits0:
_FailedCheckNoBits1:
_REALFAILEDCHECKNOBITS : {
register u32 mask = 0xFFFFFFFF << (33 - cnt);
register u32 tmp2;
register u32 tmp3;
__REGISTER u32 mask = 0xFFFFFFFF << (33 - cnt);
__REGISTER u32 tmp2;
__REGISTER u32 tmp3;
code = (s32)(cb & (~mask));
mask = (u32) & (h->maxCode);
@@ -1982,9 +1982,9 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
{
k += ssss;
{
register s32 v;
register u32 cnt1;
register u32 tmp1;
__REGISTER s32 v;
__REGISTER u32 cnt1;
__REGISTER u32 tmp1;
// clang-format off
#ifdef __MWERKS__
asm
@@ -2058,12 +2058,12 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
}
/* 00002B20-00002D98 .text __THPHuffDecodeTab */
static s32 __THPHuffDecodeTab(register THPFileInfo* info, register THPHuffmanTab* h) {
register s32 code;
register u32 cnt;
register s32 cb;
register u32 increment;
register s32 tmp;
static s32 __THPHuffDecodeTab(__REGISTER THPFileInfo* info, __REGISTER THPHuffmanTab* h) {
__REGISTER s32 code;
__REGISTER u32 cnt;
__REGISTER s32 cb;
__REGISTER u32 increment;
__REGISTER s32 tmp;
// clang-format off
#ifdef __MWERKS__
@@ -2089,8 +2089,8 @@ _done:
return code;
{
register u32 maxcodebase;
register u32 tmp2;
__REGISTER u32 maxcodebase;
__REGISTER u32 tmp2;
_FailedCheckEnoughBits:
maxcodebase = (u32) & (h->maxCode);
@@ -2197,8 +2197,8 @@ _FCEB_Done:
return tmp;
_Read4 : {
register u32 maxcodebase = (u32) & (h->maxCode);
register u32 tmp2;
__REGISTER u32 maxcodebase = (u32) & (h->maxCode);
__REGISTER u32 tmp2;
// clang-format off
#ifdef __MWERKS__
@@ -2275,8 +2275,8 @@ _FailedCheckNoBits0:
_FailedCheckNoBits1:
{
register u32 mask = 0xFFFFFFFF << (33 - cnt);
register u32 tmp2;
__REGISTER u32 mask = 0xFFFFFFFF << (33 - cnt);
__REGISTER u32 tmp2;
code = (s32)(cb & (~mask));
mask = (u32) & (h->maxCode);
@@ -2322,20 +2322,20 @@ _FailedCheckNoBits1:
}
/* 00002D98-00002F80 .text __THPHuffDecodeDCTCompU */
static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block) {
register s32 t;
register THPCoeff diff;
static void __THPHuffDecodeDCTCompU(__REGISTER THPFileInfo* info, THPCoeff* block) {
__REGISTER s32 t;
__REGISTER THPCoeff diff;
THPCoeff dc;
register s32 v;
register u32 cb;
register u32 cnt;
register u32 cnt33;
register u32 tmp;
register u32 cnt1;
register u32 tmp1;
register s32 k;
register s32 ssss;
register s32 rrrr;
__REGISTER s32 v;
__REGISTER u32 cb;
__REGISTER u32 cnt;
__REGISTER u32 cnt33;
__REGISTER u32 tmp;
__REGISTER u32 cnt1;
__REGISTER u32 tmp1;
__REGISTER s32 k;
__REGISTER s32 ssss;
__REGISTER s32 rrrr;
__dcbz((void*)block, 0);
t = __THPHuffDecodeTab(info, Udchuff);
@@ -2458,20 +2458,20 @@ static void __THPHuffDecodeDCTCompU(register THPFileInfo* info, THPCoeff* block)
}
/* 00002F80-00003168 .text __THPHuffDecodeDCTCompV */
static void __THPHuffDecodeDCTCompV(register THPFileInfo* info, THPCoeff* block) {
register s32 t;
register THPCoeff diff;
static void __THPHuffDecodeDCTCompV(__REGISTER THPFileInfo* info, THPCoeff* block) {
__REGISTER s32 t;
__REGISTER THPCoeff diff;
THPCoeff dc;
register s32 v;
register u32 cb;
register u32 cnt;
register u32 cnt33;
register u32 tmp;
register u32 cnt1;
register u32 tmp1;
register s32 k;
register s32 ssss;
register s32 rrrr;
__REGISTER s32 v;
__REGISTER u32 cb;
__REGISTER u32 cnt;
__REGISTER u32 cnt33;
__REGISTER u32 tmp;
__REGISTER u32 cnt1;
__REGISTER u32 tmp1;
__REGISTER s32 k;
__REGISTER s32 ssss;
__REGISTER s32 rrrr;
__dcbz((void*)block, 0);
t = __THPHuffDecodeTab(info, Vdchuff);
+1 -1
View File
@@ -246,7 +246,7 @@ static void __AIDHandler(__OSInterrupt interrupt, OSContext* context) {
}
// clang-format off
static asm void __AICallbackStackSwitch(__REGISTER void* cb) {
static ASM void __AICallbackStackSwitch(__REGISTER void* cb) {
nofralloc
mflr r0
stw r0, 0x4(r1)
+15 -13
View File
@@ -1,54 +1,56 @@
#include "dolphin/base/PPCArch.h"
asm u32 PPCMfmsr() {
#include "global.h"
ASM u32 PPCMfmsr() {
nofralloc
mfmsr r3
blr
}
asm void PPCMtmsr(__REGISTER u32 newMSR) {
ASM void PPCMtmsr(__REGISTER u32 newMSR) {
nofralloc
mtmsr newMSR
blr
}
asm u32 PPCMfhid0() {
ASM u32 PPCMfhid0() {
nofralloc
mfspr r3, HID0
blr
}
asm void PPCMthid0(__REGISTER u32 newHID0) {
ASM void PPCMthid0(__REGISTER u32 newHID0) {
nofralloc
mtspr HID0, newHID0
blr
}
asm u32 PPCMfl2cr() {
ASM u32 PPCMfl2cr() {
nofralloc
mfspr r3, L2CR
blr
}
asm void PPCMtl2cr(__REGISTER u32 newL2cr) {
ASM void PPCMtl2cr(__REGISTER u32 newL2cr) {
nofralloc
mtspr L2CR, newL2cr
blr
}
asm void PPCMtdec(__REGISTER u32 newDec) {
ASM void PPCMtdec(__REGISTER u32 newDec) {
nofralloc
mtdec newDec
blr
}
asm void PPCSync() {
ASM void PPCSync() {
nofralloc
sc
blr
}
asm void PPCHalt() {
ASM void PPCHalt() {
nofralloc
sync
loop:
@@ -81,19 +83,19 @@ void PPCMtfpscr(__REGISTER u32 newFPSCR) {
}
}
asm u32 PPCMfhid2() {
ASM u32 PPCMfhid2() {
nofralloc
mfspr r3, HID2
blr
}
asm void PPCMthid2(__REGISTER u32 newhid2) {
ASM void PPCMthid2(__REGISTER u32 newhid2) {
nofralloc
mtspr HID2, newhid2
blr
}
asm void PPCMtwpar(__REGISTER u32 newwpar) {
ASM void PPCMtwpar(__REGISTER u32 newwpar) {
nofralloc
mtspr WPAR, newwpar
blr
@@ -103,7 +105,7 @@ void PPCDisableSpeculation(void) {
PPCMthid0(PPCMfhid0() | HID0_SPD);
}
asm void PPCSetFpNonIEEEMode() {
ASM void PPCSetFpNonIEEEMode() {
nofralloc
mtfsb1 29
blr
+1 -1
View File
@@ -22,7 +22,7 @@ void __DBExceptionDestinationAux(void) {
PPCHalt();
}
asm void __DBExceptionDestination(void) {
ASM void __DBExceptionDestination(void) {
nofralloc
mfmsr r3
ori r3, r3, 0x30
+1 -1
View File
@@ -48,7 +48,7 @@ u16* __cpReg;
/* ############################################################################################## */
u32* __piReg;
static u16 DefaultTexData[] ALIGN_DECL(32) = {
ALIGN_DECL(32, static u16 DefaultTexData[]) = {
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
};
+4 -4
View File
@@ -129,10 +129,10 @@ void GXInitLightColor(GXLightObj* obj, GXColor color) {
*(u32*)&obj->color = *(u32*)&color;
}
static inline void PushLight(const register GXLightObj* lt_obj, register void* dest) {
register u32 zero, color;
register f32 a0_a1, a2_k0, k1_k2;
register f32 px_py, pz_dx, dy_dz;
static inline void PushLight(const __REGISTER GXLightObj* lt_obj, __REGISTER void* dest) {
__REGISTER u32 zero, color;
__REGISTER f32 a0_a1, a2_k0, k1_k2;
__REGISTER f32 px_py, pz_dx, dy_dz;
#ifdef __MWERKS__ // clang-format off
asm {
lwz color, 12(lt_obj)
+10 -10
View File
@@ -2,8 +2,8 @@
#include "dolphin/gx/GX.h"
#include "dolphin/gx/GXInit.h"
static void Copy6Floats(register f32 src[6], register f32 dst[6]) {
register f32 ps_0, ps_1, ps_2;
static void Copy6Floats(__REGISTER f32 src[6], __REGISTER f32 dst[6]) {
__REGISTER f32 ps_0, ps_1, ps_2;
// clang-format off
#ifdef __MWERKS__
@@ -19,8 +19,8 @@ static void Copy6Floats(register f32 src[6], register f32 dst[6]) {
// clang-format on
}
static void WriteProjPS(const register f32 src[6], register volatile void* dst) {
register f32 ps_0, ps_1, ps_2;
static void WriteProjPS(const __REGISTER f32 src[6], __REGISTER volatile void* dst) {
__REGISTER f32 ps_0, ps_1, ps_2;
// clang-format off
#ifdef __MWERKS__
@@ -133,8 +133,8 @@ void GXGetProjectionv(f32* proj) {
proj[6] = gx->projMtx[5];
}
static void WriteMTXPS4x3(register volatile void* dst, register const Mtx src) {
register f32 ps_0, ps_1, ps_2, ps_3, ps_4, ps_5;
static void WriteMTXPS4x3(__REGISTER volatile void* dst, __REGISTER const Mtx src) {
__REGISTER f32 ps_0, ps_1, ps_2, ps_3, ps_4, ps_5;
// clang-format off
#ifdef __MWERKS__
@@ -162,8 +162,8 @@ void GXLoadPosMtxImm(Mtx mtx, u32 id) {
WriteMTXPS4x3(&GXFIFO, mtx);
}
static void WriteMTXPS3x3(register volatile void* dst, register const Mtx src) {
register f32 ps_0, ps_1, ps_2, ps_3, ps_4, ps_5;
static void WriteMTXPS3x3(__REGISTER volatile void* dst, __REGISTER const Mtx src) {
__REGISTER f32 ps_0, ps_1, ps_2, ps_3, ps_4, ps_5;
// clang-format off
#ifdef __MWERKS__
@@ -196,8 +196,8 @@ void GXSetCurrentMtx(u32 id) {
__GXSetMatrixIndex(GX_VA_PNMTXIDX);
}
static void WriteMTXPS4x2(register volatile void* dst, register const Mtx src) {
register f32 ps_0, ps_1, ps_2, ps_3;
static void WriteMTXPS4x2(__REGISTER volatile void* dst, __REGISTER const Mtx src) {
__REGISTER f32 ps_0, ps_1, ps_2, ps_3;
// clang-format off
#ifdef __MWERKS__
+2 -2
View File
@@ -581,8 +581,8 @@ entry __OSEVEnd
#endif
}
static ASM void OSDefaultExceptionHandler(register __OSException exception,
register OSContext* context) {
static ASM void OSDefaultExceptionHandler(__REGISTER __OSException exception,
__REGISTER OSContext* context) {
#ifdef __MWERKS__
// clang-format off
nofralloc
+4 -4
View File
@@ -130,8 +130,8 @@ void OSCancelAlarm(OSAlarm* alarm) {
OSRestoreInterrupts(enabled);
}
static void DecrementerExceptionCallback(register __OSException exception,
register OSContext* context) {
static void DecrementerExceptionCallback(__REGISTER __OSException exception,
__REGISTER OSContext* context) {
OSAlarm* alarm;
OSAlarm* next;
OSAlarmHandler handler;
@@ -177,8 +177,8 @@ static void DecrementerExceptionCallback(register __OSException exception,
OSLoadContext(context);
}
static ASM void DecrementerExceptionHandler(register __OSException exception,
register OSContext* context) {
static ASM void DecrementerExceptionHandler(__REGISTER __OSException exception,
__REGISTER OSContext* context) {
#ifdef __MWERKS__
// clang-format off
nofralloc
+10 -10
View File
@@ -18,7 +18,7 @@ static ASM void DCEnable(void) {
// clang-format on
}
ASM void DCInvalidateRange(register void* start, register u32 nBytes) {
ASM void DCInvalidateRange(__REGISTER void* start, __REGISTER u32 nBytes) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -42,7 +42,7 @@ do_invalidate:
// clang-format on
}
ASM void DCFlushRange(register void* start, register u32 nBytes) {
ASM void DCFlushRange(__REGISTER void* start, __REGISTER u32 nBytes) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -67,7 +67,7 @@ do_flush:
// clang-format on
}
ASM void DCStoreRange(register void* start, register u32 nBytes) {
ASM void DCStoreRange(__REGISTER void* start, __REGISTER u32 nBytes) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -92,7 +92,7 @@ do_store:
// clang-format on
}
ASM void DCFlushRangeNoSync(register void* start, register u32 nBytes) {
ASM void DCFlushRangeNoSync(__REGISTER void* start, __REGISTER u32 nBytes) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -116,7 +116,7 @@ do_flush:
// clang-format on
}
ASM void DCStoreRangeNoSync(register void* start, register u32 nBytes) {
ASM void DCStoreRangeNoSync(__REGISTER void* start, __REGISTER u32 nBytes) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -140,7 +140,7 @@ do_store:
// clang-format on
}
ASM void DCZeroRange(register void* start, register u32 nBytes) {
ASM void DCZeroRange(__REGISTER void* start, __REGISTER u32 nBytes) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -164,7 +164,7 @@ do_zero:
// clang-format on
}
ASM void ICInvalidateRange(register void* start, register u32 nBytes) {
ASM void ICInvalidateRange(__REGISTER void* start, __REGISTER u32 nBytes) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -318,8 +318,8 @@ do_invalidate:
// clang-format on
}
static ASM void LCStoreBlocks(register void* destAddr, register void* srcAddr,
register u32 blockNum){
static ASM void LCStoreBlocks(__REGISTER void* destAddr, __REGISTER void* srcAddr,
__REGISTER u32 blockNum){
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -359,7 +359,7 @@ u32 LCStoreData(void* destAddr, void* srcAddr, u32 nBytes) {
return ret;
}
ASM void LCQueueWait(register u32 len) {
ASM void LCQueueWait(__REGISTER u32 len) {
// clang-format off
#ifdef __MWERKS__
nofralloc
+9 -9
View File
@@ -6,7 +6,7 @@
volatile OSContext* __OSCurrentContext AT_ADDRESS(OS_BASE_CACHED | 0x00D4);
volatile OSContext* __OSFPUContext AT_ADDRESS(OS_BASE_CACHED | 0x00D8);
ASM void __OSLoadFPUContext(s32 unused0, register OSContext* context) {
ASM void __OSLoadFPUContext(s32 unused0, __REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -94,7 +94,7 @@ exit:
// clang-format on
}
ASM void __OSSaveFPUContext(s32 unused0, s32 unused1, register OSContext* context) {
ASM void __OSSaveFPUContext(s32 unused0, s32 unused1, __REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -182,7 +182,7 @@ exit:
// clang-format on
}
ASM void OSSaveFPUContext(register OSContext* context) {
ASM void OSSaveFPUContext(__REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -193,7 +193,7 @@ ASM void OSSaveFPUContext(register OSContext* context) {
// clang-format on
}
ASM void OSSetCurrentContext(register OSContext* context) {
ASM void OSSetCurrentContext(__REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -231,7 +231,7 @@ OSContext* OSGetCurrentContext(void) {
return OS_CURRENT_CONTEXT;
}
ASM u32 OSSaveContext(register OSContext* context) {
ASM u32 OSSaveContext(__REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -277,7 +277,7 @@ ASM u32 OSSaveContext(register OSContext* context) {
// clang-format on
}
ASM void OSLoadContext(register OSContext* context) {
ASM void OSLoadContext(__REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -366,7 +366,7 @@ void OSClearContext(OSContext* context) {
}
}
ASM void OSInitContext(register OSContext* context, register u32 srr0, register u32 stack) {
ASM void OSInitContext(__REGISTER OSContext* context, __REGISTER u32 srr0, __REGISTER u32 stack) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -475,7 +475,7 @@ void OSDumpContext(OSContext* context) {
}
}
static ASM void OSSwitchFPUContext(register u8 err, register OSContext* context) {
static ASM void OSSwitchFPUContext(__REGISTER u8 err, __REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
@@ -527,7 +527,7 @@ void __OSContextInit(void) {
DBPrintf("FPU-unavailable handler installed\n");
}
ASM void OSFillFPUContext(register OSContext* context) {
ASM void OSFillFPUContext(__REGISTER OSContext* context) {
// clang-format off
#ifdef __MWERKS__
nofralloc
+2 -2
View File
@@ -45,7 +45,7 @@ ASM BOOL OSEnableInterrupts(void) {
#endif
}
ASM BOOL OSRestoreInterrupts(register BOOL status) {
ASM BOOL OSRestoreInterrupts(__REGISTER BOOL status) {
#ifdef __MWERKS__
// clang-format off
nofralloc
@@ -407,7 +407,7 @@ void __OSDispatchInterrupt(__OSException exception, OSContext* context) {
OSLoadContext(context);
}
static ASM void ExternalInterruptHandler(register __OSInterrupt type, register OSContext* context) {
static ASM void ExternalInterruptHandler(__REGISTER __OSInterrupt type, __REGISTER OSContext* context) {
#ifdef __MWERKS__
// clang-format off
nofralloc
+1 -1
View File
@@ -155,7 +155,7 @@ static ASM void Config48MB(void) {
// clang-format on
}
static ASM void RealMode(register u32 config) {
static ASM void RealMode(__REGISTER u32 config) {
// clang-format off
#ifdef __MWERKS__
nofralloc
+2 -2
View File
@@ -20,9 +20,9 @@ typedef struct _ApploaderHeader {
/* 0x1C */ u32 reserved2;
} ApploaderHeader; // Size: 0x20
static ApploaderHeader Header ALIGN_DECL(32);
ALIGN_DECL(32, static ApploaderHeader Header);
ASM static void Run(register u32 addr) {
ASM static void Run(__REGISTER u32 addr) {
nofralloc
sync
+1 -1
View File
@@ -6,7 +6,7 @@ static void WriteSramCallback(s32 chan, OSContext* context);
static BOOL WriteSram(void* buffer, u32 offset, u32 size);
static BOOL UnlockSram(BOOL commit, u32 offset);
static SramControlBlock Scb ALIGN_DECL(32);
ALIGN_DECL(32, static SramControlBlock Scb);
static void WriteSramCallback(s32 chan, OSContext* context) {
Scb.sync = WriteSram(Scb.sram + Scb.offset, Scb.offset, RTC_SRAM_SIZE - Scb.offset);
+1 -1
View File
@@ -13,7 +13,7 @@
#include "m_Do/m_Do_ext.h"
OSThread DvdErr_thread;
u8 DvdErr_stack[0x1000] ALIGN_DECL(32);
ALIGN_DECL(32, u8 DvdErr_stack[0x1000]);
static OSAlarm Alarm;
bool mDoDvdErr_initialized;
+2 -2
View File
@@ -12,9 +12,9 @@
#include "global.h"
#include "string.h"
u8 MemCardStack[0x1000] ALIGN_DECL(32);
ALIGN_DECL(32, u8 MemCardStack[0x1000]);
OSThread MemCardThread;
u8 MemCardWorkArea0[0xa000] ALIGN_DECL(32);
ALIGN_DECL(32, u8 MemCardWorkArea0[0xa000]);
mDoMemCd_Ctrl_c g_mDoMemCd_control;
+2 -2
View File
@@ -24,8 +24,8 @@
#define HEADER_COMMENT "%d/%d Save Data"
#endif
static u8 sTmpBuf[0x2000] ALIGN_DECL(32);
static u8 sTmpBuf2[0x2000] ALIGN_DECL(32);
ALIGN_DECL(32, static u8 sTmpBuf[0x2000]);
ALIGN_DECL(32, static u8 sTmpBuf2[0x2000]);
static u32 sSaveCount;
/* 80019940-80019CE8 .text mDoMemCdRWm_Store__FP12CARDFileInfoPvUl */
+2 -2
View File
@@ -360,7 +360,7 @@ bool Debug_console(JUTGamePad* i_pad) {
s32 LOAD_COPYDATE(void*) {
s32 status;
DVDFileInfo ALIGN_DECL(0x20) fileInfo;
ALIGN_DECL(0x20, DVDFileInfo fileInfo);
u8 buffer[0x20];
status = DVDOpen("/COPYDATE", &fileInfo);
@@ -536,7 +536,7 @@ int main(int argc, const char* argv[]) {
#endif
OSThread* current_thread = OSGetCurrentThread();
u8 ALIGN_DECL(0x20) stack[0xF000];
ALIGN_DECL(0x20, u8 stack[0xF000]);
mDoMain::sPowerOnTime = OSGetTime();
OSReportInit();
+1 -1
View File
@@ -336,7 +336,7 @@ def convert_binary_to_matDL_c_source(src_path, dest_path, symbol_name, scope):
var_def_prefix = ""
write_macro_line(f"#define {macro_name}(TEX_NAME)")
write_macro_line(f"{var_def_prefix}u8 {symbol_name}[] ALIGN_DECL(32) = {{")
write_macro_line(f"ALIGN_DECL(32, {var_def_prefix}u8 {symbol_name}[]) = {{")
while True:
try: