diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-09-29 22:33:31 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-09-29 22:33:31 +0000 |
commit | ef70106edf10ab9f81894962b1d9c6cd761f3b0a (patch) | |
tree | bcd4aea0d84b7c832c772097ac266e84c46eca45 /gcc | |
parent | 59d6fc0f70372f52efa47d9b176affc7e1047cd3 (diff) | |
download | gcc-ef70106edf10ab9f81894962b1d9c6cd761f3b0a.tar.gz |
(expand_asm_operands): Fix errors in previous patches.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12860 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/stmt.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 3b6e147db30..21e493260f3 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1422,12 +1422,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) the worst that happens if we get it wrong is we issue an error message. */ - for (j = 0; j < TREE_STRING_LENGTH (TREE_PURPOSE (tail)); j++) + for (j = 0; j < TREE_STRING_LENGTH (TREE_PURPOSE (tail)) - 1; j++) switch (TREE_STRING_POINTER (TREE_PURPOSE (tail))[j]) { case '+': /* Make sure we can specify the matching operand. */ - if (i >= '0' && i <= '9') + if (i > 9) { error ("output operand constraint %d contains `+'", i); return; @@ -1545,7 +1545,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) /* Make sure constraint has neither `=' nor `+'. */ - for (j = 0; j < TREE_STRING_LENGTH (TREE_PURPOSE (tail)); j++) + for (j = 0; j < TREE_STRING_LENGTH (TREE_PURPOSE (tail)) - 1; j++) switch (TREE_STRING_POINTER (TREE_PURPOSE (tail))[j]) { case '+': case '=': @@ -3448,29 +3448,13 @@ expand_decl (decl) enum machine_mode reg_mode = promote_mode (type, DECL_MODE (decl), &unsignedp, 0); - if (TREE_CODE (type) == COMPLEX_TYPE) - { - rtx realpart, imagpart; - enum machine_mode partmode = TYPE_MODE (TREE_TYPE (type)); - - /* For a complex type variable, make a CONCAT of two pseudos - so that the real and imaginary parts - can be allocated separately. */ - realpart = gen_reg_rtx (partmode); - REG_USERVAR_P (realpart) = 1; - imagpart = gen_reg_rtx (partmode); - REG_USERVAR_P (imagpart) = 1; - DECL_RTL (decl) = gen_rtx (CONCAT, reg_mode, realpart, imagpart); - } - else - { - DECL_RTL (decl) = gen_reg_rtx (reg_mode); - if (TREE_CODE (type) == POINTER_TYPE) - mark_reg_pointer (DECL_RTL (decl), - (TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl))) - / BITS_PER_UNIT)); - REG_USERVAR_P (DECL_RTL (decl)) = 1; - } + DECL_RTL (decl) = gen_reg_rtx (reg_mode); + mark_user_reg (DECL_RTL (decl)); + + if (TREE_CODE (type) == POINTER_TYPE) + mark_reg_pointer (DECL_RTL (decl), + (TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl))) + / BITS_PER_UNIT)); } else if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST) { |