| 1 |
/* |
| 2 |
* libhugetlbfs - Easy use of Linux hugepages |
| 3 |
* Copyright (C) 2012 ARM Ltd. |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public License |
| 7 |
* version 2.1 as published by the Free Software Foundation. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, but |
| 10 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 |
*/ |
| 18 |
|
| 19 |
.text |
| 20 |
|
| 21 |
.globl direct_syscall |
| 22 |
.type direct_syscall,%function |
| 23 |
direct_syscall: |
| 24 |
mov ip, sp |
| 25 |
stmfd sp!, {r4, r5, r6, r7} |
| 26 |
mov r7, r0 |
| 27 |
mov r0, r1 |
| 28 |
mov r1, r2 |
| 29 |
mov r2, r3 |
| 30 |
ldmfd ip, {r3, r4, r5, r6} |
| 31 |
swi 0x0 |
| 32 |
ldmfd sp!, {r4, r5, r6, r7} |
| 33 |
bx lr |
| 34 |
|
| 35 |
#if defined(__linux__) && defined(__ELF__) |
| 36 |
.section .note.GNU-stack,"",%progbits |
| 37 |
#endif |