OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [cpu/] [sparc/] [rtems.S] - Blame information for rev 593

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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
 *  Ported to ERC32 implementation of the SPARC by On-Line Applications
14
 *  Research Corporation (OAR) under contract to the European Space
15
 *  Agency (ESA).
16
 *
17
 *  ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
18
 *  European Space Agency.
19
 *
20
 *  $Id: rtems.S,v 1.2 2001-09-27 11:59:30 chris Exp $
21
 */
22
 
23
#include 
24
 
25
/*
26
 *  RTEMS
27
 *
28
 *  This routine jumps to the directive indicated in the
29
 *  CPU defined register.  This routine is used when RTEMS is
30
 *  linked by itself and placed in ROM.  This routine is the
31
 *  first address in the ROM space for RTEMS.  The user "calls"
32
 *  this address with the directive arguments in the normal place.
33
 *  This routine then jumps indirectly to the correct directive
34
 *  preserving the arguments.  The directive should not realize
35
 *  it has been "wrapped" in this way.  The table "_Entry_points"
36
 *  is used to look up the directive.
37
 *
38
 *  void RTEMS()
39
 */
40
 
41
        .align 4
42
        PUBLIC(RTEMS)
43
SYM(RTEMS):
44
        /*
45
         *  g2 was chosen because gcc uses it as a scratch register in
46
         *  similar code scenarios and the other locals, ins, and outs
47
         *  are off limits to this routine unless it does a "save" and
48
         *  copies its in registers to the outs which only works up until
49
         *  6 parameters.  Best to take the simple approach in this case.
50
         */
51
        sethi     SYM(_Entry_points), %g2
52
        or        %g2, %lo(SYM(_Entry_points)), %g2
53
        sll       %g1, 2,  %g1
54
        add       %g1, %g2, %g2
55
        jmp       %g2
56
        nop
57
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.