SYS.h (8269e7673cf033aba67dab8264fe719920c70f87) | SYS.h (f21777224411fee14b8aea6d8465bd6c2b318429) |
---|---|
1/*- 2 * Copyright (c) 2014 Andrew Turner 3 * Copyright (c) 2015 The FreeBSD Foundation 4 * 5 * This software was developed by Andrew Turner under 6 * sponsorship from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 30#include <sys/syscall.h> 31#include <machine/asm.h> 32 33#define _SYSCALL(name) \ 34 mov x8, SYS_ ## name; \ 35 svc 0 36 | 1/*- 2 * Copyright (c) 2014 Andrew Turner 3 * Copyright (c) 2015 The FreeBSD Foundation 4 * 5 * This software was developed by Andrew Turner under 6 * sponsorship from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 30#include <sys/syscall.h> 31#include <machine/asm.h> 32 33#define _SYSCALL(name) \ 34 mov x8, SYS_ ## name; \ 35 svc 0 36 |
37#ifndef _SYSCALL_BODY |
|
37/* 38 * Conditional jumps can only go up to one megabyte in either 39 * direction, and cerror can be located anywhere, so we have 40 * to jump around to use more capable unconditional branch 41 * instruction. 42 */ 43#define _SYSCALL_BODY(name) \ 44 _SYSCALL(name); \ 45 b.cs 1f; \ 46 ret; \ 471: b cerror | 38/* 39 * Conditional jumps can only go up to one megabyte in either 40 * direction, and cerror can be located anywhere, so we have 41 * to jump around to use more capable unconditional branch 42 * instruction. 43 */ 44#define _SYSCALL_BODY(name) \ 45 _SYSCALL(name); \ 46 b.cs 1f; \ 47 ret; \ 481: b cerror |
49#endif |
|
48 49#define PSEUDO(name) \ 50ENTRY(__sys_##name); \ 51 WEAK_REFERENCE(__sys_##name, _##name); \ 52 _SYSCALL_BODY(name); \ 53END(__sys_##name) 54 55#define RSYSCALL(name) \ 56ENTRY(__sys_##name); \ 57 WEAK_REFERENCE(__sys_##name, name); \ 58 WEAK_REFERENCE(__sys_##name, _##name); \ 59 _SYSCALL_BODY(name); \ 60END(__sys_##name) | 50 51#define PSEUDO(name) \ 52ENTRY(__sys_##name); \ 53 WEAK_REFERENCE(__sys_##name, _##name); \ 54 _SYSCALL_BODY(name); \ 55END(__sys_##name) 56 57#define RSYSCALL(name) \ 58ENTRY(__sys_##name); \ 59 WEAK_REFERENCE(__sys_##name, name); \ 60 WEAK_REFERENCE(__sys_##name, _##name); \ 61 _SYSCALL_BODY(name); \ 62END(__sys_##name) |