diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-02 02:54:55 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-02 02:54:55 +0000 |
commit | d91f2122e6ec441dc2fff6302c869bba14f7443d (patch) | |
tree | 69d434a432d126114d1f18512af30880687b1df2 /gcc/integrate.c | |
parent | 5dc87194b1e7d01f0aad8c58be747619d566130a (diff) | |
download | gcc-d91f2122e6ec441dc2fff6302c869bba14f7443d.tar.gz |
* rtl.h (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): New macro.
* gcse.c (hash_string_1): New function.
(hash_expr_1) <ASM_OPERANDS>: Disregard filename and line number.
(expr_equiv_p) <ASM_OPERANDS>: Likewise.
* cse.c (rtx_cost): Don't increase the cost of ASM_OPERANDS.
(canon_hash_string): New function.
(canon_hash) <ASM_OPERANDS>: Disregard filename and line number.
(exp_equiv_p) <ASM_OPERANDS>: Likewise.
(fold_rtx): Use ASM_OPERANDS accessor macros.
* emit-rtl.c (copy_insn_1): Likewise.
* integrate.c (copy_rtx_and_substitute): Likewise.
* stmt.c (expand_asm_operands): Likewise. Give an
ASM_OPERANDS rtx the mode of the output reg being set from it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index ca5483a969b..e267f5e8865 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -2040,20 +2040,23 @@ copy_rtx_and_substitute (orig, map, for_lhs) break; case ASM_OPERANDS: - /* If a single asm insn contains multiple output operands - then it contains multiple ASM_OPERANDS rtx's that share operand 3. - We must make sure that the copied insn continues to share it. */ - if (map->orig_asm_operands_vector == XVEC (orig, 3)) + /* If a single asm insn contains multiple output operands then + it contains multiple ASM_OPERANDS rtx's that share the input + and constraint vecs. We must make sure that the copied insn + continues to share it. */ + if (map->orig_asm_operands_vector == ASM_OPERANDS_INPUT_VEC (orig)) { copy = rtx_alloc (ASM_OPERANDS); copy->volatil = orig->volatil; - XSTR (copy, 0) = XSTR (orig, 0); - XSTR (copy, 1) = XSTR (orig, 1); - XINT (copy, 2) = XINT (orig, 2); - XVEC (copy, 3) = map->copy_asm_operands_vector; - XVEC (copy, 4) = map->copy_asm_constraints_vector; - XSTR (copy, 5) = XSTR (orig, 5); - XINT (copy, 6) = XINT (orig, 6); + ASM_OPERANDS_TEMPLATE (copy) = ASM_OPERANDS_TEMPLATE (orig); + ASM_OPERANDS_OUTPUT_CONSTRAINT (copy) + = ASM_OPERANDS_OUTPUT_CONSTRAINT (orig); + ASM_OPERANDS_OUTPUT_IDX (copy) = ASM_OPERANDS_OUTPUT_IDX (orig); + ASM_OPERANDS_INPUT_VEC (copy) = map->copy_asm_operands_vector; + ASM_OPERANDS_INPUT_CONSTRAINT_VEC (copy) + = map->copy_asm_constraints_vector; + ASM_OPERANDS_SOURCE_FILE (copy) = ASM_OPERANDS_SOURCE_FILE (orig); + ASM_OPERANDS_SOURCE_LINE (copy) = ASM_OPERANDS_SOURCE_LINE (orig); return copy; } break; @@ -2212,9 +2215,10 @@ copy_rtx_and_substitute (orig, map, for_lhs) if (code == ASM_OPERANDS && map->orig_asm_operands_vector == 0) { - map->orig_asm_operands_vector = XVEC (orig, 3); - map->copy_asm_operands_vector = XVEC (copy, 3); - map->copy_asm_constraints_vector = XVEC (copy, 4); + map->orig_asm_operands_vector = ASM_OPERANDS_INPUT_VEC (orig); + map->copy_asm_operands_vector = ASM_OPERANDS_INPUT_VEC (copy); + map->copy_asm_constraints_vector + = ASM_OPERANDS_INPUT_CONSTRAINT_VEC (copy); } return copy; |