GNU Binutils with patches for OS216
Revision | 90566dbef8631e67f6f5189af4912bdc4e9c9f88 (tree) |
---|---|
Time | 2004-01-02 06:06:17 |
Author | Mark Kettenis <kettenis@gnu....> |
Commiter | Mark Kettenis |
* sparc-tdep.h: Update copyright year.
(sparc_fetch_instruction): New prototype.
* sparc-tdep.c: Update copyright year.
(sparc_fetch_instruction): Make global.
* sparc64-tdep.c: Update copyright year.
(sparc_fetch_instruction): Remove function.
(X_OP, X_RD, X_A, X_COND, X_OP2, X_IMM22, X_OP3, X_I, X_DISP22)
(X_DISP19): Really remove macros.
* sparc64-sol2-tdep.c: Update copyright year.
* sparc64fbsd-tdep.c: Likewise.
@@ -1,5 +1,16 @@ | ||
1 | 1 | 2004-01-01 Mark Kettenis <kettenis@gnu.org> |
2 | 2 | |
3 | + * sparc-tdep.h: Update copyright year. | |
4 | + (sparc_fetch_instruction): New prototype. | |
5 | + * sparc-tdep.c: Update copyright year. | |
6 | + (sparc_fetch_instruction): Make global. | |
7 | + * sparc64-tdep.c: Update copyright year. | |
8 | + (sparc_fetch_instruction): Remove function. | |
9 | + (X_OP, X_RD, X_A, X_COND, X_OP2, X_IMM22, X_OP3, X_I, X_DISP22) | |
10 | + (X_DISP19): Really remove macros. | |
11 | + * sparc64-sol2-tdep.c: Update copyright year. | |
12 | + * sparc64fbsd-tdep.c: Likewise. | |
13 | + | |
3 | 14 | * sparc64-tdep.c (BIAS): Remove define. |
4 | 15 | * sparc64-sol2-tdep.c (BIAS): Remove define. |
5 | 16 | * sparc64fbsd-tdep.c: Likewise. |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* Target-dependent code for SPARC. |
2 | 2 | |
3 | - Copyright 2003 Free Software Foundation, Inc. | |
3 | + Copyright 2003, 2004 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | This file is part of GDB. |
6 | 6 |
@@ -87,7 +87,7 @@ | ||
87 | 87 | /* Fetch the instruction at PC. Instructions are always big-endian |
88 | 88 | even if the processor operates in little-endian mode. */ |
89 | 89 | |
90 | -static unsigned long | |
90 | +unsigned long | |
91 | 91 | sparc_fetch_instruction (CORE_ADDR pc) |
92 | 92 | { |
93 | 93 | unsigned char buf[4]; |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* Target-dependent code for SPARC. |
2 | 2 | |
3 | - Copyright 2003 Free Software Foundation, Inc. | |
3 | + Copyright 2003, 2004 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | This file is part of GDB. |
6 | 6 |
@@ -136,6 +136,9 @@ struct sparc_frame_cache | ||
136 | 136 | struct trad_frame_saved_reg *saved_regs; |
137 | 137 | }; |
138 | 138 | |
139 | +/* Fetch the instruction at PC. */ | |
140 | +extern unsigned long sparc_fetch_instruction (CORE_ADDR pc); | |
141 | + | |
139 | 142 | extern CORE_ADDR sparc_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc, |
140 | 143 | struct sparc_frame_cache *cache); |
141 | 144 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* Target-dependent code for Solaris UltraSPARC. |
2 | 2 | |
3 | - Copyright 2003 Free Software Foundation, Inc. | |
3 | + Copyright 2003, 2004 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | This file is part of GDB. |
6 | 6 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* Target-dependent code for UltraSPARC. |
2 | 2 | |
3 | - Copyright 2003 Free Software Foundation, Inc. | |
3 | + Copyright 2003, 2004 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | This file is part of GDB. |
6 | 6 |
@@ -48,37 +48,6 @@ | ||
48 | 48 | /* Please use the sparc32_-prefix for 32-bit specific code, the |
49 | 49 | sparc64_-prefix for 64-bit specific code and the sparc_-prefix for |
50 | 50 | code can handle both. */ |
51 | - | |
52 | -/* Macros to extract fields from SPARC instructions. */ | |
53 | -#define X_OP(i) (((i) >> 30) & 0x3) | |
54 | -#define X_RD(i) (((i) >> 25) & 0x1f) | |
55 | -#define X_A(i) (((i) >> 29) & 1) | |
56 | -#define X_COND(i) (((i) >> 25) & 0xf) | |
57 | -#define X_OP2(i) (((i) >> 22) & 0x7) | |
58 | -#define X_IMM22(i) ((i) & 0x3fffff) | |
59 | -#define X_OP3(i) (((i) >> 19) & 0x3f) | |
60 | -#define X_I(i) (((i) >> 13) & 1) | |
61 | -/* Sign extension macros. */ | |
62 | -#define X_DISP22(i) ((X_IMM22 (i) ^ 0x200000) - 0x200000) | |
63 | -#define X_DISP19(i) ((((i) & 0x7ffff) ^ 0x40000) - 0x40000) | |
64 | - | |
65 | -/* Fetch the instruction at PC. Instructions are always big-endian | |
66 | - even if the processor operates in little-endian mode. */ | |
67 | - | |
68 | -static unsigned long | |
69 | -sparc_fetch_instruction (CORE_ADDR pc) | |
70 | -{ | |
71 | - unsigned char buf[4]; | |
72 | - unsigned long insn; | |
73 | - int i; | |
74 | - | |
75 | - read_memory (pc, buf, sizeof (buf)); | |
76 | - | |
77 | - insn = 0; | |
78 | - for (i = 0; i < sizeof (buf); i++) | |
79 | - insn = (insn << 8) | buf[i]; | |
80 | - return insn; | |
81 | -} | |
82 | 51 | |
83 | 52 | /* The functions on this page are intended to be used to classify |
84 | 53 | function arguments. */ |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* Target-dependent code for FreeBSD/sparc64. |
2 | 2 | |
3 | - Copyright 2003 Free Software Foundation, Inc. | |
3 | + Copyright 2003, 2004 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | This file is part of GDB. |
6 | 6 |