diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-26 15:53:14 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-26 15:53:14 +0000 |
commit | 16d4da86ad326a997d75ae7a4713f4f250964883 (patch) | |
tree | 2004ca3e22c09d34da7b9b5d3effeba065873fd5 /gcc/cse.c | |
parent | 86b042fab4995bfbcc294b9f12bc6450c7e1245b (diff) | |
download | gcc-16d4da86ad326a997d75ae7a4713f4f250964883.tar.gz |
PR inline-asm/11676
* cse.c (count_reg_usage): Handle asm_operands properly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index a311be13171..a4847a857b3 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -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 (); |