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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [frv/] [arch/] [current/] [include/] [frv_stub.h] - Blame information for rev 838

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

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_FRV_STUB_H
2
#define CYGONCE_HAL_FRV_STUB_H
3
//========================================================================
4
//
5
//      frv_stub.h
6
//
7
//      FUJITSU-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 Free Software Foundation, 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      
18
// version.                                                                 
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT      
21
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
23
// for more details.                                                        
24
//
25
// You should have received a copy of the GNU General Public License        
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
28
//
29
// As a special exception, if other files instantiate templates or use      
30
// macros or inline functions from this file, or you compile this file      
31
// and link it with other works to produce a work based on this file,       
32
// this file does not by itself cause the resulting work to be covered by   
33
// the GNU General Public License. However the source code for this file    
34
// must still be made available in accordance with section (3) of the GNU   
35
// General Public License v2.                                               
36
//
37
// This exception does not invalidate any other reasons why a work based    
38
// on this file might be covered by the GNU General Public License.         
39
// -------------------------------------------                              
40
// ####ECOSGPLCOPYRIGHTEND####                                              
41
//========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):     Red Hat, gthomas
45
// Contributors:  Red Hat, gthomas
46
// Date:          2001-09-14
47
// Purpose:       
48
// Description:   FUJITSU-specific definitions for generic stub
49
// Usage:         
50
//
51
//####DESCRIPTIONEND####
52
//
53
//========================================================================
54
 
55
#ifdef __cplusplus
56
extern "C" {
57
#endif
58
 
59
#define NUMREGS    (147)
60
 
61
#define REGSIZE( _x_ ) (4)
62
 
63
#define NUMREGBYTES (NUMREGS*4)
64
 
65
#ifndef TARGET_REGISTER_T_DEFINED
66
#define TARGET_REGISTER_T_DEFINED
67
typedef cyg_uint32 target_register_t;
68
#endif
69
 
70
// This information needs to match what GDB wants
71
enum regnames {
72
    R0, R1, R2, R3, R4, R5, R6, R7,
73
    R8, R9, R10, R11, R12, R13, R14, R15,
74
    R16, R17, R18, R19, R20, R21, R22, R23,
75
    R24, R25, R26, R27, R28, R29, R30, R31,
76
    R32, R33, R34, R35, R36, R37, R38, R39,
77
    R40, R41, R42, R43, R44, R45, R46, R47,
78
    R48, R49, R50, R51, R52, R53, R54, R55,
79
    R56, R57, R58, R59, R60, R61, R62, R63,
80
    FP0, FP1, FP2, FP3, FP4, FP5, FP6, FP7,
81
    FP8, FP9, FP10, FP11, FP12, FP13, FP14, FP15,
82
    FP16, FP17, FP18, FP19, FP20, FP21, FP22, FP23,
83
    FP24, FP25, FP26, FP27, FP28, FP29, FP30, FP31,
84
    FP32, FP33, FP34, FP35, FP36, FP37, FP38, FP39,
85
    FP40, FP41, FP42, FP43, FP44, FP45, FP46, FP47,
86
    FP48, FP49, FP50, FP51, FP52, FP53, FP54, FP55,
87
    FP56, FP57, FP58, FP59, FP60, FP61, FP62, FP63,
88
    PC, PSR, CCR, CCCR,
89
    _X132, _X133, _X134, _X135, _X136, _X137, _X138,
90
    _X139, _X140, _X141, _X142, _X143, _X144,
91
    LR, LCR
92
};
93
#define SP R1
94
 
95
typedef enum regnames regnames_t;
96
 
97
/* Given a trap value TRAP, return the corresponding signal. */
98
extern int __computeSignal (unsigned int trap_number);
99
 
100
/* Return the SPARC trap number corresponding to the last-taken trap. */
101
extern int __get_trap_number (void);
102
 
103
/* Return the currently-saved value corresponding to register REG. */
104
extern target_register_t get_register (regnames_t reg);
105
 
106
/* Store VALUE in the register corresponding to WHICH. */
107
extern void put_register (regnames_t which, target_register_t value);
108
 
109
/* Set the currently-saved pc register value to PC. This also updates NPC
110
   as needed. */
111
extern void set_pc (target_register_t pc);
112
 
113
/* Set things up so that the next user resume will execute one instruction.
114
   This may be done by setting breakpoints or setting a single step flag
115
   in the saved user registers, for example. */
116
void __single_step (void);
117
 
118
/* Clear the single-step state. */
119
void __clear_single_step (void);
120
 
121
/* If the breakpoint we hit is in the breakpoint() instruction, return a
122
   non-zero value. */
123
extern int __is_breakpoint_function (void);
124
 
125
/* Skip the current instruction. */
126
extern void __skipinst (void);
127
 
128
extern void __install_breakpoints (void);
129
 
130
extern void __clear_breakpoints (void);
131
 
132
extern int __is_bsp_syscall(void);
133
 
134
//------------------------------------------------------------------------
135
// Special definition of CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION
136
 
137
#ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
138
// we can only do this at all if break support is enabled:
139
 
140
#define CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION( _old_ )                       \
141
do {                                                                        \
142
    HAL_DISABLE_INTERRUPTS(_old_);                                          \
143
    cyg_hal_gdb_place_break((target_register_t)&&cyg_hal_gdb_break_place ); \
144
} while ( 0 )
145
 
146
#endif // CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
147
 
148
 
149
#ifdef __cplusplus
150
} /* extern "C" */
151
#endif
152
 
153
#endif // ifndef CYGONCE_HAL_FRV_STUB_H

powered by: WebSVN 2.1.0

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