From d40cd80a97bc42595464cce6b13835a7451c1129 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 20 Apr 2001 10:06:03 +0200 Subject: [PATCH] reg-stack.c (check_asm_stack_operands): Issue error if "=t" resp. * reg-stack.c (check_asm_stack_operands): Issue error if "=t" resp. "=u" is used together with "st" resp. "st(1)" clobber. From-SVN: r41446 --- gcc/ChangeLog | 5 +++++ gcc/reg-stack.c | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6de127a3dcc..002d84494d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-04-20 Jakub Jelinek + + * reg-stack.c (check_asm_stack_operands): Issue error if "=t" resp. + "=u" is used together with "st" resp. "st(1)" clobber. + 2001-04-20 Jakub Jelinek * gcse.c (gcse_main): Fix comment typo. diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 43bedebd90a..6327b24e96e 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -662,7 +662,20 @@ check_asm_stack_operands (insn) malformed_asm = 1; } else - reg_used_as_output[REGNO (recog_data.operand[i])] = 1; + { + int j; + + for (j = 0; j < n_clobbers; j++) + if (REGNO (recog_data.operand[i]) == REGNO (clobber_reg[j])) + { + error_for_asm (insn, "Output constraint %d cannot be specified together with \"%s\" clobber", + i, reg_names [REGNO (clobber_reg[j])]); + malformed_asm = 1; + break; + } + if (j == n_clobbers) + reg_used_as_output[REGNO (recog_data.operand[i])] = 1; + } } -- 2.30.2