| OLD | NEW |
| 1 /* Copyright (c) 2005-2011, Google Inc. | 1 /* Copyright (c) 2005-2011, Google Inc. |
| 2 * All rights reserved. | 2 * All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 */ | 2029 */ |
| 2030 long long res; | 2030 long long res; |
| 2031 __asm__ __volatile__("call 2f\n" | 2031 __asm__ __volatile__("call 2f\n" |
| 2032 "0:.align 16\n" | 2032 "0:.align 16\n" |
| 2033 "1:movq %1,%%rax\n" | 2033 "1:movq %1,%%rax\n" |
| 2034 LSS_ENTRYPOINT | 2034 LSS_ENTRYPOINT |
| 2035 "2:popq %0\n" | 2035 "2:popq %0\n" |
| 2036 "addq $(1b-0b),%0\n" | 2036 "addq $(1b-0b),%0\n" |
| 2037 : "=a" (res) | 2037 : "=a" (res) |
| 2038 : "i" (__NR_rt_sigreturn)); | 2038 : "i" (__NR_rt_sigreturn)); |
| 2039 return (void (*)())(uintptr_t)res; | 2039 return (void (*)(void))(uintptr_t)res; |
| 2040 } | 2040 } |
| 2041 #elif defined(__ARM_ARCH_3__) | 2041 #elif defined(__ARM_ARCH_3__) |
| 2042 /* Most definitions of _syscallX() neglect to mark "memory" as being | 2042 /* Most definitions of _syscallX() neglect to mark "memory" as being |
| 2043 * clobbered. This causes problems with compilers, that do a better job | 2043 * clobbered. This causes problems with compilers, that do a better job |
| 2044 * at optimizing across __asm__ calls. | 2044 * at optimizing across __asm__ calls. |
| 2045 * So, we just have to redefine all of the _syscallX() macros. | 2045 * So, we just have to redefine all of the _syscallX() macros. |
| 2046 */ | 2046 */ |
| 2047 #undef LSS_REG | 2047 #undef LSS_REG |
| 2048 #define LSS_REG(r,a) register long __r##r __asm__("r"#r) = (long)a | 2048 #define LSS_REG(r,a) register long __r##r __asm__("r"#r) = (long)a |
| 2049 #undef LSS_BODY | 2049 #undef LSS_BODY |
| (...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3663 # pragma pop_macro("fstat64") | 3663 # pragma pop_macro("fstat64") |
| 3664 # pragma pop_macro("lstat64") | 3664 # pragma pop_macro("lstat64") |
| 3665 #endif | 3665 #endif |
| 3666 | 3666 |
| 3667 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS) | 3667 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS) |
| 3668 } | 3668 } |
| 3669 #endif | 3669 #endif |
| 3670 | 3670 |
| 3671 #endif | 3671 #endif |
| 3672 #endif | 3672 #endif |
| OLD | NEW |