summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-17 15:27:53 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-17 15:27:53 +0000
commit71db0d8bd594556609915add775a0074802718de (patch)
tree8353f8418ac7a3898efaae0ba10e35c172004549 /gcc/recog.c
parent51d4f5041f4b6aace566be41a209f30684eda5e0 (diff)
downloadgcc-71db0d8bd594556609915add775a0074802718de.tar.gz
* target.def (preferred_output_reload_class): New hook.
* doc/tm.texi.in (TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Document. * doc/tm.texi: Regenerate. * targhooks.c (default_preferred_output_reload_class): New function. * targhooks.h (default_preferred_output_reload_class): Declare. * reload.c (find_dummy_reload): Change rclass argument type from enum reg_class to reg_class_t. Change this_alternative array type from enum reg_class to reg_class_t. Use TARGET_PREFERRED_OUTPUT_RELOAD_CLASS target hook. (push_reload): Change preferred_class variable type to reg_class_t. Use TARGET_PREFERRED_OUTPUT_RELOAD_CLASS target hook. * recog.c (reg_fits_class_p): Change result type to bool. Change cl argument type from enum reg_class to reg_class_t. Use HARD_REGISTER_NUM_P predicate. * recog.h (reg_fits_class_p): Update prototype. * config/i386/i386.h (PREFERRED_OUTPUT_RELOAD_CLASS): Remove. * config/i386/i386-protos.h (ix86_preferred_output_reload_class): Remove. * config/i386/i386.c (ix86_preferred_output_reload_class): Make static. Change regclass argument and result types from enum reg_class to reg_class_t. (TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165588 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index e16a85cc4ea..3ab72f10dd3 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -2751,21 +2751,21 @@ constrain_operands (int strict)
return 0;
}
-/* Return 1 iff OPERAND (assumed to be a REG rtx)
+/* Return true iff OPERAND (assumed to be a REG rtx)
is a hard reg in class CLASS when its regno is offset by OFFSET
and changed to mode MODE.
If REG occupies multiple hard regs, all of them must be in CLASS. */
-int
-reg_fits_class_p (rtx operand, enum reg_class cl, int offset,
+bool
+reg_fits_class_p (const_rtx operand, reg_class_t cl, int offset,
enum machine_mode mode)
{
int regno = REGNO (operand);
if (cl == NO_REGS)
- return 0;
+ return false;
- return (regno < FIRST_PSEUDO_REGISTER
+ return (HARD_REGISTER_NUM_P (regno)
&& in_hard_reg_set_p (reg_class_contents[(int) cl],
mode, regno + offset));
}