[Bug target/53724] ICE when using the 'd' asm operand modifier

2012-06-20 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53724

Uros Bizjak  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #1 from Uros Bizjak  2012-06-20 07:45:35 
UTC ---
(In reply to comment #0)
> The following gives:
> internal compiler error: in print_reg, at config/i386/i386.c:13692
> 
> typedef double ymmd __attribute__ ((vector_size (32)));
> ymmd func(ymmd p1, ymmd p2)
> {
> asm ("vfmadd132pd %1, %d0"
> : "+x" (p1) : "x" (p2));
> return p1;
> }

For some reason we assert that ymm registers can't be duplicated. H.J.?


[Bug target/53724] ICE when using the 'd' asm operand modifier

2012-06-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53724

Richard Guenther  changed:

   What|Removed |Added

 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-06-20
 Ever Confirmed|0   |1
   Severity|enhancement |normal

--- Comment #2 from Richard Guenther  2012-06-20 
09:11:42 UTC ---
Confirmed.


[Bug target/53724] ICE when using the 'd' asm operand modifier

2012-06-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53724

--- Comment #3 from H.J. Lu  2012-06-20 12:25:30 
UTC ---
'd' is used to encode SSE instructions with VEX
encoding.  There are no SSE instructions with YMM
registers.


[Bug target/53724] ICE when using the 'd' asm operand modifier

2012-06-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53724

--- Comment #4 from H.J. Lu  2012-06-20 12:38:12 
UTC ---
Something like this

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index e2f5740..0daf601 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -13879,7 +13879,8 @@ print_reg (rtx x, int code, FILE *file)
 case 32:
   if (SSE_REG_P (x))
 {
-  gcc_assert (!duplicated);
+  if (duplicated)
+error ("unsupported `d' specifier on AVX register");
   putc ('y', file);
   fputs (hi_reg_name[REGNO (x)] + 1, file);
   return;