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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [config/] [tic80/] [tm-tic80.h] - Blame information for rev 578

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

Line No. Rev Author Line
1 578 markom
/* OBSOLETE /* Parameters for execution on a TI TMS320C80 (MVP) processor. */
2
/* OBSOLETE    Copyright 1997, 1999, 2000 */
3
/* OBSOLETE    Free Software Foundation, Inc. */
4
/* OBSOLETE  */
5
/* OBSOLETE    This file is part of GDB. */
6
/* OBSOLETE  */
7
/* OBSOLETE    This program is free software; you can redistribute it and/or modify */
8
/* OBSOLETE    it under the terms of the GNU General Public License as published by */
9
/* OBSOLETE    the Free Software Foundation; either version 2 of the License, or */
10
/* OBSOLETE    (at your option) any later version. */
11
/* OBSOLETE  */
12
/* OBSOLETE    This program is distributed in the hope that it will be useful, */
13
/* OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of */
14
/* OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
15
/* OBSOLETE    GNU General Public License for more details. */
16
/* OBSOLETE  */
17
/* OBSOLETE    You should have received a copy of the GNU General Public License */
18
/* OBSOLETE    along with this program; if not, write to the Free Software */
19
/* OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330, */
20
/* OBSOLETE    Boston, MA 02111-1307, USA.  */ */
21
/* OBSOLETE  */
22
/* OBSOLETE #ifndef TM_TIC80_H */
23
/* OBSOLETE #define TM_TIC80_H */
24
/* OBSOLETE  */
25
/* OBSOLETE #include "regcache.h" */
26
/* OBSOLETE  */
27
/* OBSOLETE /* Forward declare structs used in prototypes */ */
28
/* OBSOLETE struct frame_info; */
29
/* OBSOLETE struct type; */
30
/* OBSOLETE struct value; */
31
/* OBSOLETE struct symbol; */
32
/* OBSOLETE struct frame_saved_regs; */
33
/* OBSOLETE  */
34
/* OBSOLETE #define TARGET_BYTE_ORDER LITTLE_ENDIAN */
35
/* OBSOLETE  */
36
/* OBSOLETE #define NUM_REGS 38 */
37
/* OBSOLETE  */
38
/* OBSOLETE #define REGISTER_NAMES \ */
39
/* OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ */
40
/* OBSOLETE   "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ */
41
/* OBSOLETE   "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ */
42
/* OBSOLETE   "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \ */
43
/* OBSOLETE   "pc", "npc", \ */
44
/* OBSOLETE   "a0", "a1", "a2", "a3", \ */
45
/* OBSOLETE } */
46
/* OBSOLETE  */
47
/* OBSOLETE /* Various dedicated register numbers */
48
/* OBSOLETE    FIXME: Shadow updates in sim/tic80/sim-calls.c */ */
49
/* OBSOLETE  */
50
/* OBSOLETE #define SP_REGNUM 1         /* Contains address of top of stack */ */
51
/* OBSOLETE #define ARG0_REGNUM 2               /* Contains argument 1 (r3 has high word) */ */
52
/* OBSOLETE #define RET_REGNUM  2               /* Contains function return value */ */
53
/* OBSOLETE #define ARGLAST_REGNUM 12   /* Contains argument 6 (r13 has high word) */ */
54
/* OBSOLETE #define FP_REGNUM 30                /* Contains address of executing stack frame */ */
55
/* OBSOLETE #define LR_REGNUM 31                /* Contains address of caller (link register) */ */
56
/* OBSOLETE #define PC_REGNUM 32                /* Contains program counter (FIXME?) */ */
57
/* OBSOLETE #define NPC_REGNUM 33               /* Contains the next program counter (FIXME?) */ */
58
/* OBSOLETE #define A0_REGNUM 34                /* Accumulator register 0 */ */
59
/* OBSOLETE #define A3_REGNUM 37                /* Accumulator register 1 */ */
60
/* OBSOLETE  */
61
/* OBSOLETE #define R0_REGNUM 0         /* General Purpose Register 0 - for sim */ */
62
/* OBSOLETE #define Rn_REGNUM 31                /* Last General Purpose Register - for sim */ */
63
/* OBSOLETE #define An_REGNUM A3_REGNUM /* Last Accumulator register - for sim */ */
64
/* OBSOLETE  */
65
/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */
66
/* OBSOLETE    register state, the array `registers'.  */ */
67
/* OBSOLETE  */
68
/* OBSOLETE #define REGISTER_BYTES (((NUM_REGS - 4) * 4) + (4 * 8)) */
69
/* OBSOLETE  */
70
/* OBSOLETE /* Index within `registers' of the first byte of the space for */
71
/* OBSOLETE    register N.  */ */
72
/* OBSOLETE  */
73
/* OBSOLETE #define REGISTER_BYTE(N) \ */
74
/* OBSOLETE    (((N) >= A0_REGNUM) ? (((N) - A0_REGNUM) * 8 + A0_REGNUM * 4) : ((N) * 4)) */
75
/* OBSOLETE  */
76
/* OBSOLETE /* Most registers are 4 bytes */ */
77
/* OBSOLETE  */
78
/* OBSOLETE #define REGISTER_SIZE 4 */
79
/* OBSOLETE  */
80
/* OBSOLETE /* Some registers are 8 bytes.  */ */
81
/* OBSOLETE  */
82
/* OBSOLETE #define REGISTER_RAW_SIZE(N) \ */
83
/* OBSOLETE      (((N) >= A0_REGNUM) ? 8 : 4) */
84
/* OBSOLETE  */
85
/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have.  */ */
86
/* OBSOLETE  */
87
/* OBSOLETE #define MAX_REGISTER_RAW_SIZE (8) */
88
/* OBSOLETE  */
89
/* OBSOLETE /* All regs are 4 bytes.  */ */
90
/* OBSOLETE  */
91
/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) (REGISTER_RAW_SIZE(N)) */
92
/* OBSOLETE  */
93
/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.  */ */
94
/* OBSOLETE  */
95
/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE (MAX_REGISTER_RAW_SIZE) */
96
/* OBSOLETE  */
97
/* OBSOLETE /* Return the GDB type object for the "standard" data type */
98
/* OBSOLETE    of data in register N.  */ */
99
/* OBSOLETE  */
100
/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) /* FIXME? */ \ */
101
/* OBSOLETE     (((N) >= A0_REGNUM) ? builtin_type_float : builtin_type_int) */
102
/* OBSOLETE  */
103
/* OBSOLETE /* Offset from address of function to start of its code. */
104
/* OBSOLETE    Zero on most machines.  */ */
105
/* OBSOLETE  */
106
/* OBSOLETE #define FUNCTION_START_OFFSET 0 */
107
/* OBSOLETE  */
108
/* OBSOLETE /* Stack grows downward.  */ */
109
/* OBSOLETE  */
110
/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
111
/* OBSOLETE  */
112
/* OBSOLETE /* Sequence of bytes for breakpoint instruction. */
113
/* OBSOLETE    This is padded out to the size of a machine word. */ */
114
/* OBSOLETE  */
115
/* OBSOLETE #define BREAKPOINT          {0x49, 0x80, 0x00, 0x00}        /* FIXME! */ */
116
/* OBSOLETE  */
117
/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */
118
/* OBSOLETE    This is often the number of bytes in BREAKPOINT */
119
/* OBSOLETE    but not always.  */ */
120
/* OBSOLETE  */
121
/* OBSOLETE #define DECR_PC_AFTER_BREAK 0        /* FIXME! */ */
122
/* OBSOLETE  */
123
/* OBSOLETE /* Discard from the stack the innermost frame, restoring all registers.  */ */
124
/* OBSOLETE  */
125
/* OBSOLETE #define POP_FRAME tic80_pop_frame(get_current_frame ()) */
126
/* OBSOLETE extern struct frame_info *tic80_pop_frame (struct frame_info *frame); */
127
/* OBSOLETE  */
128
/* OBSOLETE /* Return number of bytes at start of arglist that are not really args.  */ */
129
/* OBSOLETE  */
130
/* OBSOLETE #define FRAME_ARGS_SKIP 0 */
131
/* OBSOLETE  */
132
/* OBSOLETE /* Set VAL to the number of args passed to frame described by FI. */
133
/* OBSOLETE    Can set VAL to -1, meaning no way to tell.  */ */
134
/* OBSOLETE /* We can't tell how many args there are */ */
135
/* OBSOLETE  */
136
/* OBSOLETE #define FRAME_NUM_ARGS(fi) (-1) */
137
/* OBSOLETE  */
138
/* OBSOLETE #define FRAME_ARGS_SKIP 0 */
139
/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi)   (fi)->frame */
140
/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame */
141
/* OBSOLETE  */
142
/* OBSOLETE /* Define other aspects of the stack frame.  */
143
/* OBSOLETE    We keep the offsets of all saved registers, 'cause we need 'em a lot! */
144
/* OBSOLETE    We also keep the current size of the stack frame, and the offset of */
145
/* OBSOLETE    the frame pointer from the stack pointer (for frameless functions, and */
146
/* OBSOLETE    when we're still in the prologue of a function with a frame) */ */
147
/* OBSOLETE  */
148
/* OBSOLETE #define EXTRA_FRAME_INFO    \ */
149
/* OBSOLETE   struct frame_saved_regs fsr;      \ */
150
/* OBSOLETE   int framesize;            \ */
151
/* OBSOLETE   int frameoffset;          \ */
152
/* OBSOLETE   int framereg; */
153
/* OBSOLETE  */
154
/* OBSOLETE extern void tic80_init_extra_frame_info (struct frame_info *fi); */
155
/* OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) tic80_init_extra_frame_info (fi) */
156
/* OBSOLETE #define INIT_FRAME_PC               /* Not necessary */ */
157
/* OBSOLETE  */
158
/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */
159
/* OBSOLETE    the addresses of the saved registers of frame described by FRAME_INFO. */
160
/* OBSOLETE    This includes special registers such as pc and fp saved in special */
161
/* OBSOLETE    ways in the stack frame.  sp is even more special: */
162
/* OBSOLETE    the address we return for it IS the sp for the next frame.  */ */
163
/* OBSOLETE  */
164
/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs)     \ */
165
/* OBSOLETE    tic80_frame_find_saved_regs(frame_info, &(frame_saved_regs)) */
166
/* OBSOLETE extern void tic80_frame_find_saved_regs (struct frame_info *, */
167
/* OBSOLETE                                      struct frame_saved_regs *); */
168
/* OBSOLETE  */
169
/* OBSOLETE /* Advance PC across any function entry prologue instructions */
170
/* OBSOLETE    to reach some "real" code.  */ */
171
/* OBSOLETE  */
172
/* OBSOLETE #define SKIP_PROLOGUE(pc) (tic80_skip_prologue (pc)) */
173
/* OBSOLETE extern CORE_ADDR tic80_skip_prologue (CORE_ADDR pc); */
174
/* OBSOLETE  */
175
/* OBSOLETE /* Immediately after a function call, return the saved pc. */
176
/* OBSOLETE    Can't always go through the frames for this because on some machines */
177
/* OBSOLETE    the new frame is not set up until the new function executes */
178
/* OBSOLETE    some instructions.  */ */
179
/* OBSOLETE  */
180
/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) read_register (LR_REGNUM) */
181
/* OBSOLETE  */
182
/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */
183
/* OBSOLETE    (its caller).  */ */
184
/* OBSOLETE  */
185
/* OBSOLETE /* FRAME_CHAIN takes a frame's nominal address */
186
/* OBSOLETE    and produces the frame's chain-pointer. */ */
187
/* OBSOLETE  */
188
/* OBSOLETE #define FRAME_CHAIN(thisframe) (CORE_ADDR) tic80_frame_chain (thisframe) */
189
/* OBSOLETE extern CORE_ADDR tic80_frame_chain (struct frame_info *); */
190
/* OBSOLETE  */
191
/* OBSOLETE #define FRAME_SAVED_PC(FRAME)       tic80_frame_saved_pc (FRAME) */
192
/* OBSOLETE extern CORE_ADDR tic80_frame_saved_pc (struct frame_info *); */
193
/* OBSOLETE  */
194
/* OBSOLETE /* Store the address of the place in which to copy the structure the */
195
/* OBSOLETE    subroutine will return.  This is called from call_function.  */
196
/* OBSOLETE  */
197
/* OBSOLETE    We store structs through a pointer passed in R2 */ */
198
/* OBSOLETE  */
199
/* OBSOLETE #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP)        \ */
200
/* OBSOLETE     write_register (ARG0_REGNUM, STRUCT_ADDR) */
201
/* OBSOLETE  */
202
/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
203
/* OBSOLETE    a function return value of type TYPE, and copy that, in virtual format, */
204
/* OBSOLETE    into VALBUF.  */ */
205
/* OBSOLETE  */
206
/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
207
/* OBSOLETE   memcpy ((VALBUF), \ */
208
/* OBSOLETE       (char *)(REGBUF) + REGISTER_BYTE (RET_REGNUM) + \ */
209
/* OBSOLETE       ((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \ */
210
/* OBSOLETE       TYPE_LENGTH (TYPE)) */
211
/* OBSOLETE  */
212
/* OBSOLETE /* Write into appropriate registers a function return value */
213
/* OBSOLETE    of type TYPE, given in virtual format.  */ */
214
/* OBSOLETE  */
215
/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
216
/* OBSOLETE   write_register_bytes(REGISTER_BYTE (RET_REGNUM) + \ */
217
/* OBSOLETE                    ((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\ */
218
/* OBSOLETE                    (VALBUF), TYPE_LENGTH (TYPE)); */
219
/* OBSOLETE  */
220
/* OBSOLETE  */
221
/* OBSOLETE  */
222
/* OBSOLETE /* PUSH_ARGUMENTS */ */
223
/* OBSOLETE extern CORE_ADDR tic80_push_arguments (int nargs, */
224
/* OBSOLETE                                    struct value **args, */
225
/* OBSOLETE                                    CORE_ADDR sp, */
226
/* OBSOLETE                                    unsigned char struct_return, */
227
/* OBSOLETE                                    CORE_ADDR struct_addr); */
228
/* OBSOLETE  */
229
/* OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \ */
230
/* OBSOLETE   (tic80_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)) */
231
/* OBSOLETE  */
232
/* OBSOLETE /* PUSH_RETURN_ADDRESS */ */
233
/* OBSOLETE extern CORE_ADDR tic80_push_return_address (CORE_ADDR, CORE_ADDR); */
234
/* OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP) tic80_push_return_address (PC, SP) */
235
/* OBSOLETE  */
236
/* OBSOLETE /* override the standard get_saved_register function with  */
237
/* OBSOLETE    one that takes account of generic CALL_DUMMY frames */ */
238
/* OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \ */
239
/* OBSOLETE       generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval) */
240
/* OBSOLETE  */
241
/* OBSOLETE #define USE_GENERIC_DUMMY_FRAMES 1 */
242
/* OBSOLETE #define CALL_DUMMY                   {0} */
243
/* OBSOLETE #define CALL_DUMMY_LENGTH            (0) */
244
/* OBSOLETE #define CALL_DUMMY_START_OFFSET      (0) */
245
/* OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0) */
246
/* OBSOLETE #define FIX_CALL_DUMMY(DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) */
247
/* OBSOLETE #define CALL_DUMMY_LOCATION          AT_ENTRY_POINT */
248
/* OBSOLETE #define CALL_DUMMY_ADDRESS()         entry_point_address () */
249
/* OBSOLETE  */
250
/* OBSOLETE /* generic dummy frame stuff */ */
251
/* OBSOLETE  */
252
/* OBSOLETE #define PUSH_DUMMY_FRAME             generic_push_dummy_frame () */
253
/* OBSOLETE #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP) */
254
/* OBSOLETE  */
255
/* OBSOLETE #endif /* TM_TIC80_H */ */

powered by: WebSVN 2.1.0

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