[PATCH] D17802: [TSAN] Fix test java_race_pc for MIPS
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 05:02:44 PST 2016
dvyukov added a comment.
I see that StackTrace::GetPreviousInstructionPc special cases not just mips. Please duplicate what StackTrace::GetPreviousInstructionPc does, and comment that it must be in sync with StackTrace::GetPreviousInstructionPc. Also we never increase indentation level after #if (at least not in this file), so start "const int kPCInc" from the first column.
Here is what StackTrace::GetPreviousInstructionPc does:
#if defined(__powerpc__) || defined(__powerpc64__)
// PCs are always 4 byte aligned.
return pc - 4;
#elif defined(__sparc__) || defined(__mips__)
return pc - 8;
#else
return pc - 1;
#endif
Repository:
rL LLVM
http://reviews.llvm.org/D17802
More information about the llvm-commits
mailing list