ahatanak added a comment. In https://reviews.llvm.org/D15075#631237, @myatsina wrote:
> In https://reviews.llvm.org/D15075#631207, @vitalybuka wrote: > > > These patches break asan tests: > > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/528/steps/check-asan%20in%20gcc%20build/logs/stdio > > > Vitaly , > > This patch is a gcc compatibility issue and it changes clang to output an > error in case of illegal inline assembly syntax related to clobber list. > > Commit r290540 changed an asan test (asan_asm_test.cc) that used the illegal > syntax and fixed it. > The commit removed from the extended inline assembly clobber list registers > that also appeared in the input list. > GCC fails as well on the original inline assembly that appeared in this > test, so the fix is correct. > I don't understand why this change has effect the logic of the test - can > you help? > > Thanks, > Marina I believe asm_rep_movs needs something in the output operand list that tells the compiler the inline-asm statement changes the contents of the registers ("S", "D" and "c"). Otherwise, the compiler (register allocator) will not save the old value of dst_good and src_good so that it can be used later in the static_assert: asm_rep_movs(dst_good, src_good, 4); ASSERT_EQ(static_cast<T>(0x0), dst_good[0]); // "D" register was incremented 4 times. Repository: rL LLVM https://reviews.llvm.org/D15075 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits