Attached patch adds support for riscv64 and loongarch64
riscv64 tested on cfarm92.cfarm.net
I can't access loongarch64 machines on cfarm atm, but I tested
the epoll_* (but not sendfile+readahead) syscalls on another
machine a while ago.
>From 8d70578ff79b4754abaf456f71fe23a44b8335b4 Mon Sep 17 00:00:00 2001
From: Eric Wong
Date: Wed, 10 Jan 2024 19:28:48 +
Subject: [PATCH] add loongarch64 and riscv64 support
riscv64 tested on cfarm92.cfarm.net
I can't access cfarm40[01] right now, but I tested the epoll_*
syscall numbers a while ago for another project (not readahead
nor sendfile).
Thanks to gcc compiler farm (cfarm.net) for ssh access.
---
lib/Sys/Syscall.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Sys/Syscall.pm b/lib/Sys/Syscall.pm
index a0a9b20..92c1024 100644
--- a/lib/Sys/Syscall.pm
+++ b/lib/Sys/Syscall.pm
@@ -126,7 +126,7 @@ if ($^O eq "linux") {
$SYS_epoll_wait = 409;
$SYS_readahead= 379;
$u64_mod_8= 1;
-} elsif ($machine eq "aarch64") {
+} elsif ($machine =~ /\A(?:loong|a)arch64\z/ || $machine eq 'riscv64') {
$SYS_epoll_create = 20; # (sys_epoll_create1)
$SYS_epoll_ctl= 21;
$SYS_epoll_wait = 22; # (sys_epoll_pwait)