* rtlanal.c (subreg_regno_offset): Do not use
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Jan 2002 23:29:09 +0000 (23:29 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Jan 2002 23:29:09 +0000 (23:29 +0000)
SUBREG_REGNO_OFFSET.
* system.h: Add SUBREG_REGNO_OFFSET to the GCC poison list.
* doc/tm.texi (SUBREG_REGNO_OFFSET): Remove.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49381 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/doc/tm.texi
gcc/rtlanal.c
gcc/system.h

index f7ea229..158f019 100644 (file)
@@ -1,3 +1,10 @@
+2002-01-31  Kazu Hirata  <kazu@hxi.com>
+
+       * rtlanal.c (subreg_regno_offset): Do not use
+       SUBREG_REGNO_OFFSET.
+       * system.h: Add SUBREG_REGNO_OFFSET to the GCC poison list.
+       * doc/tm.texi (SUBREG_REGNO_OFFSET): Remove.
+
 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * gccbug.in: Follow GNU Coding Standards for --version.  Use GCC
index ad64fd6..e9797bf 100644 (file)
@@ -1953,25 +1953,6 @@ allocation.
 Define this macro if the compiler should avoid copies to/from @code{CCmode}
 registers.  You should only define this macro if support for copying to/from
 @code{CCmode} is incomplete.
-
-@findex SUBREG_REGNO_OFFSET
-@item SUBREG_REGNO_OFFSET
-Define this macro if the compiler needs to handle subregs in a non-standard
-way.  The macro returns the correct regno offset for mode @code{YMODE} given
-a subreg of type @code{XMODE}.
-This macro takes 4 parameters:
-@table @code
-@item XREGNO
-A regno of an inner hard subreg_reg (or what will become one).
-@item XMODE
-The mode of xregno.
-@item OFFSET
-The byte offset.
-@item YMODE
-The mode of a top level SUBREG (or what may become one).
-@end table
-The default function can be found in @file{rtlanal.c}, function
-@code{subreg_regno_offset}.  Normally this does not need to be defined.
 @end table
 
 @node Leaf Functions
index 5784123..f185c61 100644 (file)
@@ -2947,9 +2947,7 @@ subreg_lsb (x)
    xmode  - The mode of xregno.
    offset - The byte offset.
    ymode  - The mode of a top level SUBREG (or what may become one).
-   RETURN - The regno offset which would be used.  
-   This function can be overridden by defining SUBREG_REGNO_OFFSET,
-   taking the same parameters.  */
+   RETURN - The regno offset which would be used.  */
 unsigned int
 subreg_regno_offset (xregno, xmode, offset, ymode)
      unsigned int xregno;
@@ -2957,15 +2955,10 @@ subreg_regno_offset (xregno, xmode, offset, ymode)
      unsigned int offset;
      enum machine_mode ymode;
 {
-  unsigned ret;
   int nregs_xmode, nregs_ymode;
   int mode_multiple, nregs_multiple;
   int y_offset;
 
-/* Check for an override, and use it instead.  */
-#ifdef SUBREG_REGNO_OFFSET
-  ret = SUBREG_REGNO_OFFSET (xregno, xmode, offset, ymode);
-#else
   if (xregno >= FIRST_PSEUDO_REGISTER)
     abort ();
 
@@ -2981,10 +2974,7 @@ subreg_regno_offset (xregno, xmode, offset, ymode)
 
   y_offset = offset / GET_MODE_SIZE (ymode);
   nregs_multiple =  nregs_xmode / nregs_ymode;
-  ret = (y_offset / (mode_multiple / nregs_multiple)) * nregs_ymode;
-#endif
-
-  return ret;
+  return (y_offset / (mode_multiple / nregs_multiple)) * nregs_ymode;
 }
 
 /* Return the final regno that a subreg expression refers to.  */
index a55351a..9bd0599 100644 (file)
@@ -605,7 +605,7 @@ typedef char _Bool;
        OMIT_EH_TABLE EASY_DIV_EXPR IMPLICIT_FIX_EXPR                      \
        LONGJMP_RESTORE_FROM_STACK MAX_INT_TYPE_SIZE ASM_IDENTIFY_GCC      \
        STDC_VALUE TRAMPOLINE_ALIGN ASM_IDENTIFY_GCC_AFTER_SOURCE          \
-       SLOW_ZERO_EXTEND
+       SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET
 
 #endif /* IN_GCC */