157c324a7SJerome Duval/* 2*f98f9bccSDavid Karoly * Copyright 2022 Haiku, Inc. All Rights Reserved. 3*f98f9bccSDavid Karoly * Distributed under the terms of the MIT License. 4*f98f9bccSDavid Karoly * 5*f98f9bccSDavid Karoly * Copyright 2001, Travis Geiselbrecht. All rights reserved. 6*f98f9bccSDavid Karoly * Distributed under the terms of the NewOS License. 757c324a7SJerome Duval */ 857c324a7SJerome Duval 9*f98f9bccSDavid Karoly#include <asm_defs.h> 10*f98f9bccSDavid Karoly#include <commpage_defs.h> 1157c324a7SJerome Duval 12*f98f9bccSDavid Karoly#define _SYSCALL(name, n) \ 13*f98f9bccSDavid Karoly .align 8; \ 14*f98f9bccSDavid Karoly FUNCTION(name): \ 15*f98f9bccSDavid Karoly svc n; \ 16*f98f9bccSDavid Karoly bx lr; \ 17*f98f9bccSDavid Karoly FUNCTION_END(name) 1857c324a7SJerome Duval 19*f98f9bccSDavid Karoly#define SYSCALL0(name, n) _SYSCALL(name, n) 20*f98f9bccSDavid Karoly#define SYSCALL1(name, n) _SYSCALL(name, n) 21*f98f9bccSDavid Karoly#define SYSCALL2(name, n) _SYSCALL(name, n) 22*f98f9bccSDavid Karoly#define SYSCALL3(name, n) _SYSCALL(name, n) 23*f98f9bccSDavid Karoly#define SYSCALL4(name, n) _SYSCALL(name, n) 24*f98f9bccSDavid Karoly#define SYSCALL5(name, n) _SYSCALL(name, n) 25*f98f9bccSDavid Karoly#define SYSCALL6(name, n) _SYSCALL(name, n) 26*f98f9bccSDavid Karoly#define SYSCALL7(name, n) _SYSCALL(name, n) 27*f98f9bccSDavid Karoly#define SYSCALL8(name, n) _SYSCALL(name, n) 28*f98f9bccSDavid Karoly#define SYSCALL9(name, n) _SYSCALL(name, n) 29*f98f9bccSDavid Karoly#define SYSCALL10(name, n) _SYSCALL(name, n) 30*f98f9bccSDavid Karoly#define SYSCALL11(name, n) _SYSCALL(name, n) 31*f98f9bccSDavid Karoly#define SYSCALL12(name, n) _SYSCALL(name, n) 32*f98f9bccSDavid Karoly#define SYSCALL13(name, n) _SYSCALL(name, n) 33*f98f9bccSDavid Karoly#define SYSCALL14(name, n) _SYSCALL(name, n) 34*f98f9bccSDavid Karoly#define SYSCALL15(name, n) _SYSCALL(name, n) 35*f98f9bccSDavid Karoly#define SYSCALL16(name, n) _SYSCALL(name, n) 36*f98f9bccSDavid Karoly#define SYSCALL17(name, n) _SYSCALL(name, n) 37*f98f9bccSDavid Karoly#define SYSCALL18(name, n) _SYSCALL(name, n) 38*f98f9bccSDavid Karoly#define SYSCALL19(name, n) _SYSCALL(name, n) 39*f98f9bccSDavid Karoly#define SYSCALL20(name, n) _SYSCALL(name, n) 40