https://bugs.kde.org/show_bug.cgi?id=498492
Bug ID: 498492 Summary: none/tests/amd64/lzcnt64 crashes on FreeBSD compiled with clang Classification: Developer tools Product: valgrind Version: unspecified Platform: FreeBSD Ports OS: FreeBSD Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: pjfl...@wanadoo.fr Target Milestone: --- 8 void do_lzcnt64 ( /*OUT*/UInt* flags, /*OUT*/ULong* res, ULong arg ) 9 { 10 ULong block[3] = { arg, 0ULL, 0ULL }; 11 __asm__ __volatile__( 12 "movabsq $0x5555555555555555, %%r11" "\n\t" 13 "lzcntq 0(%0), %%r11" "\n\t" 14 "movq %%r11, 8(%0)" "\n\t" 15 "pushfq" "\n\t" 16 "popq %%r11" "\n\t" 17 "movq %%r11, 16(%0)" "\n" 18 : : "r"(&block[0]) : "r11","cc","memory" 19 ); 20 *res = block[1]; 21 *flags = block[2] & 0x8d5; 22 } The 'pushfq' on line 15 corrupts the flags pointer causing a segfault. -- You are receiving this mail because: You are watching all bug changes.