source: rtems/c/src/exec/score/cpu/sparc/rtems.S @ 4159370

4.104.114.84.95
Last change on this file since 4159370 was 4159370, checked in by Joel Sherrill <joel.sherrill@…>, on 07/11/00 at 21:16:53

Reworked score/cpu/sparc so it can be safely compiled multilib. All
routines and structures that require CPU model specific information
are now in libcpu. This primarily required moving erc32 specific
information from score/cpu files to libcpu/sparc and the erc32 BSP.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*  rtems.s
2 *
3 *  This file contains the single entry point code for
4 *  the SPARC port of RTEMS.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#include <asm.h>
17
18/*
19 *  RTEMS
20 *
21 *  This routine jumps to the directive indicated in the
22 *  CPU defined register.  This routine is used when RTEMS is
23 *  linked by itself and placed in ROM.  This routine is the
24 *  first address in the ROM space for RTEMS.  The user "calls"
25 *  this address with the directive arguments in the normal place.
26 *  This routine then jumps indirectly to the correct directive
27 *  preserving the arguments.  The directive should not realize
28 *  it has been "wrapped" in this way.  The table "_Entry_points"
29 *  is used to look up the directive.
30 * 
31 *  void RTEMS()
32 */
33
34        .align 4
35        PUBLIC(RTEMS)
36SYM(RTEMS):
37        /*
38         *  g2 was chosen because gcc uses it as a scratch register in
39         *  similar code scenarios and the other locals, ins, and outs
40         *  are off limits to this routine unless it does a "save" and
41         *  copies its in registers to the outs which only works up until
42         *  6 parameters.  Best to take the simple approach in this case.
43         */
44        sethi     SYM(_Entry_points), %g2
45        or        %g2, %lo(SYM(_Entry_points)), %g2
46        sll       %g1, 2,  %g1
47        add       %g1, %g2, %g2
48        jmp       %g2
49        nop
50
Note: See TracBrowser for help on using the repository browser.