From f3ba4235297de12ef987881cb250fefa34e995a8 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 3 May 2007 16:32:25 +0200 Subject: [PATCH] re PR target/31768 (Invalid code or ICE for %z constraint) PR target/31768 * config/i386/i386.c (print_operand) ['z']: Output 'w' for operands of size 2 when operand is not MEM_P. From-SVN: r124379 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfbde545dd2..8f1c3f48c02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-05-03 Uros Bizjak + + PR target/31768 + * config/i386/i386.c (print_operand) ['z']: Output 'w' for + operands of size 2 when operand is not MEM_P. + 2007-05-03 Zdenek Dvorak PR tree-optimization/30565 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 138f6059351..a3936546d7b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8372,9 +8372,15 @@ print_operand (FILE *file, rtx x, int code) return; case 2: + if (MEM_P (x)) + { #ifdef HAVE_GAS_FILDS_FISTS - putc ('s', file); + putc ('s', file); #endif + return; + } + else + putc ('w', file); return; case 4: