Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: lss/linux_syscall_support.h

Issue 23072035: Fix restore_rt() getter's inline asm not to clobber the x86-64 red zone (Closed) Base URL: https://linux-syscall-support.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lss/linux_syscall_support.h
diff --git a/lss/linux_syscall_support.h b/lss/linux_syscall_support.h
index f2eaa3e1528cac85bce0a6544be0967330d54de3..26bfe2c1c7e47c9a7d4784ca08787b0e7da65b74 100644
--- a/lss/linux_syscall_support.h
+++ b/lss/linux_syscall_support.h
@@ -2028,13 +2028,12 @@ struct kernel_statfs {
* function, as glibc goes out of its way to make it inaccessible.
*/
long long res;
- __asm__ __volatile__("call 2f\n"
- "0:.align 16\n"
+ __asm__ __volatile__("jmp 2f\n"
+ ".align 16\n"
"1:movq %1,%%rax\n"
LSS_ENTRYPOINT
- "2:popq %0\n"
- "addq $(1b-0b),%0\n"
- : "=a" (res)
+ "2:leaq 1b(%%rip),%0\n"
+ : "=r" (res)
jln (very slow on Chromium) 2013/08/29 20:22:03 This should always have been =r, right?
Mark Seaborn 2013/08/31 00:01:58 Yes. Constraining this to rax was unnecessary.
: "i" (__NR_rt_sigreturn));
return (void (*)(void))(uintptr_t)res;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698