mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +00:00
Remove gSystemHeap and use _buffersSegmentEnd instead, make buffer alignments explicit for gcc (#1901)
* Remove gSystemHeap and use _buffersSegmentEnd instead, make buffer alignments explicit for gcc * ALIGNEDn -> ALIGNED(n), reposition alignment attribute for PreNmiBuff * Correct positioning of ALIGNED for filter data in audio/lib/data.c * Add ALIGNED to TypenameMacros * ALIGNED(4) on same line for PreNmiBuff * Revert audio load.c change, to be submitted separately
This commit is contained in:
parent
6e2ea18154
commit
c521f1f8ae
16 changed files with 45 additions and 40 deletions
|
@ -755,7 +755,12 @@ typedef struct OverlayRelocationSection {
|
|||
/* 0x14 */ u32 relocations[1]; // size is nRelocations
|
||||
} OverlayRelocationSection; // size >= 0x18
|
||||
|
||||
typedef struct {
|
||||
// This struct is used at osAppNMIBuffer which is not at an 8-byte aligned address. This causes an unaligned access
|
||||
// crash if the OSTime variables use 64-bit load/store instructions, which is the case in any MIPS ABI other than O32
|
||||
// where 64-bit load/store instructions are emulated with 2x 32-bit load/store instructions. The alignment attribute
|
||||
// conveys that this structure will not always be 8-bytes aligned, allowing a modern compiler to generate non-crashing
|
||||
// code for accessing these. This is not an issue in the original compiler as it only output O32 ABI code.
|
||||
ALIGNED(4) typedef struct {
|
||||
/* 0x00 */ u32 resetting;
|
||||
/* 0x04 */ u32 resetCount;
|
||||
/* 0x08 */ OSTime duration;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue