1 |
786 |
skrzyp |
#ifndef CYGONCE_HAL_NEC_STUB_H
|
2 |
|
|
#define CYGONCE_HAL_NEC_STUB_H
|
3 |
|
|
//========================================================================
|
4 |
|
|
//
|
5 |
|
|
// nec-stub.h
|
6 |
|
|
//
|
7 |
|
|
// NEC-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, nickg
|
45 |
|
|
// Contributors: Red Hat, nickg
|
46 |
|
|
// Date: 1998-06-08
|
47 |
|
|
// Purpose:
|
48 |
|
|
// Description: NEC-specific definitions for generic stub
|
49 |
|
|
// Usage:
|
50 |
|
|
//
|
51 |
|
|
//####DESCRIPTIONEND####
|
52 |
|
|
//
|
53 |
|
|
//========================================================================
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
#ifdef __cplusplus
|
57 |
|
|
extern "C" {
|
58 |
|
|
#endif
|
59 |
|
|
|
60 |
|
|
#define NUMREGS 66
|
61 |
|
|
#define REGSIZE(X) 4
|
62 |
|
|
typedef unsigned long target_register_t;
|
63 |
|
|
|
64 |
|
|
enum regnames {
|
65 |
|
|
R0, R1, SP, R3, R4, R5, R6, R7,
|
66 |
|
|
R8, R9 , R10, R11, R12, R13, R14, R15,
|
67 |
|
|
R16, R17, R18, R19, R20, R21, R22, R23,
|
68 |
|
|
R24, R25, R26, R27, R28, R29, R30, R31,
|
69 |
|
|
EIPC, EIPSW, FEPC, FEPSW, ECR, PSW, SR6, SR7,
|
70 |
|
|
SR8, SR9 , SR10, SR11, SR12, SR13, SR14, SR15,
|
71 |
|
|
SR16, SR17, SR18, SR19, SR20, SR21, SR22, SR23,
|
72 |
|
|
SR24, SR25, SR26, SR27, SR28, SR29, SR30, SR31,
|
73 |
|
|
PC, FP
|
74 |
|
|
};
|
75 |
|
|
|
76 |
|
|
typedef enum regnames regnames_t;
|
77 |
|
|
|
78 |
|
|
/* Given a trap value TRAP, return the corresponding signal. */
|
79 |
|
|
extern int __computeSignal (unsigned int trap_number);
|
80 |
|
|
|
81 |
|
|
/* Return the SPARC trap number corresponding to the last-taken trap. */
|
82 |
|
|
extern int __get_trap_number (void);
|
83 |
|
|
|
84 |
|
|
/* Return the currently-saved value corresponding to register REG. */
|
85 |
|
|
extern target_register_t get_register (regnames_t reg);
|
86 |
|
|
|
87 |
|
|
/* Store VALUE in the register corresponding to WHICH. */
|
88 |
|
|
extern void put_register (regnames_t which, target_register_t value);
|
89 |
|
|
|
90 |
|
|
/* Set the currently-saved pc register value to PC. This also updates NPC
|
91 |
|
|
as needed. */
|
92 |
|
|
extern void set_pc (target_register_t pc);
|
93 |
|
|
|
94 |
|
|
/* Set things up so that the next user resume will execute one instruction.
|
95 |
|
|
This may be done by setting breakpoints or setting a single step flag
|
96 |
|
|
in the saved user registers, for example. */
|
97 |
|
|
void __single_step (void);
|
98 |
|
|
|
99 |
|
|
/* Clear the single-step state. */
|
100 |
|
|
void __clear_single_step (void);
|
101 |
|
|
|
102 |
|
|
/* If the breakpoint we hit is in the breakpoint() instruction, return a
|
103 |
|
|
non-zero value. */
|
104 |
|
|
extern int __is_breakpoint_function (void);
|
105 |
|
|
|
106 |
|
|
/* Skip the current instruction. */
|
107 |
|
|
extern void __skipinst (void);
|
108 |
|
|
|
109 |
|
|
extern void __install_breakpoints (void);
|
110 |
|
|
|
111 |
|
|
extern void __clear_breakpoints (void);
|
112 |
|
|
|
113 |
|
|
#ifdef __cplusplus
|
114 |
|
|
} /* extern "C" */
|
115 |
|
|
#endif
|
116 |
|
|
|
117 |
|
|
#endif // ifndef CYGONCE_HAL_NEC_STUB_H
|