From 85867eb5b556bab7a8cdbdf41f15b0ec838391ec Mon Sep 17 00:00:00 2001 From: red031000 Date: Fri, 11 Sep 2020 16:32:54 +0100 Subject: arm9 CP_context --- arm9/lib/include/CP_context.h | 6 +----- arm9/lib/include/registers.h | 6 ++++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'arm9/lib/include') diff --git a/arm9/lib/include/CP_context.h b/arm9/lib/include/CP_context.h index 4a925257..9d392352 100644 --- a/arm9/lib/include/CP_context.h +++ b/arm9/lib/include/CP_context.h @@ -1,7 +1,3 @@ -// -// Created by red031000 on 2020-05-17. -// - #ifndef POKEDIAMOND_CP_CONTEXT_H #define POKEDIAMOND_CP_CONTEXT_H @@ -15,7 +11,7 @@ typedef struct CPContext { u16 sqrt_mode; } CPContext; -void CP_SaveContext(CPContext *context); +void CP_SaveContext(register CPContext *context); void CPi_RestoreContext(const CPContext* context); #endif //POKEDIAMOND_CP_CONTEXT_H diff --git a/arm9/lib/include/registers.h b/arm9/lib/include/registers.h index ae5b7adc..dc1b4fdb 100644 --- a/arm9/lib/include/registers.h +++ b/arm9/lib/include/registers.h @@ -112,8 +112,10 @@ #define reg_GX_VRAMCNT_I (*(REGType8v *)0x4000249) #define reg_CP_DIVCNT (*(REGType16v *)0x4000280) -#define reg_CP_DIV_NUMER (*(REGType64v *)0x4000290) -#define reg_CP_DIV_NUMER_L (*(REGType32v *)0x4000290) + +#define REG_DIV_NUMER_ADDR 0x4000290 +#define reg_CP_DIV_NUMER (*(REGType64v *)REG_DIV_NUMER_ADDR) +#define reg_CP_DIV_NUMER_L (*(REGType32v *)REG_DIV_NUMER_ADDR) #define reg_CP_DIV_NUMER_H (*(REGType32v *)0x4000294) #define reg_CP_DIV_DENOM (*(REGType64v *)0x4000298) #define reg_CP_DIV_DENOM_L (*(REGType32v *)0x4000298) -- cgit v1.2.3