diff options
author | Richard Henderson <rth@redhat.com> | 2003-07-26 08:53:14 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-07-26 08:53:14 -0700 |
commit | a6c14a644cb2a52baecf1f74d128297352fd360d (patch) | |
tree | 2004ca3e22c09d34da7b9b5d3effeba065873fd5 /gcc/cse.c | |
parent | cd65f08202a73d0f3cbe11b13e0e279ed2f25fbb (diff) | |
download | gcc-a6c14a644cb2a52baecf1f74d128297352fd360d.zip gcc-a6c14a644cb2a52baecf1f74d128297352fd360d.tar.gz gcc-a6c14a644cb2a52baecf1f74d128297352fd360d.tar.bz2 |
re PR inline-asm/11676 (operand to volatile asm incorrectly removed)
PR inline-asm/11676
* cse.c (count_reg_usage): Handle asm_operands properly.
From-SVN: r69816
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -7384,6 +7384,16 @@ count_reg_usage (rtx x, int *counts, rtx dest, int incr) count_reg_usage (XEXP (x, 1), counts, NULL_RTX, incr); return; + case ASM_OPERANDS: + /* If the asm is volatile, then this insn cannot be deleted, + and so the inputs *must* be live. */ + if (MEM_VOLATILE_P (x)) + dest = NULL_RTX; + /* Iterate over just the inputs, not the constraints as well. */ + for (i = ASM_OPERANDS_INPUT_LENGTH (x) - 1; i >= 0; i--) + count_reg_usage (ASM_OPERANDS_INPUT (x, i), counts, dest, incr); + return; + case INSN_LIST: abort (); |