summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-01-01 21:06:17 +0000
committerMark Kettenis <kettenis@gnu.org>2004-01-01 21:06:17 +0000
commit9c2987718ca7eee3369bd93b15f81b9b1195d40f (patch)
tree58231aa79f79bd7acd291db47f5741716b74d0b9
parentcf817b45e0720996be5819087af8318443e546d3 (diff)
downloadgdb-9c2987718ca7eee3369bd93b15f81b9b1195d40f.tar.gz
* 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/ChangeLog11
-rw-r--r--gdb/sparc-tdep.c4
-rw-r--r--gdb/sparc-tdep.h5
-rw-r--r--gdb/sparc64-sol2-tdep.c2
-rw-r--r--gdb/sparc64-tdep.c33
-rw-r--r--gdb/sparc64fbsd-tdep.c2
6 files changed, 20 insertions, 37 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6db7252675c..9fbe52974fd 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 8ba8a50a7f3..09fdc86a06c 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 1e9f30cb96f..05f2e369fa3 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 e9abad91730..079f3c502e7 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 a1f60d49e9c..4ca0bc9fdc8 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 4ca49a84c2b..14ecf9604f2 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.