diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-01-01 21:06:17 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-01-01 21:06:17 +0000 |
commit | 90566dbef8631e67f6f5189af4912bdc4e9c9f88 (patch) | |
tree | 653484f4d03235f510669b4ec10e689c0293e446 | |
parent | 8493464201541e817cf39d1097867c2765ed3da7 (diff) | |
download | gdb-90566dbef8631e67f6f5189af4912bdc4e9c9f88.zip gdb-90566dbef8631e67f6f5189af4912bdc4e9c9f88.tar.gz gdb-90566dbef8631e67f6f5189af4912bdc4e9c9f88.tar.bz2 |
* 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.
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 4 | ||||
-rw-r--r-- | gdb/sparc-tdep.h | 5 | ||||
-rw-r--r-- | gdb/sparc64-sol2-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sparc64-tdep.c | 33 | ||||
-rw-r--r-- | gdb/sparc64fbsd-tdep.c | 2 |
6 files changed, 20 insertions, 37 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6db7252..9fbe529 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,16 @@ 2004-01-01 Mark Kettenis <kettenis@gnu.org> + * 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. + * sparc64-tdep.c (BIAS): Remove define. * sparc64-sol2-tdep.c (BIAS): Remove define. * sparc64fbsd-tdep.c: Likewise. diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 8ba8a50..09fdc86 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for SPARC. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -87,7 +87,7 @@ /* Fetch the instruction at PC. Instructions are always big-endian even if the processor operates in little-endian mode. */ -static unsigned long +unsigned long sparc_fetch_instruction (CORE_ADDR pc) { unsigned char buf[4]; diff --git a/gdb/sparc-tdep.h b/gdb/sparc-tdep.h index 1e9f30c..05f2e36 100644 --- a/gdb/sparc-tdep.h +++ b/gdb/sparc-tdep.h @@ -1,6 +1,6 @@ /* Target-dependent code for SPARC. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -136,6 +136,9 @@ struct sparc_frame_cache struct trad_frame_saved_reg *saved_regs; }; +/* Fetch the instruction at PC. */ +extern unsigned long sparc_fetch_instruction (CORE_ADDR pc); + extern CORE_ADDR sparc_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc, struct sparc_frame_cache *cache); diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c index e9abad9..079f3c5 100644 --- a/gdb/sparc64-sol2-tdep.c +++ b/gdb/sparc64-sol2-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for Solaris UltraSPARC. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index a1f60d4..4ca0bc9 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for UltraSPARC. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. @@ -48,37 +48,6 @@ /* Please use the sparc32_-prefix for 32-bit specific code, the sparc64_-prefix for 64-bit specific code and the sparc_-prefix for code can handle both. */ - -/* Macros to extract fields from SPARC instructions. */ -#define X_OP(i) (((i) >> 30) & 0x3) -#define X_RD(i) (((i) >> 25) & 0x1f) -#define X_A(i) (((i) >> 29) & 1) -#define X_COND(i) (((i) >> 25) & 0xf) -#define X_OP2(i) (((i) >> 22) & 0x7) -#define X_IMM22(i) ((i) & 0x3fffff) -#define X_OP3(i) (((i) >> 19) & 0x3f) -#define X_I(i) (((i) >> 13) & 1) -/* Sign extension macros. */ -#define X_DISP22(i) ((X_IMM22 (i) ^ 0x200000) - 0x200000) -#define X_DISP19(i) ((((i) & 0x7ffff) ^ 0x40000) - 0x40000) - -/* Fetch the instruction at PC. Instructions are always big-endian - even if the processor operates in little-endian mode. */ - -static unsigned long -sparc_fetch_instruction (CORE_ADDR pc) -{ - unsigned char buf[4]; - unsigned long insn; - int i; - - read_memory (pc, buf, sizeof (buf)); - - insn = 0; - for (i = 0; i < sizeof (buf); i++) - insn = (insn << 8) | buf[i]; - return insn; -} /* The functions on this page are intended to be used to classify function arguments. */ diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c index 4ca49a84..14ecf96 100644 --- a/gdb/sparc64fbsd-tdep.c +++ b/gdb/sparc64fbsd-tdep.c @@ -1,6 +1,6 @@ /* Target-dependent code for FreeBSD/sparc64. - Copyright 2003 Free Software Foundation, Inc. + Copyright 2003, 2004 Free Software Foundation, Inc. This file is part of GDB. |