1 /* -*-comment-start: "//";comment-end:""-*-
2 * GNU Mes --- Maxwell Equations of Software
3 * Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5 * This file is part of GNU Mes.
7 * GNU Mes is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or (at
10 * your option) any later version.
12 * GNU Mes 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
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
22 #include <linux/x86_64/syscall.h>
24 // HMM, merge this with x86-mes-gcc/mes.c, doing something like
32 _sys_call (long sys_call)
54 _sys_call1 (long sys_call, long one)
63 : "rm" (sys_call), "rm" (one)
77 _sys_call2 (long sys_call, long one, long two)
87 : "rm" (sys_call), "rm" (one), "rm" (two)
101 _sys_call3 (long sys_call, long one, long two, long three)
112 : "rm" (sys_call), "rm" (one), "rm" (two), "rm" (three)
113 : "rax", "rdi", "rsi", "rdx"
126 _sys_call4 (long sys_call, long one, long two, long three, long four)
138 : "rm" (sys_call), "rm" (one), "rm" (two), "rm" (three), "rm" (four)
139 : "rax", "rdi", "rsi", "rdx", "rcx"