summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/regclass.c38
-rw-r--r--gcc/tm.texi14
3 files changed, 36 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b684e5bfc2c..ce063a0d71e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Wed Nov 25 20:11:04 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * regclass.c (init_reg_sets): Move code that calculates tables
+ dependent on reg_class_contents from here...
+ (init_reg_sets_1): To here.
+
Wed Nov 25 14:54:46 1998 Zack Weinberg <zack@rabi.phys.columbia.edu>
* cpplib.h: Delete struct import_file. Add ihash element to
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 1c249ea0529..b442cc266be 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -236,6 +236,25 @@ init_reg_sets ()
bcopy (initial_call_used_regs, call_used_regs, sizeof call_used_regs);
bzero (global_regs, sizeof global_regs);
+ /* Do any additional initialization regsets may need */
+ INIT_ONCE_REG_SET ();
+}
+
+/* After switches have been processed, which perhaps alter
+ `fixed_regs' and `call_used_regs', convert them to HARD_REG_SETs. */
+
+static void
+init_reg_sets_1 ()
+{
+ register unsigned int i, j;
+
+ /* This macro allows the fixed or call-used registers
+ and the register classes to depend on target flags. */
+
+#ifdef CONDITIONAL_REGISTER_USAGE
+ CONDITIONAL_REGISTER_USAGE;
+#endif
+
/* Compute number of hard regs in each class. */
bzero ((char *) reg_class_size, sizeof reg_class_size);
@@ -339,25 +358,6 @@ init_reg_sets ()
}
}
- /* Do any additional initialization regsets may need */
- INIT_ONCE_REG_SET ();
-}
-
-/* After switches have been processed, which perhaps alter
- `fixed_regs' and `call_used_regs', convert them to HARD_REG_SETs. */
-
-static void
-init_reg_sets_1 ()
-{
- register unsigned int i, j;
-
- /* This macro allows the fixed or call-used registers
- to depend on target flags. */
-
-#ifdef CONDITIONAL_REGISTER_USAGE
- CONDITIONAL_REGISTER_USAGE;
-#endif
-
/* Initialize "constant" tables. */
CLEAR_HARD_REG_SET (fixed_reg_set);
diff --git a/gcc/tm.texi b/gcc/tm.texi
index be5ccc9a1fa..9d4bb3b82d8 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -1357,9 +1357,17 @@ preserve the entire contents of a register across a call.
@findex fixed_regs
@findex call_used_regs
@item CONDITIONAL_REGISTER_USAGE
-Zero or more C statements that may conditionally modify two variables
-@code{fixed_regs} and @code{call_used_regs} (both of type @code{char
-[]}) after they have been initialized from the two preceding macros.
+Zero or more C statements that may conditionally modify four variables
+@code{fixed_regs}, @code{call_used_regs}, @code{global_regs}
+(these three are of type @code{char []}) and @code{reg_class_contents}
+(of type @code{HARD_REG_SET}).
+Before the macro is called @code{fixed_regs}, @code{call_used_regs}
+and @code(reg_class_contents) have been initialized from
+@code{FIXED_REGISTERS}, @code{CALL_USED_REGISTERS} and
+@code{REG_CLASS_CONTENTS}, respectively,
+@code{global_regs} has been cleared, and any @samp{-ffixed-@var{reg}},
+@samp{-fcall-used-@var{reg}} and @samp{-fcall-saved-@var{reg}} command
+options have been applied.
This is necessary in case the fixed or call-clobbered registers depend
on target flags.