Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
OSContext.h
Go to the documentation of this file.
1#ifndef OSCONTEXT_H
2#define OSCONTEXT_H
3
4#include "dolphin/types.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define __OS_CONTEXT_FRAME 768
11
12#define OS_CONTEXT_R0 0
13#define OS_CONTEXT_R1 4
14#define OS_CONTEXT_R2 8
15#define OS_CONTEXT_R3 12
16#define OS_CONTEXT_R4 16
17#define OS_CONTEXT_R5 20
18#define OS_CONTEXT_R6 24
19#define OS_CONTEXT_R7 28
20#define OS_CONTEXT_R8 32
21#define OS_CONTEXT_R9 36
22#define OS_CONTEXT_R10 40
23#define OS_CONTEXT_R11 44
24#define OS_CONTEXT_R12 48
25#define OS_CONTEXT_R13 52
26#define OS_CONTEXT_R14 56
27#define OS_CONTEXT_R15 60
28#define OS_CONTEXT_R16 64
29#define OS_CONTEXT_R17 68
30#define OS_CONTEXT_R18 72
31#define OS_CONTEXT_R19 76
32#define OS_CONTEXT_R20 80
33#define OS_CONTEXT_R21 84
34#define OS_CONTEXT_R22 88
35#define OS_CONTEXT_R23 92
36#define OS_CONTEXT_R24 96
37#define OS_CONTEXT_R25 100
38#define OS_CONTEXT_R26 104
39#define OS_CONTEXT_R27 108
40#define OS_CONTEXT_R28 112
41#define OS_CONTEXT_R29 116
42#define OS_CONTEXT_R30 120
43#define OS_CONTEXT_R31 124
44
45#define OS_CONTEXT_CR 128
46#define OS_CONTEXT_LR 132
47#define OS_CONTEXT_CTR 136
48#define OS_CONTEXT_XER 140
49
50#define OS_CONTEXT_FPR0 144
51#define OS_CONTEXT_FPR1 152
52#define OS_CONTEXT_FPR2 160
53#define OS_CONTEXT_FPR3 168
54#define OS_CONTEXT_FPR4 176
55#define OS_CONTEXT_FPR5 184
56#define OS_CONTEXT_FPR6 192
57#define OS_CONTEXT_FPR7 200
58#define OS_CONTEXT_FPR8 208
59#define OS_CONTEXT_FPR9 216
60#define OS_CONTEXT_FPR10 224
61#define OS_CONTEXT_FPR11 232
62#define OS_CONTEXT_FPR12 240
63#define OS_CONTEXT_FPR13 248
64#define OS_CONTEXT_FPR14 256
65#define OS_CONTEXT_FPR15 264
66#define OS_CONTEXT_FPR16 272
67#define OS_CONTEXT_FPR17 280
68#define OS_CONTEXT_FPR18 288
69#define OS_CONTEXT_FPR19 296
70#define OS_CONTEXT_FPR20 304
71#define OS_CONTEXT_FPR21 312
72#define OS_CONTEXT_FPR22 320
73#define OS_CONTEXT_FPR23 328
74#define OS_CONTEXT_FPR24 336
75#define OS_CONTEXT_FPR25 344
76#define OS_CONTEXT_FPR26 352
77#define OS_CONTEXT_FPR27 360
78#define OS_CONTEXT_FPR28 368
79#define OS_CONTEXT_FPR29 376
80#define OS_CONTEXT_FPR30 384
81#define OS_CONTEXT_FPR31 392
82
83#define OS_CONTEXT_FPSCR 400
84
85#define OS_CONTEXT_SRR0 408
86#define OS_CONTEXT_SRR1 412
87
88#define OS_CONTEXT_MODE 416
89#define OS_CONTEXT_STATE 418
90
91#define OS_CONTEXT_GQR0 420
92#define OS_CONTEXT_GQR1 424
93#define OS_CONTEXT_GQR2 428
94#define OS_CONTEXT_GQR3 432
95#define OS_CONTEXT_GQR4 436
96#define OS_CONTEXT_GQR5 440
97#define OS_CONTEXT_GQR6 444
98#define OS_CONTEXT_GQR7 448
99#define __OSCONTEXT_PADDING 452
100
101#define OS_CONTEXT_PSF0 456
102#define OS_CONTEXT_PSF1 464
103#define OS_CONTEXT_PSF2 472
104#define OS_CONTEXT_PSF3 480
105#define OS_CONTEXT_PSF4 488
106#define OS_CONTEXT_PSF5 496
107#define OS_CONTEXT_PSF6 504
108#define OS_CONTEXT_PSF7 512
109#define OS_CONTEXT_PSF8 520
110#define OS_CONTEXT_PSF9 528
111#define OS_CONTEXT_PSF10 536
112#define OS_CONTEXT_PSF11 544
113#define OS_CONTEXT_PSF12 552
114#define OS_CONTEXT_PSF13 560
115#define OS_CONTEXT_PSF14 568
116#define OS_CONTEXT_PSF15 576
117#define OS_CONTEXT_PSF16 584
118#define OS_CONTEXT_PSF17 592
119#define OS_CONTEXT_PSF18 600
120#define OS_CONTEXT_PSF19 608
121#define OS_CONTEXT_PSF20 616
122#define OS_CONTEXT_PSF21 624
123#define OS_CONTEXT_PSF22 632
124#define OS_CONTEXT_PSF23 640
125#define OS_CONTEXT_PSF24 648
126#define OS_CONTEXT_PSF25 656
127#define OS_CONTEXT_PSF26 664
128#define OS_CONTEXT_PSF27 672
129#define OS_CONTEXT_PSF28 680
130#define OS_CONTEXT_PSF29 688
131#define OS_CONTEXT_PSF30 696
132#define OS_CONTEXT_PSF31 704
133#define OS_CONTEXT_STATE_EXC 0x02u
134
135#define OS_CONTEXT_STATE_FPSAVED 0x01u
136
137typedef struct OSContext {
138 /* 0x000 */ u32 gpr[32];
139 /* 0x080 */ u32 cr;
140 /* 0x084 */ u32 lr;
141 /* 0x088 */ u32 ctr;
142 /* 0x08C */ u32 xer;
143 /* 0x090 */ f64 fpr[32];
144 /* 0x190 */ u32 field_0x190;
145 /* 0x194 */ u32 fpscr;
146 /* 0x198 */ u32 srr0;
147 /* 0x19C */ u32 srr1;
148 /* 0x1A0 */ u16 mode;
149 /* 0x1A2 */ u16 state;
150 /* 0x1A4 */ u32 gqr[8];
151 /* 0x1C4 */ f64 ps[32];
153
156
157void __OSLoadFPUContext(void);
168void __OSContextInit(void);
170
171#ifdef __cplusplus
172};
173#endif
174
175#endif /* OSCONTEXT_H */
static OSContext context
Definition JUTException.cpp:233
void OSSetCurrentContext(OSContext *context)
void OSFillFPUContext(OSContext *context)
void __OSLoadFPUContext(void)
Definition OSContext.c:9
static void OSSwitchFPUContext(u8 err, OSContext *context)
void __OSSaveFPUContext(s32 unused0, s32 unused1, OSContext *context)
void __OSContextInit(void)
Definition OSContext.c:533
void OSLoadContext(OSContext *context)
void OSClearContext(OSContext *context)
Definition OSContext.c:354
void OSSaveFPUContext(OSContext *context)
void OSDumpContext(OSContext *context)
Definition OSContext.c:435
OSContext * OSGetCurrentContext(void)
Definition OSContext.c:226
u32 OSSaveContext(OSContext *context)
OSContext *OS_CURRENT_CONTEXT AT_ADDRESS(0x800000D4)
void OSInitContext(OSContext *context, u32 pc, u32 lr)
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition OSContext.h:137
u32 lr
Definition OSContext.h:140
f64 ps[32]
Definition OSContext.h:151
u32 gqr[8]
Definition OSContext.h:150
f64 fpr[32]
Definition OSContext.h:143
u32 cr
Definition OSContext.h:139
u32 ctr
Definition OSContext.h:141
u32 srr1
Definition OSContext.h:147
u32 srr0
Definition OSContext.h:146
u16 mode
Definition OSContext.h:148
u16 state
Definition OSContext.h:149
u32 xer
Definition OSContext.h:142
u32 fpscr
Definition OSContext.h:145
u32 gpr[32]
Definition OSContext.h:138
u32 field_0x190
Definition OSContext.h:144
unsigned long u32
Definition types.h:10
double f64
Definition types.h:23
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8