diff options
author | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-09 13:30:19 +0000 |
---|---|---|
committer | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-09 13:30:19 +0000 |
commit | af7eac22a2e692134c3ca169c46e3dbfd7793a37 (patch) | |
tree | 031dd1ced917e31481cde7178045772632594fd5 /gcc/recog.c | |
parent | 4ce9876e3339802e7896e292e704df68dfed8e0e (diff) | |
download | gcc-af7eac22a2e692134c3ca169c46e3dbfd7793a37.tar.gz |
2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* recog.c (verfiy_changes): Disallow renaming of hard regs in
inline asms for register asm ("") declarations.
2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.target/s390/20090223-1.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144726 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 7c22faec6de..70370e3ad81 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -379,6 +379,16 @@ verify_changes (int num) if (! memory_address_p (GET_MODE (object), XEXP (object, 0))) break; } + else if (REG_P (changes[i].old) + && asm_noperands (PATTERN (object)) > 0 + && REG_EXPR (changes[i].old) != NULL_TREE + && DECL_ASSEMBLER_NAME_SET_P (REG_EXPR (changes[i].old)) + && DECL_REGISTER (REG_EXPR (changes[i].old))) + { + /* Don't allow changes of hard register operands to inline + assemblies if they have been defined as register asm ("x"). */ + break; + } else if (insn_invalid_p (object)) { rtx pat = PATTERN (object); |