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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [config/] [m68k/] [xm-altos.h] - Blame information for rev 1774

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

Line No. Rev Author Line
1 106 markom
/* OBSOLETE /* Definitions to make GDB run on an Altos 3068 (m68k running SVR2) */
2
/* OBSOLETE    Copyright (C) 1987,1989 Free Software Foundation, Inc. */
3
/* OBSOLETE  */
4
/* OBSOLETE This file is part of GDB. */
5
/* OBSOLETE  */
6
/* OBSOLETE This program is free software; you can redistribute it and/or modify */
7
/* OBSOLETE it under the terms of the GNU General Public License as published by */
8
/* OBSOLETE the Free Software Foundation; either version 2 of the License, or */
9
/* OBSOLETE (at your option) any later version. */
10
/* OBSOLETE  */
11
/* OBSOLETE This program is distributed in the hope that it will be useful, */
12
/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
13
/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
14
/* OBSOLETE GNU General Public License for more details. */
15
/* OBSOLETE  */
16
/* OBSOLETE You should have received a copy of the GNU General Public License */
17
/* OBSOLETE along with this program; if not, write to the Free Software */
18
/* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  *x/ */
19
/* OBSOLETE  */
20
/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
21
/* OBSOLETE  */
22
/* OBSOLETE /* The altos support would make a good base for a port to other USGR2 systems */
23
/* OBSOLETE    (like the 3b1 and the Convergent miniframe).  *x/ */
24
/* OBSOLETE  */
25
/* OBSOLETE /* This is only needed in one file, but it's cleaner to put it here than */
26
/* OBSOLETE    putting in more #ifdef's.  *x/ */
27
/* OBSOLETE #include <sys/page.h> */
28
/* OBSOLETE #include <sys/net.h> */
29
/* OBSOLETE  */
30
/* OBSOLETE #define USG */
31
/* OBSOLETE  */
32
/* OBSOLETE #define HAVE_TERMIO */
33
/* OBSOLETE  */
34
/* OBSOLETE #define CBREAK XTABS        /* It takes all kinds... *x/ */
35
/* OBSOLETE  */
36
/* OBSOLETE #ifndef R_OK */
37
/* OBSOLETE #define R_OK 4 */
38
/* OBSOLETE #define W_OK 2 */
39
/* OBSOLETE #define X_OK 1 */
40
/* OBSOLETE #define F_OK 0 */
41
/* OBSOLETE #endif */
42
/* OBSOLETE  */
43
/* OBSOLETE /* Get sys/wait.h ie. from a Sun and edit it a little (mc68000 to m68k) *x/ */
44
/* OBSOLETE /* Why bother?  *x/ */
45
/* OBSOLETE #if 0 */
46
/* OBSOLETE #define HAVE_WAIT_STRUCT */
47
/* OBSOLETE #endif */
48
/* OBSOLETE  */
49
/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */
50
/* OBSOLETE    to get the offset in the core file of the register values. *x/ */
51
/* OBSOLETE  */
52
/* OBSOLETE #define KERNEL_U_ADDR 0x1fbf000 */
53
/* OBSOLETE  */
54
/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno)              \ */
55
/* OBSOLETE {   if (regno <= SP_REGNUM) \ */
56
/* OBSOLETE       addr = blockend + regno * 4; \ */
57
/* OBSOLETE     else if (regno == PS_REGNUM) \ */
58
/* OBSOLETE       addr = blockend + regno * 4 + 4; \ */
59
/* OBSOLETE     else if (regno == PC_REGNUM) \ */
60
/* OBSOLETE       addr = blockend + regno * 4 + 2; \ */
61
/* OBSOLETE } */
62
/* OBSOLETE  */
63
/* OBSOLETE #define REGISTER_ADDR(u_ar0, regno)                                 \ */
64
/* OBSOLETE   (((regno) < PS_REGNUM)                                            \ */
65
/* OBSOLETE    ? (&((struct exception_stack *) (u_ar0))->e_regs[(regno + R0)])  \ */
66
/* OBSOLETE    : (((regno) == PS_REGNUM)                                                \ */
67
/* OBSOLETE       ? ((int *) (&((struct exception_stack *) (u_ar0))->e_PS))             \ */
68
/* OBSOLETE       : (&((struct exception_stack *) (u_ar0))->e_PC))) */
69
/* OBSOLETE  */
70
/* OBSOLETE #define FP_REGISTER_ADDR(u, regno)                                  \ */
71
/* OBSOLETE   (((char *)                                                                \ */
72
/* OBSOLETE     (((regno) < FPC_REGNUM)                                         \ */
73
/* OBSOLETE      ? (&u.u_pcb.pcb_mc68881[FMC68881_R0 + (((regno) - FP0_REGNUM) * 3)]) \ */
74
/* OBSOLETE      : (&u.u_pcb.pcb_mc68881[FMC68881_C + ((regno) - FPC_REGNUM)])))        \ */
75
/* OBSOLETE    - ((char *) (& u))) */
76
/* OBSOLETE  */
77
/* OBSOLETE  */
78
/* OBSOLETE #ifndef __GNUC__ */
79
/* OBSOLETE #undef USE_GAS */
80
/* OBSOLETE #define ALTOS_AS */
81
/* OBSOLETE #else */
82
/* OBSOLETE #define USE_GAS */
83
/* OBSOLETE #endif */
84
/* OBSOLETE  */
85
/* OBSOLETE /* Motorola assembly format *x/ */
86
/* OBSOLETE #if !defined(USE_GAS) && !defined(ALTOS) */
87
/* OBSOLETE #define MOTOROLA */
88
/* OBSOLETE #endif */
89
/* OBSOLETE  */
90
/* OBSOLETE /* Interface definitions for kernel debugger KDB.  *x/ */
91
/* OBSOLETE  */
92
/* OBSOLETE /* Map machine fault codes into signal numbers. */
93
/* OBSOLETE    First subtract 0, divide by 4, then index in a table. */
94
/* OBSOLETE    Faults for which the entry in this table is 0 */
95
/* OBSOLETE    are not handled by KDB; the program's own trap handler */
96
/* OBSOLETE    gets to handle then.  *x/ */
97
/* OBSOLETE  */
98
/* OBSOLETE #define FAULT_CODE_ORIGIN 0 */
99
/* OBSOLETE #define FAULT_CODE_UNITS 4 */
100
/* OBSOLETE #define FAULT_TABLE    \ */
101
/* OBSOLETE { 0, 0, 0, 0, SIGTRAP, 0, 0, 0, \ */
102
/* OBSOLETE   0, SIGTRAP, 0, 0, 0, 0, 0, SIGKILL, \ */
103
/* OBSOLETE   0, 0, 0, 0, 0, 0, 0, 0, \ */
104
/* OBSOLETE   SIGILL } */
105
/* OBSOLETE  */
106
/* OBSOLETE /* Start running with a stack stretching from BEG to END. */
107
/* OBSOLETE    BEG and END should be symbols meaningful to the assembler. */
108
/* OBSOLETE    This is used only for kdb.  *x/ */
109
/* OBSOLETE  */
110
/* OBSOLETE #ifdef MOTOROLA */
111
/* OBSOLETE #define INIT_STACK(beg, end)  \ */
112
/* OBSOLETE { asm (".globl end");         \ */
113
/* OBSOLETE   asm ("move.l $ end, sp");      \ */
114
/* OBSOLETE   asm ("clr.l fp"); } */
115
/* OBSOLETE #else */
116
/* OBSOLETE #ifdef ALTOS_AS */
117
/* OBSOLETE #define INIT_STACK(beg, end)  \ */
118
/* OBSOLETE { asm ("global end");         \ */
119
/* OBSOLETE   asm ("mov.l &end,%sp");      \ */
120
/* OBSOLETE   asm ("clr.l %fp"); } */
121
/* OBSOLETE #else */
122
/* OBSOLETE #define INIT_STACK(beg, end)  \ */
123
/* OBSOLETE { asm (".globl end");         \ */
124
/* OBSOLETE   asm ("movel $ end, sp");      \ */
125
/* OBSOLETE   asm ("clrl fp"); } */
126
/* OBSOLETE #endif */
127
/* OBSOLETE #endif */
128
/* OBSOLETE  */
129
/* OBSOLETE /* Push the frame pointer register on the stack.  *x/ */
130
/* OBSOLETE #ifdef MOTOROLA */
131
/* OBSOLETE #define PUSH_FRAME_PTR        \ */
132
/* OBSOLETE   asm ("move.l fp, -(sp)"); */
133
/* OBSOLETE #else */
134
/* OBSOLETE #ifdef ALTOS_AS */
135
/* OBSOLETE #define PUSH_FRAME_PTR        \ */
136
/* OBSOLETE   asm ("mov.l %fp, -(%sp)"); */
137
/* OBSOLETE #else */
138
/* OBSOLETE #define PUSH_FRAME_PTR        \ */
139
/* OBSOLETE   asm ("movel fp, -(sp)"); */
140
/* OBSOLETE #endif */
141
/* OBSOLETE #endif */
142
/* OBSOLETE  */
143
/* OBSOLETE /* Copy the top-of-stack to the frame pointer register.  *x/ */
144
/* OBSOLETE #ifdef MOTOROLA */
145
/* OBSOLETE #define POP_FRAME_PTR  \ */
146
/* OBSOLETE   asm ("move.l (sp), fp"); */
147
/* OBSOLETE #else */
148
/* OBSOLETE #ifdef ALTOS_AS */
149
/* OBSOLETE #define POP_FRAME_PTR  \ */
150
/* OBSOLETE   asm ("mov.l (%sp), %fp"); */
151
/* OBSOLETE #else */
152
/* OBSOLETE #define POP_FRAME_PTR  \ */
153
/* OBSOLETE   asm ("movl (sp), fp"); */
154
/* OBSOLETE #endif */
155
/* OBSOLETE #endif */
156
/* OBSOLETE  */
157
/* OBSOLETE /* After KDB is entered by a fault, push all registers */
158
/* OBSOLETE    that GDB thinks about (all NUM_REGS of them), */
159
/* OBSOLETE    so that they appear in order of ascending GDB register number. */
160
/* OBSOLETE    The fault code will be on the stack beyond the last register.  *x/ */
161
/* OBSOLETE  */
162
/* OBSOLETE #ifdef MOTOROLA */
163
/* OBSOLETE #define PUSH_REGISTERS        \ */
164
/* OBSOLETE { asm ("clr.w -(sp)");            \ */
165
/* OBSOLETE   asm ("pea (10,sp)");            \ */
166
/* OBSOLETE   asm ("movem $ 0xfffe,-(sp)"); } */
167
/* OBSOLETE #else */
168
/* OBSOLETE #ifdef ALTOS_AS */
169
/* OBSOLETE #define PUSH_REGISTERS        \ */
170
/* OBSOLETE { asm ("clr.w -(%sp)");           \ */
171
/* OBSOLETE   asm ("pea (10,%sp)");           \ */
172
/* OBSOLETE   asm ("movm.l &0xfffe,-(%sp)"); } */
173
/* OBSOLETE #else */
174
/* OBSOLETE #define PUSH_REGISTERS        \ */
175
/* OBSOLETE { asm ("clrw -(sp)");             \ */
176
/* OBSOLETE   asm ("pea 10(sp)");             \ */
177
/* OBSOLETE   asm ("movem $ 0xfffe,-(sp)"); } */
178
/* OBSOLETE #endif */
179
/* OBSOLETE #endif */
180
/* OBSOLETE  */
181
/* OBSOLETE /* Assuming the registers (including processor status) have been */
182
/* OBSOLETE    pushed on the stack in order of ascending GDB register number, */
183
/* OBSOLETE    restore them and return to the address in the saved PC register.  *x/ */
184
/* OBSOLETE  */
185
/* OBSOLETE #ifdef MOTOROLA */
186
/* OBSOLETE #define POP_REGISTERS          \ */
187
/* OBSOLETE { asm ("subi.l $8,28(sp)");     \ */
188
/* OBSOLETE   asm ("movem (sp),$ 0xffff"); \ */
189
/* OBSOLETE   asm ("rte"); } */
190
/* OBSOLETE #else */
191
/* OBSOLETE #ifdef ALTOS_AS */
192
/* OBSOLETE #define POP_REGISTERS          \ */
193
/* OBSOLETE { asm ("sub.l &8,28(%sp)");     \ */
194
/* OBSOLETE   asm ("movem (%sp),&0xffff"); \ */
195
/* OBSOLETE   asm ("rte"); } */
196
/* OBSOLETE #else */
197
/* OBSOLETE #define POP_REGISTERS          \ */
198
/* OBSOLETE { asm ("subil $8,28(sp)");     \ */
199
/* OBSOLETE   asm ("movem (sp),$ 0xffff"); \ */
200
/* OBSOLETE   asm ("rte"); } */
201
/* OBSOLETE #endif */
202
/* OBSOLETE #endif */

powered by: WebSVN 2.1.0

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