[PATCH] Do not build libsanitizer also for powerpc*-*-linux*
Jakub Jelinek
jakub@redhat.com
Mon Jun 2 07:56:00 GMT 2014
On Mon, Jun 02, 2014 at 10:22:11AM +0400, Yury Gribov wrote:
> Looks like now function does not return anything for ARM case? I'd
> say we should replace this pc = ... with return like all other
> cases, the code is just asking for trouble.
But it should be
return (pc & ~(uptr)1) - 1;
right?
> --- libsanitizer/sanitizer_common/sanitizer_stacktrace.cc (revision 209878)
> +++ libsanitizer/sanitizer_common/sanitizer_stacktrace.cc (revision 209879)
> @@ -18,11 +18,13 @@
> namespace __sanitizer {
>
> uptr StackTrace::GetPreviousInstructionPc(uptr pc) {
> -#ifdef __arm__
> +#if defined(__arm__)
> // Cancel Thumb bit.
> pc = pc & (~1);
> -#endif
> -#if defined(__sparc__)
> +#elif defined(__powerpc__) || defined(__powerpc64__)
> + // PCs are always 4 byte aligned.
> + return pc - 4;
> +#elif defined(__sparc__)
> return pc - 8;
> #else
> return pc - 1;
Jakub
More information about the Gcc-patches
mailing list