From cc56746aed6d53046b17b01756362e566734241c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 6 Nov 2009 10:25:50 -0800 Subject: [PATCH] backtrace: Avoid GCC warning on x86-64. The portable implementation of stack_low(), which before this commit is used on x86-64, provokes a warning from GCC that cannot be disabled. We already have an i386-specific implementation that does not warn; this commit adds a corresponding implementation for x86-64 to avoid the warning there too. --- lib/backtrace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/backtrace.c b/lib/backtrace.c index 42ab8c48..2f478093 100644 --- a/lib/backtrace.c +++ b/lib/backtrace.c @@ -73,6 +73,10 @@ stack_low(void) uintptr_t low; asm("movl %%esp,%0" : "=g" (low)); return low; +#elif __x86_64__ + uintptr_t low; + asm("movq %%rsp,%0" : "=g" (low)); + return low; #else /* This causes a warning in GCC that cannot be disabled, so use it only on * non-x86. */ -- 2.30.2