public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/40470]  New: unable to find a register to spill in class ‘SSE_FIRST_REG’
@ 2009-06-17  4:42 hjl dot tools at gmail dot com
  2009-06-17  4:49 ` [Bug target/40470] " hjl dot tools at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-17  4:42 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2360 bytes --]

On x86, I got

[hjl@gnu-6 strcasestr]$ cat /tmp/foo.c
#include <nmmintrin.h>
__m128i load (char *);

char *
foo (const unsigned char *s1, const unsigned char *s2,
     int bmsk, __m128i frag2)
{
  int len = 0;
char *p1 = (char  *) s1;
char *p2 = (char  *) s2;
__m128i frag1, fruc, mask;
int  cmp_c, cmp_s;
  if( !p2[0]) return (char *) s1;
  if( !p1[0] ) return NULL;
  if( p2[1]) frag2 = load (p2); 
  frag1 = load (p1);
  fruc = _mm_loadu_si128 ((__m128i *) s1);
  mask = _mm_cmpistrm(fruc, frag2, 0x44);
  frag2 = _mm_blendv_epi8(frag2, mask, mask);
  frag1 = _mm_blendv_epi8(frag1, mask, mask);
  cmp_c = _mm_cmpistrc(frag2, frag1, 0x0c);
  cmp_s = _mm_cmpistrs(frag2, frag1, 0x0c);
  if( cmp_s  & cmp_c  )
    __asm("bsfl %[bmsk], %[len]" : [len] "=r" (len) : [bmsk] "r" (bmsk) );

  return NULL;
}
[hjl@gnu-6 strcasestr]$ /usr/gcc-4.4-ix86/bin/gcc  -msse4 -S /tmp/foo.c -O2 
/tmp/foo.c: In function ‘foo’:
/tmp/foo.c:27: error: unable to find a register to spill in class
‘SSE_FIRST_REG’
/tmp/foo.c:27: error: this is the insn:
(insn 89 35 40 6
/usr/gcc-4.4-ix86/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/include/smmintrin.h:62
(parallel [
            (set (reg:V16QI 24 xmm3 [orig:61 D.6187 ] [61])
                (unspec:V16QI [
                        (reg:V16QI 24 xmm3 [77])
                        (reg:V16QI 22 xmm1 [orig:63 D.6178 ] [63])
                        (const_int 68 [0x44])
                    ] 145))
            (set (reg:CC 17 flags)
                (unspec:CC [
                        (reg:V16QI 24 xmm3 [77])
                        (reg:V16QI 22 xmm1 [orig:63 D.6178 ] [63])
                        (const_int 68 [0x44])
                    ] 145))
        ]) 1840 {sse4_2_pcmpistrm} (expr_list:REG_DEAD (reg:V16QI 24 xmm3 [77])
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (nil))))
/tmp/foo.c:27: confused by earlier errors, bailing out
[hjl@gnu-6 strcasestr]$


-- 
           Summary: unable to find a register to spill in class
                    ‘SSE_FIRST_REG’
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: x86


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40470


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-06-19 13:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17  4:42 [Bug target/40470] New: unable to find a register to spill in class ‘SSE_FIRST_REG’ hjl dot tools at gmail dot com
2009-06-17  4:49 ` [Bug target/40470] " hjl dot tools at gmail dot com
2009-06-17 14:16 ` hjl dot tools at gmail dot com
2009-06-17 15:38 ` hjl dot tools at gmail dot com
2009-06-17 20:01 ` hjl dot tools at gmail dot com
2009-06-17 20:14 ` hjl dot tools at gmail dot com
2009-06-17 20:34 ` hjl dot tools at gmail dot com
2009-06-18 21:12 ` hjl at gcc dot gnu dot org
2009-06-18 21:22 ` hjl at gcc dot gnu dot org
2009-06-18 21:23 ` hjl at gcc dot gnu dot org
2009-06-19 12:55 ` hjl dot tools at gmail dot com
2009-06-19 13:12 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).