Check-in [6c27b7ec91]

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

Overview
Comment:Add base assembly for system calls; Add system call index.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6c27b7ec91390962450c0d15d6d7f44d2ceed745
User & Date: stephanie.gawroriski 2019-05-23 15:42:04
Context
2019-05-23
15:43
Correct JavaDoc. check-in: 66130acd1d user: stephanie.gawroriski tags: trunk
15:42
Add base assembly for system calls; Add system call index. check-in: 6c27b7ec91 user: stephanie.gawroriski tags: trunk
07:02
Backup developer notes. check-in: edf853a080 user: squirreljme tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/vki/Assembly.java.

509
510
511
512
513
514
515
516


517









































































































































































































































	/**
	 * Sets the current thread pointer.
	 *
	 * @param __v The value to use.
	 * @since 2019/04/27
	 */
	public static native void specialSetThreadRegister(int __v);
}



















































































































































































































































|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
	/**
	 * Sets the current thread pointer.
	 *
	 * @param __v The value to use.
	 * @since 2019/04/27
	 */
	public static native void specialSetThreadRegister(int __v);
	
	/**
	 * Invoke system call at the given index.
	 *
	 * @param __addr The address to invoke.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a, int __b);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a, int __b, int __c);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a, int __b, int __c,
		int __d);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a, int __b, int __c,
		int __d, int __e);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @param __f Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a, int __b, int __c,
		int __d, int __e, int __f);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @param __f Argument.
	 * @param __g Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a, int __b, int __c,
		int __d, int __e, int __f, int __g);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @param __f Argument.
	 * @param __g Argument.
	 * @param __h Argument.
	 * @since 2019/05/23
	 */
	public static native void sysCall(short __si, int __a, int __b, int __c,
		int __d, int __e, int __f, int __g, int __h);
	
	/**
	 * Invoke system call at the given index.
	 *
	 * @param __addr The address to invoke.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a, int __b);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a, int __b, int __c);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a, int __b, int __c,
		int __d);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a, int __b, int __c,
		int __d, int __e);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @param __f Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a, int __b, int __c,
		int __d, int __e, int __f);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @param __f Argument.
	 * @param __g Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a, int __b, int __c,
		int __d, int __e, int __f, int __g);
	
	/**
	 * Invoke system call at the given index, with arguments.
	 *
	 * @param __addr The address to invoke.
	 * @param __a Argument.
	 * @param __b Argument.
	 * @param __c Argument.
	 * @param __d Argument.
	 * @param __e Argument.
	 * @param __f Argument.
	 * @param __g Argument.
	 * @param __h Argument.
	 * @return The result of the invocation.
	 * @since 2019/05/23
	 */
	public static native int sysCallV(short __si, int __a, int __b, int __c,
		int __d, int __e, int __f, int __g, int __h);
}

Added runt/apis/cldc-compact/cc/squirreljme/runtime/cldc/vki/SystemCallIndex.java.































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// Multi-Phasic Applications: SquirrelJME
//     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package cc.squirreljme.runtime.cldc.vki;

/**
 * This contains the index of system calls.
 *
 * @since 2019/05/23
 */
public interface SystemCallIndex
{
	/** Checks if the system call is supported. */
	public static final short QUERY_INDEX =
		0;
	
	/** Gets the last error state. */
	public static final short ERROR_GET =
		1;
	
	/** Sets the last error state. */
	public static final short ERROR_SET =
		2;
}