2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-21 14:49:41 +00:00

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.
This commit is contained in:
Ben Pfaff
2009-11-06 10:25:50 -08:00
parent 7559c39668
commit cc56746aed

View File

@@ -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. */