| 1 |
/* |
| 2 |
* libhugetlbfs - Easy use of Linux hugepages |
| 3 |
* Copyright (C) 2007 David Gibson, IBM Corporation. |
| 4 |
* |
| 5 |
* Based on code from the GNU C Library, Copyright Free Software Foundation, Inc. |
| 6 |
* |
| 7 |
* This library is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU Lesser General Public License |
| 9 |
* as published by the Free Software Foundation; either version 2.1 of |
| 10 |
* the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This library is distributed in the hope that it will be useful, but |
| 13 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
* Lesser General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU Lesser General Public |
| 18 |
* License along with this library; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 |
*/ |
| 21 |
|
| 22 |
.text |
| 23 |
|
| 24 |
.globl direct_syscall |
| 25 |
direct_syscall: |
| 26 |
push %ebp |
| 27 |
push %edi |
| 28 |
push %esi |
| 29 |
push %ebx |
| 30 |
mov 0x2c(%esp),%ebp |
| 31 |
mov 0x28(%esp),%edi |
| 32 |
mov 0x24(%esp),%esi |
| 33 |
mov 0x20(%esp),%edx |
| 34 |
mov 0x1c(%esp),%ecx |
| 35 |
mov 0x18(%esp),%ebx |
| 36 |
mov 0x14(%esp),%eax |
| 37 |
int $0x80 |
| 38 |
pop %ebx |
| 39 |
pop %esi |
| 40 |
pop %edi |
| 41 |
pop %ebp |
| 42 |
ret |
| 43 |
|
| 44 |
#if defined(__linux__) && defined(__ELF__) |
| 45 |
.section .note.GNU-stack,"",%progbits |
| 46 |
#endif |