From 6462bb432fe58e6dba719b88df693f768a05e5a6 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 2 Sep 2000 02:54:55 +0000 Subject: rtl.h (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): New macro. * rtl.h (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): New macro. * gcse.c (hash_string_1): New function. (hash_expr_1) : Disregard filename and line number. (expr_equiv_p) : Likewise. * cse.c (rtx_cost): Don't increase the cost of ASM_OPERANDS. (canon_hash_string): New function. (canon_hash) : Disregard filename and line number. (exp_equiv_p) : 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. From-SVN: r36110 --- gcc/integrate.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'gcc/integrate.c') diff --git a/gcc/integrate.c b/gcc/integrate.c index ca5483a..e267f5e 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; -- cgit v1.1