Use WORD_REGISTER_OPERATION and LOAD_EXTEND_OP and delete
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 25 Sep 1993 12:29:59 +0000 (08:29 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 25 Sep 1993 12:29:59 +0000 (08:29 -0400)
BYTE_LOADS_{SIGN,ZERO}_EXTEND.

From-SVN: r5477

12 files changed:
gcc/config/a29k/a29k.h
gcc/config/alpha/alpha.h
gcc/config/arm/arm.h
gcc/config/clipper/clipper.h
gcc/config/i960/i960.h
gcc/config/m88k/m88k.h
gcc/config/mips/mips.h
gcc/config/pa/pa.h
gcc/config/romp/romp.h
gcc/config/rs6000/rs6000.h
gcc/config/sh/sh.h
gcc/config/sparc/sparc.h

index 062a9eab53029a7b904ccd19825b2b2f85af27da..95656cc1b4415f9d208aba2156699a6e8344b6ea 100644 (file)
@@ -1204,9 +1204,15 @@ extern char *a29k_function_name;
    manipulate fields.  */
 #define SLOW_BYTE_ACCESS       0
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.  */
-#define BYTE_LOADS_ZERO_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* Define if the object format being used is COFF or a superset.  */
 #define OBJECT_FORMAT_COFF
index 880cece20a1d59365779fc83e61b977eeb40f2cc..1758919bb169278f3249b79618eb5dd59ea05ed0 100644 (file)
@@ -1221,13 +1221,15 @@ extern char *current_function_name;
 
 #define SLOW_BYTE_ACCESS       1
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bits in the register.  */
-/* #define BYTE_LOADS_ZERO_EXTEND  */
-
-/* Define if normal loads of shorter-than-word items from memory sign-extends
-   the rest of the bits in the register.  */
-#define BYTE_LOADS_SIGN_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
 
 /* Define if loading short immediate values into registers sign extends.  */
 #define SHORT_IMMEDIATES_SIGN_EXTEND
index ad12ecbcdecda7ab21810606465ac2e81d5fd383..e2e06918524fb591a27b4df0396fdd614a5e7436 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler, for Acorn RISC Machine.
-   Copyright (C) 1991 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1993 Free Software Foundation, Inc.
    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
               and Martin Simmons (@harleqn.co.uk).
 
@@ -848,11 +848,6 @@ do                                                                 \
    in one reasonably fast instruction.  */
 #define MOVE_MAX 4
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.
-   On the ARM, movhi does a garbage extend.  */
-/* #define BYTE_LOADS_ZERO_EXTEND */
-
 /* Define this if zero-extension is slow (more than one real instruction).
    On the ARM, it is more than one instruction only if not fetching from
    memory.  */
index 054660f2908fdb27d28dcd358a06545e42b4edda..06a6ffe00d7ceebf7aada1ce7a75ef4fb79f917d 100644 (file)
@@ -773,10 +773,15 @@ do                                                                        \
    jumps to the default label instead.  */
 /* #define CASE_DROPS_THROUGH */
 
-/* Define this macro if an instruction to load a value narrower than a
-   word from memory into a register also sign-extends the value to
-   the whole register. */
-#define BYTE_LOADS_SIGN_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index e9544edf1523c21ad8fb6531e0a07804fa72d0d4..d76a19f7fe7de1a11b6b8cf3a7d53295cbb35b23 100644 (file)
@@ -1055,9 +1055,15 @@ extern struct rtx_def *legitimize_address ();
    in one reasonably fast instruction.  */
 #define MOVE_MAX 16
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.  */
-#define BYTE_LOADS_ZERO_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* Nonzero if access to memory by bytes is no faster than for words.
    Defining this results in worse code on the i960.  */
index bc6dbeab81581cc5d81b21d2657c0adcc742de8d..8573f1a62e1ded571947b145925518ba0b62a61e 100644 (file)
@@ -1508,9 +1508,15 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
    in one reasonably fast instruction.  */
 #define MOVE_MAX 8
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.  */
-#define BYTE_LOADS_ZERO_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* Zero if access to memory by bytes is faster.  */
 #define SLOW_BYTE_ACCESS 1
index e1d74e69c86e8858ba724b444494127eceb58f27..11c47bee3a0d2e76dc954ebcdb110dfdda7e362d 100644 (file)
@@ -1049,12 +1049,15 @@ do {                                                    \
 
 #define PROMOTE_PROTOTYPES
 
-/* Define this macro if an instruction to load a value narrower
-   than a word from memory into a register also zero-extends the
-   value to the whole  register.  */
-
-#define BYTE_LOADS_ZERO_EXTEND
-
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 \f
 /* Standard register usage.  */
 
index 15d6356ab51d84defd150a7b193bb7ba8ade06b9..551a6f7b14ebb00a831c8f7568326c459f0af31f 100644 (file)
@@ -1367,9 +1367,15 @@ while (0)
    in one reasonably fast instruction.  */
 #define MOVE_MAX 8
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.  */
-#define BYTE_LOADS_ZERO_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* Nonzero if access to memory by bytes is slow and undesirable.  */
 #define SLOW_BYTE_ACCESS 1
index be5047af2db75887617922a398555022a4a8b906..c454b5e4a301ee1ab47dcfe39dd7420c16d2cc98 100644 (file)
@@ -1186,9 +1186,15 @@ struct rt_cargs {int gregs, fregs; };
    is undesirable.  */
 #define SLOW_BYTE_ACCESS 1
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.  */
-#define BYTE_LOADS_ZERO_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* This is BSD, so it wants DBX format.  */
 #define DBX_DEBUGGING_INFO
index 6ebb8577f3a56900dfb646d584f867c4391ea8ba..5949ff64204210fdc47fe705b060056ecf220477 100644 (file)
@@ -1288,9 +1288,15 @@ struct rs6000_args {int words, fregno, nargs_prototype; };
    is undesirable.  */
 #define SLOW_BYTE_ACCESS 1
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.  */
-#define BYTE_LOADS_ZERO_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* Define if loading short immediate values into registers sign extends.  */
 #define SHORT_IMMEDIATES_SIGN_EXTEND
index c889bb09e83d517b32b629d3dde2a78fe5ab1913..c1fdda9904481aa79009c42416acef113c237903 100644 (file)
@@ -902,9 +902,15 @@ extern int current_function_anonymous_args;
    in one reasonably fast instruction.  */
 #define MOVE_MAX 4
 
-/* Define if normal loads of shorter-than-word items from sign extends
-   the rest of the bigs in the register. */
-#define BYTE_LOADS_SIGN_EXTEND  1
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
 
 /* Define this if zero-extension is slow (more than one real instruction).
    On the SH, it's only one instruction */
index 473180487e9af9b330b87a608f1846e7eee3c80e..c615eaf0c53e91a8993a3b66028b0429ae44adb9 100644 (file)
@@ -1348,9 +1348,15 @@ extern struct rtx_def *legitimize_pic_address ();
   gen_rtx (MEM, SImode, gen_rtx (SYMBOL_REF, Pmode, "errno"))
 #endif /* 0 */
 
-/* Define if normal loads of shorter-than-word items from memory clears
-   the rest of the bigs in the register.  */
-#define BYTE_LOADS_ZERO_EXTEND
+/* Define if operations between registers always perform the operation
+   on the full register even if a narrower mode is specified.  */
+#define WORD_REGISTER_OPERATIONS
+
+/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
+   will either zero-extend or sign-extend.  The value of this macro should
+   be the code that says which one of the two operations is implicitly
+   done, NIL if none.  */
+#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
 
 /* Nonzero if access to memory by bytes is slow and undesirable.
    For RISC chips, it means that access to memory by bytes is no