diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-10-30 21:54:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-10-30 21:54:45 +0000 |
commit | 97005786d89fd7a57b5fe82f713cea739916f3da (patch) | |
tree | cfff15a6bc93114480ecd20f6afddde3dcd74470 /c/src/exec/score/cpu/sparc/rtems.s | |
parent | reordered test cases from simple to complex (diff) | |
download | rtems-97005786d89fd7a57b5fe82f713cea739916f3da.tar.bz2 |
SPARC port passes all tests
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/score/cpu/sparc/rtems.s | 16 |
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 |