syscall: handle arm and aarch64 architectures
authorDmitry Selyutin <ghostmansd@gmail.com>
Mon, 23 Oct 2023 20:23:08 +0000 (23:23 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Mon, 23 Oct 2023 20:23:08 +0000 (23:23 +0300)
src/openpower/syscalls/__init__.py
src/openpower/syscalls/__main__.py

index 5b349ea9e00e646419a3e80e0867bc55967e17f5..a7676a20acf055f02b6055c1c1ae03c1a29a9d7f 100644 (file)
@@ -97,6 +97,12 @@ class Dispatcher:
             yield from sysnums["x86-64"]["common"].items()
             yield from sysnums["x86-64"]["64"].items()
 
+        def arm(sysnums):
+            yield from sysnums["arm"]["common"].items()
+
+        def aarch64(sysnums):
+            yield from sysnums["generic"]["arch64"].items()
+
         def ppc(sysnums):
             yield from sysnums["ppc"]["nospu"].items()
             yield from sysnums["ppc"]["common"].items()
@@ -116,6 +122,8 @@ class Dispatcher:
         arch = {
             "i386": i386,
             "amd64": amd64,
+            "arm": arm,
+            "aarch64": aarch64,
             "ppc": ppc,
             "ppc64": ppc64,
             "riscv32": riscv32,
index 3fadc90a0858b2a1cce44cf10498e601d5038941..7c6e2bdf49f536c573242918ca7481cb3b89de89 100644 (file)
@@ -265,7 +265,7 @@ def main():
         choices=("riscv64", "ppc", "ppc64"))
     ecall_parser.add_argument("host",
         help="amd64 architecture",
-        choices=("amd64",))
+        choices=("amd64", "arm", "aarch64"))
     ecall_parser.set_defaults(generate=ECallGenerator())
 
     arguments = dict(vars(main_parser.parse_args()))