https://bugs.kde.org/show_bug.cgi?id=359289

            Bug ID: 359289
           Summary: s390x: popcnt (B9E1) not implemented
           Product: valgrind
           Version: unspecified
          Platform: Other
               URL: https://bugzilla.redhat.com/show_bug.cgi?id=1306844
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: vex
          Assignee: jsew...@acm.org
          Reporter: m...@redhat.com

guest_s390_toIR.c has:
   case 0xb9e1: /* POPCNT */ goto unimplemented;

And indeed:

$ cat popcnt.c
int main (int argc, const char **argv)
{
  return __builtin_popcountl ((long)argc);
}
$ gcc --version
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
$ gcc popcnt.c
$ valgrind ./a.out
vex s390->IR: unimplemented insn: B9E1 0011
==2443== valgrind: Unrecognised instruction at address 0x80000564.
==2443==    at 0x80000564: main (in /home/mwielaar/a.out)
==2443== Your program just tried to execute an instruction that Valgrind
==2443== did not recognise.  There are two possible reasons for this.
==2443== 1. Your program has a bug and erroneously jumped to a non-code
==2443==    location.  If you are running Memcheck and you just saw a
==2443==    warning about a bad jump, it's probably your program's fault.
==2443== 2. The instruction is legitimate but Valgrind doesn't handle it,
==2443==    i.e. it's Valgrind's fault.  If you think this is the case or
==2443==    you are not sure, please let us know and we'll try to fix it.
==2443== Either way, Valgrind will now raise a SIGILL signal which will
==2443== probably kill your program.
==2443== 
==2443== Process terminating with default action of signal 4 (SIGILL)
==2443==  Illegal opcode at address 0x80000564
==2443==    at 0x80000564: main (in /home/mwielaar/a.out)

Dump of assembler code for function main:
   0x0000000080000540 <+0>:    stmg    %r11,%r15,88(%r15)
   0x0000000080000546 <+6>:    lay    %r15,-176(%r15)
   0x000000008000054c <+12>:    lgr    %r11,%r15
   0x0000000080000550 <+16>:    lgr    %r1,%r2
   0x0000000080000554 <+20>:    stg    %r3,160(%r11)
   0x000000008000055a <+26>:    st    %r1,172(%r11)
   0x000000008000055e <+30>:    lgf    %r1,172(%r11)
=> 0x0000000080000564 <+36>:    popcnt    %r1,%r1
   0x0000000080000568 <+40>:    sllg    %r2,%r1,32
   0x000000008000056e <+46>:    agr    %r1,%r2
   0x0000000080000572 <+50>:    sllg    %r2,%r1,16
   0x0000000080000578 <+56>:    agr    %r1,%r2
   0x000000008000057c <+60>:    sllg    %r2,%r1,8
   0x0000000080000582 <+66>:    agr    %r1,%r2
   0x0000000080000586 <+70>:    srlg    %r1,%r1,56
   0x000000008000058c <+76>:    lgfr    %r1,%r1
   0x0000000080000590 <+80>:    lgr    %r2,%r1
   0x0000000080000594 <+84>:    lg    %r4,288(%r11)
   0x000000008000059a <+90>:    lmg    %r11,%r15,264(%r11)
   0x00000000800005a0 <+96>:    br    %r4
End of assembler dump.


Reproducible: Always

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to