From ebcd99ea83f08598ba6210b74b3e4eed54ab377f Mon Sep 17 00:00:00 2001 From: kazu Date: Thu, 31 Jan 2002 23:29:09 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49381 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/doc/tm.texi | 19 ------------------- gcc/rtlanal.c | 14 ++------------ gcc/system.h | 2 +- 4 files changed, 10 insertions(+), 32 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7ea229..158f019 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-01-31 Kazu Hirata + + * 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 * gccbug.in: Follow GNU Coding Standards for --version. Use GCC diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index ad64fd6..e9797bf 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -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 diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 5784123..f185c61 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -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. */ diff --git a/gcc/system.h b/gcc/system.h index a55351a..9bd0599 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -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 */ -- 2.7.4