summaryrefslogtreecommitdiff
path: root/arm9/lib/include
diff options
context:
space:
mode:
authorCleverking2003 <30466983+Cleverking2003@users.noreply.github.com>2020-09-13 18:14:02 +0300
committerGitHub <noreply@github.com>2020-09-13 18:14:02 +0300
commita013685f0bd75d8070971d96b79e4c146d5fbcaf (patch)
tree96f3c49482185e13eb21cc2b4d65811ee3e510da /arm9/lib/include
parent4d9614826c565c4ad22da1c988034ff2bff4001a (diff)
parent85867eb5b556bab7a8cdbdf41f15b0ec838391ec (diff)
Merge pull request #285 from red031000/master
arm9 CP_context
Diffstat (limited to 'arm9/lib/include')
-rw-r--r--arm9/lib/include/CP_context.h6
-rw-r--r--arm9/lib/include/registers.h6
2 files changed, 5 insertions, 7 deletions
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)