USE_LOAD_PRE_DECREMENT et al

Michael Hayes m.hayes@elec.canterbury.ac.nz
Fri Mar 26 19:36:00 GMT 1999


Two months ago a number of new target macros snuck their way into egcs
for controlling the use of autoincrement generation.  This patch adds
the missing definitions to complete the set and tidies up the
documentation.  I've also moved the default definitions to rtl.h since
they are useful to other parts of the compiler.

Michael.

Sat Mar 27 15:23:05 1999  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>

	* tm.texi (USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
	USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT): Document.
	(USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
	USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Fix documentation.

	* rtl.h	(USE_LOAD_POST_DECREMENT, USE_LOAD_PRE_DECREMENT,
	USE_STORE_POST_DECREMENT, USE_STORE_PRE_DECREMENT,
	USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
	USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Provide default
	definition.

	* expr.c: (USE_LOAD_POST_INCREMENT, USE_LOAD_PRE_INCREMENT,
	USE_STORE_POST_INCREMENT, USE_STORE_PRE_INCREMENT): Delete default
	definition.
	

Index: rtl.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/rtl.h,v
retrieving revision 1.95
diff -c -3 -p -r1.95 rtl.h
*** rtl.h	1999/03/25 12:04:20	1.95
--- rtl.h	1999/03/27 03:34:33
*************** extern char *note_insn_name[];
*** 755,760 ****
--- 755,798 ----
  #define HAVE_POST_DECREMENT 0
  #endif
  
+ 
+ /* Some architectures do not have complete pre/post increment/decrement
+    instruction sets, or only move some modes efficiently.  These macros
+    allow us to tune autoincrement generation.  */
+ 
+ #ifndef USE_LOAD_POST_INCREMENT
+ #define USE_LOAD_POST_INCREMENT(MODE)   HAVE_POST_INCREMENT
+ #endif
+ 
+ #ifndef USE_LOAD_POST_DECREMENT
+ #define USE_LOAD_POST_DECREMENT(MODE)   HAVE_POST_DECREMENT
+ #endif
+ 
+ #ifndef USE_LOAD_PRE_INCREMENT
+ #define USE_LOAD_PRE_INCREMENT(MODE)    HAVE_PRE_INCREMENT
+ #endif
+ 
+ #ifndef USE_LOAD_PRE_DECREMENT
+ #define USE_LOAD_PRE_DECREMENT(MODE)    HAVE_PRE_DECREMENT
+ #endif
+ 
+ #ifndef USE_STORE_POST_INCREMENT
+ #define USE_STORE_POST_INCREMENT(MODE)  HAVE_POST_INCREMENT
+ #endif
+ 
+ #ifndef USE_STORE_POST_DECREMENT
+ #define USE_STORE_POST_DECREMENT(MODE)  HAVE_POST_DECREMENT
+ #endif
+ 
+ #ifndef USE_STORE_PRE_INCREMENT
+ #define USE_STORE_PRE_INCREMENT(MODE)   HAVE_PRE_INCREMENT
+ #endif
+ 
+ #ifndef USE_STORE_PRE_DECREMENT
+ #define USE_STORE_PRE_DECREMENT(MODE)   HAVE_PRE_DECREMENT
+ #endif
+ 
+ 
  /* Accessors for RANGE_INFO.  */
  /* For RANGE_{START,END} notes return the RANGE_START note.  */
  #define RANGE_INFO_NOTE_START(INSN) (XEXP (INSN, 0))
Index: expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.132
diff -c -3 -p -r1.132 expr.c
*** expr.c	1999/03/23 22:33:35	1.132
--- expr.c	1999/03/27 03:34:35
*************** convert_modes (mode, oldmode, x, unsigne
*** 1402,1427 ****
  #define MOVE_MAX_PIECES   MOVE_MAX
  #endif
  
- /* Some architectures do not have complete pre/post increment/decrement
-    instruction sets, or only move some modes efficiently. these macros
-    allow us to fine tune move_by_pieces for these targets. */
- 
- #ifndef USE_LOAD_POST_INCREMENT
- #define USE_LOAD_POST_INCREMENT(MODE)   HAVE_POST_INCREMENT
- #endif
- 
- #ifndef USE_LOAD_PRE_DECREMENT
- #define USE_LOAD_PRE_DECREMENT(MODE)    HAVE_PRE_DECREMENT
- #endif
- 
- #ifndef USE_STORE_POST_INCREMENT
- #define USE_STORE_POST_INCREMENT(MODE)  HAVE_POST_INCREMENT
- #endif
- 
- #ifndef USE_STORE_PRE_DECREMENT
- #define USE_STORE_PRE_DECREMENT(MODE)   HAVE_PRE_DECREMENT
- #endif
- 
  /* Generate several move instructions to copy LEN bytes
     from block FROM to block TO.  (These are MEM rtx's with BLKmode).
     The caller must pass FROM and TO
--- 1402,1407 ----
Index: tm.texi
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/tm.texi,v
retrieving revision 1.72
diff -c -3 -p -r1.72 tm.texi
*** tm.texi	1999/03/22 14:36:36	1.72
--- tm.texi	1999/03/27 03:34:37
*************** If you don't define this, a reasonable d
*** 4777,4813 ****
  @item MOVE_BY_PIECES_P (@var{size}, @var{alignment})
  A C expression used to determine whether @code{move_by_pieces} will be used to
  copy a chunk of memory, or whether some other block move mechanism
! will be used. Defaults to 1 if @code{move_by_pieces_ninsns} returns less
  than @code{MOVE_RATIO}.
  
  @findex MOVE_MAX_PIECES
  @item MOVE_MAX_PIECES
  A C expression used by @code{move_by_pieces} to determine the largest unit
! a load or store used to copy memory is. Defaults to @code{MOVE_MAX}.
  
  @findex USE_LOAD_POST_INCREMENT
  @item USE_LOAD_POST_INCREMENT (@var{mode})
! A C expression used to determine whether a load postincrement is
! a good thing for @code{move_by_pieces} to use for a given mode. Defaults
! to the value of @code{HAVE_POST_INCREMENT}.
  
  @findex USE_LOAD_PRE_INCREMENT
  @item USE_LOAD_PRE_INCREMENT (@var{mode})
! A C expression used to determine whether a load preincrement is
! a good thing for @code{move_by_pieces} to use for a given mode. Defaults
! to the value of @code{HAVE_PRE_INCREMENT}.
  
  @findex USE_STORE_POST_INCREMENT
  @item USE_STORE_POST_INCREMENT (@var{mode})
! A C expression used to determine whether a store postincrement is
! a good thing for @code{move_by_pieces} to use for a given mode. Defaults
! to the value of @code{HAVE_POST_INCREMENT}.
  
  @findex USE_STORE_PRE_INCREMENT
  @item USE_STORE_PRE_INCREMENT (@var{mode})
! This macro is used to determine whether a store preincrement is
! a good thing for @code{move_by_pieces} to use for a given mode. Defaults
! to the value of @code{HAVE_PRE_INCREMENT}.
  
  @findex NO_FUNCTION_CSE
  @item NO_FUNCTION_CSE
--- 4777,4837 ----
  @item MOVE_BY_PIECES_P (@var{size}, @var{alignment})
  A C expression used to determine whether @code{move_by_pieces} will be used to
  copy a chunk of memory, or whether some other block move mechanism
! will be used.  Defaults to 1 if @code{move_by_pieces_ninsns} returns less
  than @code{MOVE_RATIO}.
  
  @findex MOVE_MAX_PIECES
  @item MOVE_MAX_PIECES
  A C expression used by @code{move_by_pieces} to determine the largest unit
! a load or store used to copy memory is.  Defaults to @code{MOVE_MAX}.
  
  @findex USE_LOAD_POST_INCREMENT
  @item USE_LOAD_POST_INCREMENT (@var{mode})
! A C expression used to determine whether a load postincrement is a good
! thing to use for a given mode.  Defaults to the value of
! @code{HAVE_POST_INCREMENT}.
  
+ @findex USE_LOAD_POST_DECREMENT
+ @item USE_LOAD_POST_DECREMENT (@var{mode})
+ A C expression used to determine whether a load postdecrement is a good
+ thing to use for a given mode.  Defaults to the value of
+ @code{HAVE_POST_DECREMENT}.
+ 
  @findex USE_LOAD_PRE_INCREMENT
  @item USE_LOAD_PRE_INCREMENT (@var{mode})
! A C expression used to determine whether a load preincrement is a good
! thing to use for a given mode.  Defaults to the value of
! @code{HAVE_PRE_INCREMENT}.
! 
! @findex USE_LOAD_PRE_DECREMENT
! @item USE_LOAD_PRE_DECREMENT (@var{mode})
! A C expression used to determine whether a load predecrement is a good
! thing to use for a given mode.  Defaults to the value of
! @code{HAVE_PRE_DECREMENT}.
  
  @findex USE_STORE_POST_INCREMENT
  @item USE_STORE_POST_INCREMENT (@var{mode})
! A C expression used to determine whether a store postincrement is a good
! thing to use for a given mode.  Defaults to the value of
! @code{HAVE_POST_INCREMENT}.
  
+ @findex USE_STORE_POST_DECREMENT
+ @item USE_STORE_POST_DECREMENT (@var{mode})
+ A C expression used to determine whether a store postdeccrement is a good
+ thing to use for a given mode.  Defaults to the value of
+ @code{HAVE_POST_DECREMENT}.
+ 
  @findex USE_STORE_PRE_INCREMENT
  @item USE_STORE_PRE_INCREMENT (@var{mode})
! This macro is used to determine whether a store preincrement is a good
! thing to use for a given mode.  Defaults to the value of
! @code{HAVE_PRE_INCREMENT}.
! 
! @findex USE_STORE_PRE_DECREMENT
! @item USE_STORE_PRE_DECREMENT (@var{mode})
! This macro is used to determine whether a store predecrement is a good
! thing to use for a given mode.  Defaults to the value of
! @code{HAVE_PRE_DECREMENT}.
  
  @findex NO_FUNCTION_CSE
  @item NO_FUNCTION_CSE




More information about the Gcc-patches mailing list