summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/sparc/rtems.s
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-10-30 21:54:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-10-30 21:54:45 +0000
commit97005786d89fd7a57b5fe82f713cea739916f3da (patch)
treecfff15a6bc93114480ecd20f6afddde3dcd74470 /c/src/exec/score/cpu/sparc/rtems.s
parentreordered test cases from simple to complex (diff)
downloadrtems-97005786d89fd7a57b5fe82f713cea739916f3da.tar.bz2
SPARC port passes all tests
Diffstat (limited to 'c/src/exec/score/cpu/sparc/rtems.s')
-rw-r--r--c/src/exec/score/cpu/sparc/rtems.s16
1 files changed, 13 insertions, 3 deletions
diff --git a/c/src/exec/score/cpu/sparc/rtems.s b/c/src/exec/score/cpu/sparc/rtems.s
index 2b9bd10454..75aa41f83b 100644
--- a/c/src/exec/score/cpu/sparc/rtems.s
+++ b/c/src/exec/score/cpu/sparc/rtems.s
@@ -22,12 +22,22 @@
* is used to look up the directive.
*
* void RTEMS()
- * {
- * }
*/
.align 4
PUBLIC(RTEMS)
SYM(RTEMS):
- ret
+ /*
+ * g2 was chosen because gcc uses it as a scratch register in
+ * similar code scenarios and the other locals, ins, and outs
+ * are off limits to this routine unless it does a "save" and
+ * copies its in registers to the outs which only works up until
+ * 6 parameters. Best to take the simple approach in this case.
+ */
+ sethi SYM(_Entry_points), %g2
+ or %g2, %lo(SYM(_Entry_points)), %g2
+ sll %g1, 2, %g1
+ add %g1, %g2, %g2
+ jmp %g2
+ nop