Check-in [59b3122181]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Implement CHECK_FOR_COMPATIBILITY system call.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wip-springcoat-bringup
Files: files | file ages | folders
SHA1: 59b31221814018b8da627144eb030dc07f5d66b6
User & Date: stephanie.gawroriski 2020-05-12 12:38:27
Context
2020-05-12
13:48
Initialize and setting of thread contexts. check-in: d0961b4719 user: stephanie.gawroriski tags: wip-springcoat-bringup
12:38
Implement CHECK_FOR_COMPATIBILITY system call. check-in: 59b3122181 user: stephanie.gawroriski tags: wip-springcoat-bringup
2020-05-11
02:34
Add some more base system calls and otherwise. check-in: 62ae333b39 user: stephanie.gawroriski tags: wip-springcoat-bringup
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/SystemCallHandler.java.

253
254
255
256
257
258
259

260
261
262
263
264
265
266
...
270
271
272
273
274
275
276






277
278
279
280
281
282
283
			switch (__sid)
			{
				case SystemCallIndex.QUERY_INDEX:
					switch (__a)
					{
							// Supported system calls
						case SystemCallIndex.API_LEVEL:

						case SystemCallIndex.ERROR_GET:
						case SystemCallIndex.ERROR_SET:
						case SystemCallIndex.EXIT:
						case SystemCallIndex.FRAME_TASK_ID_GET:
						case SystemCallIndex.HW_THREAD:
						case SystemCallIndex.PD_OF_STDERR:
						case SystemCallIndex.QUERY_INDEX:
................................................................................
						default:
							return 0;
					}
					
					// Current API level
				case SystemCallIndex.API_LEVEL:
					return Constants.API_LEVEL_2020_05_10;






					
					// Get error
				case SystemCallIndex.ERROR_GET:
					return __thread.thread._syscallerrors[(__a < 0 ||
						__a >= SystemCallIndex.NUM_SYSCALLS ? 0 : __a)];
				
					// Set error







>







 







>
>
>
>
>
>







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
...
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
			switch (__sid)
			{
				case SystemCallIndex.QUERY_INDEX:
					switch (__a)
					{
							// Supported system calls
						case SystemCallIndex.API_LEVEL:
						case SystemCallIndex.CHECK_EXEC_COMPATIBILITY:
						case SystemCallIndex.ERROR_GET:
						case SystemCallIndex.ERROR_SET:
						case SystemCallIndex.EXIT:
						case SystemCallIndex.FRAME_TASK_ID_GET:
						case SystemCallIndex.HW_THREAD:
						case SystemCallIndex.PD_OF_STDERR:
						case SystemCallIndex.QUERY_INDEX:
................................................................................
						default:
							return 0;
					}
					
					// Current API level
				case SystemCallIndex.API_LEVEL:
					return Constants.API_LEVEL_2020_05_10;
					
					// ROM requests a check for compatibility
				case SystemCallIndex.CHECK_EXEC_COMPATIBILITY:
					if (__a >= Constants.API_LEVEL_2020_05_10)
						return 1;
					return 0;
					
					// Get error
				case SystemCallIndex.ERROR_GET:
					return __thread.thread._syscallerrors[(__a < 0 ||
						__a >= SystemCallIndex.NUM_SYSCALLS ? 0 : __a)];
				
					// Set error