diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-09 11:17:23 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-09 11:17:23 +0000 |
commit | 1606e68a803638a3a3de0678de340d60a480cb71 (patch) | |
tree | fae4f203782bfda9e5f07b9ca8e588b44eaa0dd2 /gcc/targhooks.c | |
parent | f7646c6a0c63dcafdfbda632c366b48654f4024a (diff) | |
download | gcc-1606e68a803638a3a3de0678de340d60a480cb71.tar.gz |
2005-06-09 Adrian Straetling <straetling@de.ibm.com>
* target.h (insn_valid_within_doloop): Rename into
"invalid_within_doloop". Change return type to "const char *".
Update Comment.
* targhooks.h (default_insn_valid_within_doloop): Rename into
"default_invalid_within_doloop".
* targhooks.c (default_insn_valid_within_doloop): Likewise.
Update Comment.
* target-def.h (TARGET_INSN_VALID_WITHIN_DOLOOP): Rename target hook
into "TARGET_INVALID_WITHIN_DOLOOP". Default it to
"default_invalid_within_doloop".
* hooks.c (hook_constcharptr_rtx_null): New function.
(hook_bool_rtx_true): Remove.
* hooks.h (hook_constcharptr_rtx_null): Declare.
(hook_bool_rtx_true): Remove.
* loop-doloop.c (doloop_valid_p): Temporarily store return value of
"invalid_within_doloop" and print error message if non-null.
Update Comment.
* doc/tm.texi: Update documentation.
* config/s390/s390.c: Adjust to new hook name and new default hook.
* config/rs6000/rs6000.c: (rs6000_insn_valid_within_doloop): Rename
into "rs6000_invalid_within_doloop".
(rs6000_invalid_within_doloop): Change return type to "static const
char *" and replace return values. Update Comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100797 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 42992b78c34..1de5809db13 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -262,34 +262,28 @@ default_scalar_mode_supported_p (enum machine_mode mode) } } -/* TRUE if INSN insn is valid within a low-overhead loop. +/* NULL if INSN insn is valid within a low-overhead loop, otherwise returns + an error message. This function checks whether a given INSN is valid within a low-overhead - loop. A called function may clobber any special registers required for - low-overhead looping. Additionally, some targets (eg, PPC) use the count + loop. If INSN is invalid it returns the reason for that, otherwise it + returns NULL. A called function may clobber any special registers required + for low-overhead looping. Additionally, some targets (eg, PPC) use the count register for branch on table instructions. We reject the doloop pattern in these cases. */ -bool -default_insn_valid_within_doloop (rtx insn) +const char * +default_invalid_within_doloop (rtx insn) { if (CALL_P (insn)) - { - if (dump_file) - fprintf (dump_file, "Doloop: Function call in loop.\n"); - return false; - } + return "Function call in loop."; if (JUMP_P (insn) && (GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC || GET_CODE (PATTERN (insn)) == ADDR_VEC)) - { - if (dump_file) - fprintf (dump_file, "Doloop: Computed branch in the loop.\n"); - return false; - } + return "Computed branch in the loop."; - return true; + return NULL; } bool |