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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [config/] [m68k/] [tm-delta68.h] - Blame information for rev 106

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

Line No. Rev Author Line
1 106 markom
/* Target definitions for delta68.
2
   Copyright 1993, 1994, 1998, 1999, 2000 Free Software Foundation, Inc.
3
 
4
   This file is part of GDB.
5
 
6
   This program is free software; you can redistribute it and/or modify
7
   it under the terms of the GNU General Public License as published by
8
   the Free Software Foundation; either version 2 of the License, or
9
   (at your option) any later version.
10
 
11
   This program is distributed in the hope that it will be useful,
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
   GNU General Public License for more details.
15
 
16
   You should have received a copy of the GNU General Public License
17
   along with this program; if not, write to the Free Software
18
   Foundation, Inc., 59 Temple Place - Suite 330,
19
   Boston, MA 02111-1307, USA.  */
20
 
21
/* Define BPT_VECTOR if it is different than the default.
22
   This is the vector number used by traps to indicate a breakpoint. */
23
 
24
#define BPT_VECTOR 0x1
25
 
26
#define GCC_COMPILED_FLAG_SYMBOL "gcc_compiled%"
27
#define GCC2_COMPILED_FLAG_SYMBOL "gcc2_compiled%"
28
 
29
/* Amount PC must be decremented by after a breakpoint.
30
   On the Delta, the kernel decrements it for us.  */
31
 
32
#define DECR_PC_AFTER_BREAK 0
33
 
34
/* Not sure what happens if we try to store this register, but
35
   phdm@info.ucl.ac.be says we need this define.  */
36
 
37
#define CANNOT_STORE_REGISTER(regno)    (regno == FPI_REGNUM)
38
 
39
/* Extract from an array REGBUF containing the (raw) register state
40
   a function return value of type TYPE, and copy that, in virtual format,
41
   into VALBUF.  */
42
 
43
/* When it returns a float/double value, use fp0 in sysV68.  */
44
/* When it returns a pointer value, use a0 in sysV68.  */
45
 
46
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF)                        \
47
  if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)                                \
48
    REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE,                      \
49
                                 &REGBUF[REGISTER_BYTE (FP0_REGNUM)],   \
50
                                 VALBUF);                               \
51
  else                                                                  \
52
    memcpy ((VALBUF),                                                   \
53
            (char *) ((REGBUF) +                                        \
54
                      (TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 :       \
55
                       (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)))), \
56
            TYPE_LENGTH(TYPE))
57
 
58
/* Write into appropriate registers a function return value
59
   of type TYPE, given in virtual format.  */
60
 
61
/* When it returns a float/double value, use fp0 in sysV68.  */
62
/* When it returns a pointer value, use a0 in sysV68.  */
63
 
64
#define STORE_RETURN_VALUE(TYPE,VALBUF) \
65
  if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)                                \
66
      {                                                                 \
67
        char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)];                   \
68
        REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf);    \
69
        write_register_bytes (REGISTER_BYTE (FP0_REGNUM),               \
70
                              raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
71
      }                                                                 \
72
  else                                                                  \
73
    write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
74
                          VALBUF, TYPE_LENGTH (TYPE))
75
 
76
/* Return number of args passed to a frame.
77
   Can return -1, meaning no way to tell.  */
78
 
79
extern int delta68_frame_num_args PARAMS ((struct frame_info * fi));
80
#define FRAME_NUM_ARGS(fi) (delta68_frame_num_args ((fi)))
81
 
82
/* On M68040 versions of sysV68 R3V7.1, ptrace(PT_WRITE_I) does not clear
83
   the processor's instruction cache as it should.  */
84
#define CLEAR_INSN_CACHE()      clear_insn_cache()
85
 
86
#include "m68k/tm-m68k.h"
87
 
88
/* Extract from an array REGBUF containing the (raw) register state
89
   the address in which a function should return its structure value,
90
   as a CORE_ADDR (or an expression that can be used as one).  */
91
 
92
#undef EXTRACT_STRUCT_VALUE_ADDRESS
93
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
94
        (*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
95
 
96
extern int delta68_in_sigtramp PARAMS ((CORE_ADDR pc, char * name));
97
#define IN_SIGTRAMP(pc,name) delta68_in_sigtramp (pc, name)
98
 
99
extern CORE_ADDR delta68_frame_saved_pc PARAMS ((struct frame_info * fi));
100
#undef FRAME_SAVED_PC
101
#define FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
102
 
103
extern CORE_ADDR delta68_frame_args_address PARAMS ((struct frame_info * fi));
104
#undef FRAME_ARGS_ADDRESS
105
#define FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)

powered by: WebSVN 2.1.0

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