diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-12-14 23:15:38 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-12-14 23:15:38 +0000 |
commit | 01629105c2817a59a4f1f05039593f211cf5ddaa (patch) | |
tree | 76f6bb8f9ca6ddbd015e3b81964a8dacffaf5cf9 /c/src/exec/score/cpu/sparc/rtems.S | |
parent | Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to rename all (diff) | |
download | rtems-01629105c2817a59a4f1f05039593f211cf5ddaa.tar.bz2 |
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to rename all
.s files to .S in conformance with GNU conventions. This is a
minor step along the way to supporting automake.
Diffstat (limited to 'c/src/exec/score/cpu/sparc/rtems.S')
-rw-r--r-- | c/src/exec/score/cpu/sparc/rtems.S | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/c/src/exec/score/cpu/sparc/rtems.S b/c/src/exec/score/cpu/sparc/rtems.S new file mode 100644 index 0000000000..f20d8c8288 --- /dev/null +++ b/c/src/exec/score/cpu/sparc/rtems.S @@ -0,0 +1,58 @@ +/* rtems.s + * + * This file contains the single entry point code for + * the SPARC port of RTEMS. + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * Ported to ERC32 implementation of the SPARC by On-Line Applications + * Research Corporation (OAR) under contract to the European Space + * Agency (ESA). + * + * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995. + * European Space Agency. + * + * $Id$ + */ + +#include <asm.h> + +/* + * RTEMS + * + * This routine jumps to the directive indicated in the + * CPU defined register. This routine is used when RTEMS is + * linked by itself and placed in ROM. This routine is the + * first address in the ROM space for RTEMS. The user "calls" + * this address with the directive arguments in the normal place. + * This routine then jumps indirectly to the correct directive + * preserving the arguments. The directive should not realize + * it has been "wrapped" in this way. The table "_Entry_points" + * is used to look up the directive. + * + * void RTEMS() + */ + + .align 4 + PUBLIC(RTEMS) +SYM(RTEMS): + /* + * 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 + |