mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-22 06:19:54 -04:00
Adds TODO comments to remove implementation defined pointer manipulation.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
// UB: u32 casts here should be uintptr_t casts.
|
||||
// TODO: After uintptr_t cast change should have an AVOID_UB target that just toggles the KSEG0 bit in the address rather than add/sub 0x80000000
|
||||
#define PHYSICAL_TO_VIRTUAL(addr) ((u32)(addr) + 0x80000000)
|
||||
#define PHYSICAL_TO_VIRTUAL2(addr) ((u32)(addr) - 0x80000000)
|
||||
#define SEGMENTED_TO_VIRTUAL(addr) (void*)(PHYSICAL_TO_VIRTUAL(gRspSegmentPhysAddrs[SEGMENT_NUMBER(addr)]) + SEGMENT_OFFSET(addr))
|
||||
|
||||
+1
-1
@@ -4109,7 +4109,7 @@ extern UNK_TYPE1 D_801F80F8; // D_801F80F8
|
||||
extern u64 lastRenderFrameTimestamp; // D_801F8150
|
||||
extern OSMesgQueue siEventCallbackQueue; // D_801F8160
|
||||
extern OSMesg siEventCallbackBuffer[1]; // D_801F8178
|
||||
extern u32 gRspSegmentPhysAddrs[NUM_SEGMENTS]; // D_801F8180
|
||||
extern u32 gRspSegmentPhysAddrs[NUM_SEGMENTS]; // D_801F8180 // u32 type should be uintptr_t
|
||||
extern SchedThreadStruct schedContext; // D_801F81C0
|
||||
extern OSMesgQueueListNode mainIrqmgrCallbackNode; // D_801F84F8
|
||||
extern OSMesgQueue mainIrqmgrCallbackQueue; // D_801F8500
|
||||
|
||||
Reference in New Issue
Block a user