1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // --------------------------------------------------------------------------*/
11 * SquirrelJME Virtual Machine Definitions.
17 #ifndef SJME_hGRATUFACOATSJMFHSJMEVDEFH
18 #define SJME_hGRATUFACOATSJMFHSJMEVDEFH
22 #ifndef SJME_CXX_IS_EXTERNED
23 #define SJME_CXX_IS_EXTERNED
24 #define SJME_cXRATUFACOATSJMFHSJMEVDEFH
27 #endif /** #ifdef SJME_CXX_IS_EXTERNED */
28 #endif /** #ifdef __cplusplus */
30 /****************************************************************************/
33 * Long return value result
37 typedef struct sjme_jlong_combine
51 typedef struct sjme_jint_div
65 typedef struct sjme_cpustate sjme_cpustate
;
72 sjme_jint r
[SJME_MAX_REGISTERS
];
74 /** Debug: Class name. */
75 sjme_vmemptr debugclassname
;
77 /** Debug: Method name. */
78 sjme_vmemptr debugmethodname
;
80 /** Debug: Method type. */
81 sjme_vmemptr debugmethodtype
;
83 /** Debug: Source file. */
84 sjme_vmemptr debugsourcefile
;
86 /** Debug: Current line. */
89 /** Debug: Java Operation. */
92 /** Debug: Java Address. */
95 /** Debug: The Task ID. */
98 /** The parent CPU state. */
99 sjme_cpustate
* parent
;
103 typedef struct sjme_cpu sjme_cpu
;
106 /** The state of this thread. */
107 sjme_jint threadstate
;
109 /* System call arguments. */
110 sjme_jint syscallargs
[SJME_MAX_SYSCALLARGS
];
112 /* System call error numbers. */
113 sjme_jint syscallerr
[SJME_SYSCALL_NUM_SYSCALLS
];
115 /* Supervisor properties. */
116 sjme_jint supervisorprops
[SJME_SUPERPROP_NUM_PROPERTIES
];
118 /* Current CPU state. */
121 /** Stored IPC Exception. */
122 sjme_jint ipcexception
;
125 /** Virtual machine state. */
128 /** Virtual memory information. */
137 /** Configuration space. */
138 sjme_vmemmap
* config
;
141 sjme_vmemmap
* framebuffer
;
144 sjme_vmemmap
* optionjar
;
149 /** Framebuffer info. */
150 sjme_framebuffer
* fbinfo
;
152 /** Native functions. */
153 sjme_nativefuncs
* nativefuncs
;
155 /** Linearly fair CPU execution engine. */
156 sjme_jint fairthreadid
;
159 sjme_cpu threads
[SJME_THREAD_MAX
];
161 /** Total instruction count. */
162 sjme_jint totalinstructions
;
164 /** Did the supervisor boot okay? */
165 sjme_jint supervisorokay
;
167 /** Console X position. */
170 /** Console Y position. */
173 /** Console width. */
176 /** Console height. */
179 /** System call static field pointer. */
180 sjme_vmemptr syscallsfp
;
182 /** System call code pointer. */
183 sjme_vmemptr syscallcode
;
185 /** System call pool pointer. */
186 sjme_vmemptr syscallpool
;
188 /** Is debugging enabled? */
189 sjme_jint enabledebug
;
191 /** Squelch the framebuffer console? */
192 sjme_jint squelchfbconsole
;
195 /****************************************************************************/
199 #ifdef SJME_cXRATUFACOATSJMFHSJMEVDEFH
201 #undef SJME_cXRATUFACOATSJMFHSJMEVDEFH
202 #undef SJME_CXX_IS_EXTERNED
203 #endif /** #ifdef SJME_cXRATUFACOATSJMFHSJMEVDEFH */
204 #endif /** #ifdef __cplusplus */
207 #endif /* #ifndef SJME_hGRATUFACOATSJMFHSJMEVDEFH */