aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-12-17 00:15:04 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2020-12-17 00:15:04 +0000
commitb665081f577d875903570ad64f40278faf0f79a0 (patch)
tree80017d507a06471713351db5993f09d66c359aac /gcc/recog.c
parentd6c9781e073c359552d361ad34eb07c6c9231573 (diff)
downloadgcc-b665081f577d875903570ad64f40278faf0f79a0.zip
gcc-b665081f577d875903570ad64f40278faf0f79a0.tar.gz
gcc-b665081f577d875903570ad64f40278faf0f79a0.tar.bz2
recog: Split out a register_asm_p function
verify_changes has a test for whether a particular hard register is a user-defined register asm. A later patch needs to test the same thing, so this patch splits it out into a helper. gcc/ * rtl.h (register_asm_p): Declare. * recog.c (verify_changes): Split out the test for whether a hard register is a register asm to... * rtlanal.c (register_asm_p): ...this new function.
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 6d8b7d5..2d93416 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -408,10 +408,7 @@ verify_changes (int num)
changes[i].old
&& REG_P (changes[i].old)
&& asm_noperands (PATTERN (object)) > 0
- && REG_EXPR (changes[i].old) != NULL_TREE
- && HAS_DECL_ASSEMBLER_NAME_P (REG_EXPR (changes[i].old))
- && DECL_ASSEMBLER_NAME_SET_P (REG_EXPR (changes[i].old))
- && DECL_REGISTER (REG_EXPR (changes[i].old)))
+ && register_asm_p (changes[i].old))
{
/* Don't allow changes of hard register operands to inline
assemblies if they have been defined as register asm ("x"). */