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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [powerpc/] [arch/] [v2_0/] [include/] [ppc_stub.h] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_HAL_PPC_STUB_H
2
#define CYGONCE_HAL_PPC_STUB_H
3
//========================================================================
4
//
5
//      ppc_stub.h
6
//
7
//      PowerPC-specific definitions for generic stub
8
//
9
//========================================================================
10
//####ECOSGPLCOPYRIGHTBEGIN####
11
// -------------------------------------------
12
// This file is part of eCos, the Embedded Configurable Operating System.
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under
16
// the terms of the GNU General Public License as published by the Free
17
// Software Foundation; either version 2 or (at your option) any later version.
18
//
19
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22
// for more details.
23
//
24
// You should have received a copy of the GNU General Public License along
25
// with eCos; if not, write to the Free Software Foundation, Inc.,
26
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27
//
28
// As a special exception, if other files instantiate templates or use macros
29
// or inline functions from this file, or you compile this file and link it
30
// with other works to produce a work based on this file, this file does not
31
// by itself cause the resulting work to be covered by the GNU General Public
32
// License. However the source code for this file must still be made available
33
// in accordance with section (3) of the GNU General Public License.
34
//
35
// This exception does not invalidate any other reasons why a work based on
36
// this file might be covered by the GNU General Public License.
37
//
38
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39
// at http://sources.redhat.com/ecos/ecos-license/
40
// -------------------------------------------
41
//####ECOSGPLCOPYRIGHTEND####
42
//========================================================================
43
//#####DESCRIPTIONBEGIN####
44
//
45
// Author(s):     Red Hat, jskov
46
// Contributors:  Red Hat, jskov
47
// Date:          1998-08-20
48
// Purpose:       
49
// Description:   PowerPC-specific definitions for generic stub
50
// Usage:         
51
//
52
//####DESCRIPTIONEND####
53
//
54
//========================================================================
55
 
56
#ifdef __cplusplus
57
extern "C" {
58
#endif
59
 
60
#define NUMREGS    71
61
 
62
#define REGSIZE( _x_ ) (((_x_) >= F0 && (_x_) <= F31) ? 8 : 4)
63
 
64
typedef unsigned long target_register_t;
65
 
66
enum regnames {
67
    R0, R1, R2, R3, R4, R5, R6, R7,
68
    R8, R9, R10, R11, R12, R13, R14, R15,
69
    R16, R17, R18, R19, R20, R21, R22, R23,
70
    R24, R25, R26, R27, R28, R29, R30, R31,
71
    F0, F1, F2, F3, F4, F5, F6, F7,
72
    F8, F9, F10, F11, F12, F13, F14, F15,
73
    F16, F17, F18, F19, F20, F21, F22, F23,
74
    F24, F25, F26, F27, F28, F29, F30, F31,
75
    PC, PS, CND, LR, CNT, XER, MQ
76
};
77
 
78
// For convenience
79
#define SP              R1
80
 
81
typedef enum regnames regnames_t;
82
 
83
/* Given a trap value TRAP, return the corresponding signal. */
84
extern int __computeSignal (unsigned int trap_number);
85
 
86
/* Return the SPARC trap number corresponding to the last-taken trap. */
87
extern int __get_trap_number (void);
88
 
89
/* Return the currently-saved value corresponding to register REG. */
90
extern target_register_t get_register (regnames_t reg);
91
 
92
/* Store VALUE in the register corresponding to WHICH. */
93
extern void put_register (regnames_t which, target_register_t value);
94
 
95
/* Set the currently-saved pc register value to PC. This also updates NPC
96
   as needed. */
97
extern void set_pc (target_register_t pc);
98
 
99
/* Set things up so that the next user resume will execute one instruction.
100
   This may be done by setting breakpoints or setting a single step flag
101
   in the saved user registers, for example. */
102
void __single_step (void);
103
 
104
/* Clear the single-step state. */
105
void __clear_single_step (void);
106
 
107
/* If the breakpoint we hit is in the breakpoint() instruction, return a
108
   non-zero value. */
109
extern int __is_breakpoint_function (void);
110
 
111
/* Skip the current instruction. */
112
extern void __skipinst (void);
113
 
114
extern void __install_breakpoints (void);
115
 
116
extern void __clear_breakpoints (void);
117
 
118
#ifdef __cplusplus
119
}   /* extern "C" */
120
#endif
121
 
122
#endif // ifndef CYGONCE_HAL_PPC_STUB_H

powered by: WebSVN 2.1.0

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