From: Richard Kenner Date: Wed, 21 Dec 1994 18:45:42 +0000 (-0500) Subject: (expand_asm_operands): Make sure input operands are valid constants if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76ebc969d32ea4ad8a7fd7a98a30f093906b2847;p=gcc.git (expand_asm_operands): Make sure input operands are valid constants if they are constants. From-SVN: r8682 --- diff --git a/gcc/stmt.c b/gcc/stmt.c index 4d3ed87e4f0..3c8ef3720b1 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1492,6 +1492,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) XVECEXP (body, 3, i) /* argvec */ = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); + if (CONSTANT_P (XVECEXP (body, 3, i)) + && ! general_operand (XVECEXP (body, 3, i), + TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))))) + XVECEXP (body, 3, i) + = force_reg (TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))), + XVECEXP (body, 3, i)); XVECEXP (body, 4, i) /* constraints */ = gen_rtx (ASM_INPUT, TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))), TREE_STRING_POINTER (TREE_PURPOSE (tail)));