[PATCH] D12709: [PATCH] [sanitizers] [msan] Enable MSAN for aarch64
Renato Golin via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 05:57:39 PDT 2015
rengolin added a comment.
In http://reviews.llvm.org/D12709#242337, @zatrazz wrote:
> In this case the variable will not be used for attribution , but instead to catch the value of 'x8'. My understanding is clang should not mark the variable as unused if it is used as a named register variable, otherwise it will not be able to catch registers values as is in function calling.
This is a lost battle, let's not go there.
> Another option that came to my mind is to use an volatile inline assembly to explicit get the register value:
Yup, that's what I was referring to.
> uptr r8;
> asm volatile("mov %0,x8" : "=r" (r8));
> sret = reinterpret_cast<__sanitizer_mallinfo*>(r8);
You can use named registers here:
register uptr x8 asm("x8");
asm volatile("mov %0, %1\n" : "=r" (sret), "r" (x8));
http://reviews.llvm.org/D12709
More information about the llvm-commits
mailing list