diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-09-02 02:54:55 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2000-09-02 02:54:55 +0000 |
commit | 6462bb432fe58e6dba719b88df693f768a05e5a6 (patch) | |
tree | 69d434a432d126114d1f18512af30880687b1df2 /gcc/stmt.c | |
parent | 298ec8f42f65f88ac5bf4df5f8592adc0edfbdfc (diff) | |
download | gcc-6462bb432fe58e6dba719b88df693f768a05e5a6.zip gcc-6462bb432fe58e6dba719b88df693f768a05e5a6.tar.gz gcc-6462bb432fe58e6dba719b88df693f768a05e5a6.tar.bz2 |
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) <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.
From-SVN: r36110
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -1595,7 +1595,9 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) argvec = rtvec_alloc (ninputs); constraints = rtvec_alloc (ninputs); - body = gen_rtx_ASM_OPERANDS (VOIDmode, TREE_STRING_POINTER (string), + body = gen_rtx_ASM_OPERANDS ((noutputs == 0 ? VOIDmode + : GET_MODE (output_rtx[0])), + TREE_STRING_POINTER (string), empty_string, 0, argvec, constraints, filename, line); @@ -1771,9 +1773,9 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) warning ("asm operand %d probably doesn't match constraints", i); } generating_concat_p = old_generating_concat_p; - XVECEXP (body, 3, i) = op; + ASM_OPERANDS_INPUT (body, i) = op; - XVECEXP (body, 4, i) /* constraints */ + ASM_OPERANDS_INPUT_CONSTRAINT_EXP (body, i) = gen_rtx_ASM_INPUT (TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))), orig_constraint); i++; @@ -1785,7 +1787,8 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) generating_concat_p = 0; for (i = 0; i < ninputs - ninout; i++) - XVECEXP (body, 3, i) = protect_from_queue (XVECEXP (body, 3, i), 0); + ASM_OPERANDS_INPUT (body, i) + = protect_from_queue (ASM_OPERANDS_INPUT (body, i), 0); for (i = 0; i < noutputs; i++) output_rtx[i] = protect_from_queue (output_rtx[i], 1); @@ -1795,9 +1798,9 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) { int j = inout_opnum[i]; - XVECEXP (body, 3, ninputs - ninout + i) /* argvec */ + ASM_OPERANDS_INPUT (body, ninputs - ninout + i) = output_rtx[j]; - XVECEXP (body, 4, ninputs - ninout + i) /* constraints */ + ASM_OPERANDS_INPUT_CONSTRAINT_EXP (body, ninputs - ninout + i) = gen_rtx_ASM_INPUT (inout_mode[i], digit_strings[j]); } @@ -1810,7 +1813,8 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) if (noutputs == 1 && nclobbers == 0) { - XSTR (body, 1) = TREE_STRING_POINTER (TREE_PURPOSE (outputs)); + ASM_OPERANDS_OUTPUT_CONSTRAINT (body) + = TREE_STRING_POINTER (TREE_PURPOSE (outputs)); insn = emit_insn (gen_rtx_SET (VOIDmode, output_rtx[0], body)); } @@ -1837,7 +1841,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) = gen_rtx_SET (VOIDmode, output_rtx[i], gen_rtx_ASM_OPERANDS - (VOIDmode, + (GET_MODE (output_rtx[i]), TREE_STRING_POINTER (string), TREE_STRING_POINTER (TREE_PURPOSE (tail)), i, argvec, constraints, |