summaryrefslogtreecommitdiff
path: root/gcc/target.h
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2008-07-09 17:43:11 +0400
committerAnatoly Sokolov <aesok@gcc.gnu.org>2008-07-09 17:43:11 +0400
commitdbc42c44d87ef1031c3f649436df02fbcdbcc3c6 (patch)
tree1e2b360a3708a9b833a49b11cda5009cb7f10ed9 /gcc/target.h
parent28f16d05a00d360b76f3c48ac739bcab22fb1418 (diff)
downloadgcc-dbc42c44d87ef1031c3f649436df02fbcdbcc3c6.tar.gz
target.h (struct gcc_target): Add hard_regno_scratch_ok field.
* target.h (struct gcc_target): Add hard_regno_scratch_ok field. * target-def.h (TARGET_HARD_REGNO_SCRATCH_OK): New. (TARGET_INITIALIZER): Use TARGET_HARD_REGNO_SCRATCH_OK. * targhooks.c (default_hard_regno_scratch_ok): New function. * targhooks.h (default_hard_regno_scratch_ok): Declare function. * doc/tm.texi: Document TARGET_HARD_REGNO_SCRATCH_OK hook. * recog.c: Include "target.h". (peep2_find_free_register): Add check for global regs. Add target specific check. * Makefile.in (recog.o): Depend on target.h. From-SVN: r137657
Diffstat (limited to 'gcc/target.h')
-rw-r--r--gcc/target.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/target.h b/gcc/target.h
index 11852430c8d..d1642ef9497 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -872,6 +872,10 @@ struct gcc_target
but will be later. */
void (* instantiate_decls) (void);
+ /* Return true if is OK to use a hard register REGNO as scratch register
+ in peephole2. */
+ bool (* hard_regno_scratch_ok) (unsigned int regno);
+
/* Functions specific to the C family of frontends. */
struct c {
/* Return machine mode for non-standard suffix