[ovs-dev] [PATCH 2/3] backtrace: Avoid GCC warning on x86-64.
Justin Pettit
jpettit at nicira.com
Sat Nov 7 00:26:08 UTC 2009
...for...
On Nov 6, 2009, at 10:50 AM, Ben Pfaff wrote:
> 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 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/lib/backtrace.c b/lib/backtrace.c
> index 42ab8c4..2f47809 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. */
> --
> 1.6.3.3
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list