[Bug target/78095] [7 Regression] valgrind build error on ppc64le

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 24 20:02:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78095

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
         Resolution|INVALID                     |---

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Well, other places are also affected:

coregrind/m_debuglog.c

 198 static UInt local_sys_write_stderr ( const HChar* buf, Int n )             
 199 {                                                                          
 200    volatile Long block[2];                                                 
 201    block[0] = (Long)buf;                                                   
 202    block[1] = (Long)n;                                                     
 203    __asm__ volatile (                                                      
 204       "addi 1,1,-256\n\t"                                                  
 205       "mr   5,%0\n\t"     /* r5 = &block[0] */                             
 206       "std  5,0(1)\n\t"   /* stash on stack */                             
 207       "li   0,"VG_STRINGIFY(__NR_write)"\n\t" /* %r0 = __NR_write */       
 208       "li   3,2\n\t"      /* set %r3 = stderr */                           
 209       "ld   4,0(5)\n\t"   /* set %r4 = buf */                              
 210       "ld   5,8(5)\n\t"   /* set %r5 = n */                                
 211       "sc\n\t"            /* write(stderr, buf, n) */                      
 212       "ld   5,0(1)\n\t"                                                    
 213       "addi 1,1,256\n\t"                                                   
 214       "std  3,0(5)\n"     /* block[0] = result */                          
 215       :                                                                    
 216       : "b" (block)                                                        
 217       : "cc","memory","cr0","ctr",                                         
 218         "r0","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"     
 219    );                                                                      
 220    if (block[0] < 0)                                                       
 221       block[0] = -1;                                                       
 222    return (UInt)(Int)block[0];                                             
 223 }                                                                          
 224                                                                            
 225 static UInt local_sys_getpid ( void )                                      
 226 {                                                                          
 227    register ULong __res __asm__ ("r3");                                    
 228    __asm__ volatile (                                                      
 229       "li 0, %1\n\t"                                                       
 230       "sc"                                                                 
 231       : "=&r" (__res)                                                      
 232       : "i" (__NR_getpid)                                                  
 233       : "cc","memory","cr0","ctr",                                         
 234         "r0","r2","r4","r5","r6","r7","r8","r9","r10","r11","r12"          
 235    );                                                                      
 236    return (UInt)__res;                                                     
 237 }


More information about the Gcc-bugs mailing list