Hitachi SH3e, patch to make FP registers debuggable.
authorJim Wilson <wilson@tuliptree.org>
Thu, 19 Oct 1995 23:29:59 +0000 (23:29 +0000)
committerJim Wilson <wilson@tuliptree.org>
Thu, 19 Oct 1995 23:29:59 +0000 (23:29 +0000)
gdb/.Sanitize
gdb/config/sh/.Sanitize
gdb/config/sh/tm-sh.h

index c76498c15a5c6aa23cfbe6e9c214506aae795668..b2c72a8bb79cb1e81491b3663cd4d2f686971dbc 100644 (file)
@@ -459,6 +459,35 @@ else
        done
 fi
 
+sh3e_files="ChangeLog"
+
+if ( echo $* | grep keep\-sh3e > /dev/null ) ; then
+       for i in $sh3e_files ; do
+               if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping sh3e stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $sh3e_files ; do
+               if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"sh3e\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 for i in * ; do
        if test ! -d $i && (grep sanitize $i > /dev/null) ; then
                echo '***' Some mentions of Sanitize are still left in $i! 1>&2
index 136861f19b8c36b96534af0c26388f8d90e6643c..1a4ce68ddb91231e9c1d0c8b2560370c7ec1ac34 100644 (file)
@@ -27,7 +27,35 @@ stub.c
 
 Things-to-lose:
 
-
 Do-last:
 
+sh3e_files="tm-sh.h"
+
+if ( echo $* | grep keep\-sh3e > /dev/null ) ; then
+       for i in $sh3e_files ; do
+               if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping sh3e stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $sh3e_files ; do
+               if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"sh3e\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 # End of file.
index d47cb2ee709ec8baf05364be5f78c3bfc543c702..8f56ebb546a2146392450ddba69f38ff5b1cd2b7 100644 (file)
@@ -99,6 +99,13 @@ extern CORE_ADDR sh_skip_prologue ();
    of data in register N.  */
 
 #define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
+/* start-sanitize-sh3e */
+#undef  REGISTER_VIRTUAL_TYPE
+#define REGISTER_VIRTUAL_TYPE(N) \
+       ((((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32)    \
+         || (N) == FPUL_REGNUM)                        \
+         ? builtin_type_float : builtin_type_int)
+/* end-sanitize-sh3e */
 
 /* Initializer for an array of names of registers.
    Entries beyond the first NUM_REGS are ignored.  */
@@ -107,8 +114,22 @@ extern CORE_ADDR sh_skip_prologue ();
   {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
    "r8", "r9", "r10","r11","r12","r13","r14","r15",\
    "pc", "pr","gbr","vbr","mach","macl","sr","ticks","stalls","cycles","insts" ,"plr","tlr"    }
+/* start-sanitize-sh3e */
+#undef REGISTER_NAMES
+#define REGISTER_NAMES \
+  {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
+   "r8", "r9", "r10","r11","r12","r13","r14","r15",\
+   "pc", "pr","gbr","vbr","mach","macl", "sr", "fpul", "fpscr", \
+   "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", \
+   "fr8", "fr9", "fr10","fr11","fr12","fr13","fr14","fr15",\
+  }
+/* end-sanitize-sh3e */
 
 #define NUM_REGS 28
+/* start-sanitize-sh3e */
+#undef  NUM_REGS
+#define NUM_REGS 41
+/* end-sanitize-sh3e */
 
 /* Register numbers of various important registers.
    Note that some of these values are "real" register numbers,
@@ -127,7 +148,14 @@ extern CORE_ADDR sh_skip_prologue ();
 #define MACH_REGNUM    20
 #define MACL_REGNUM    21
 #define SR_REGNUM      22
-#define NUM_REALREGS     23
+#define NUM_REALREGS    23
+/* start-sanitize-sh3e */
+#define FPUL_REGNUM    23
+#define FP0_REGNUM     25
+#undef  NUM_REALREGS
+#define NUM_REALREGS    41
+/* end-sanitize-sh3e */
+
 /* Store the address of the place in which to copy the structure the
    subroutine will return.  This is called from call_function.