forked from OSchip/llvm-project
[compiler-rt][lsan] Add backup AArch64 register for use_registers test
On Ubuntu Focal x13 is used by something in the process of calling sched_yield. Causing the test to fail depending on when the thread is stopped. Adding x14 works around this and the test passes consistently. Not switching to only x14 because that could make other platforms fail. With both we'll always find at least one and even if both values are present we'll only get one report. Reviewed By: oontvoo, vitalybuka Differential Revision: https://reviews.llvm.org/D110931
This commit is contained in:
parent
a67b1220f5
commit
f8f1bb7462
|
@ -37,9 +37,11 @@ extern "C" void *registers_thread_func(void *arg) {
|
|||
:
|
||||
: "r"(p));
|
||||
#elif defined(__aarch64__)
|
||||
// x9-10are used. x11-12 are probably used.
|
||||
// So we pick x13 to be safe.
|
||||
asm("mov x13, %0"
|
||||
// x9-10 are used. x11-12 are probably used.
|
||||
// So we pick x13 to be safe and x14 as a backup.
|
||||
// (x13 known to be used on Ubuntu Focal)
|
||||
asm("mov x13, %0\n"
|
||||
"mov x14, %0"
|
||||
:
|
||||
: "r"(p));
|
||||
#elif defined(__powerpc__)
|
||||
|
|
Loading…
Reference in New Issue