From: Dmitry Selyutin Date: Fri, 22 Sep 2023 18:30:22 +0000 (+0300) Subject: syscalls: introduce syscall arguments length X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2017ec1008030a7d1f2d7a8a51ee1e505e71cdb6;p=openpower-isa.git syscalls: introduce syscall arguments length --- diff --git a/src/openpower/syscalls/__init__.py b/src/openpower/syscalls/__init__.py index d89ecdb9..bf86718d 100644 --- a/src/openpower/syscalls/__init__.py +++ b/src/openpower/syscalls/__init__.py @@ -33,11 +33,14 @@ class Syscall: def host(self): return self.__host + def __len__(self): + return len(self.__parameters) + def __repr__(self): return f"{self.__class__.__name__}({self.entry} {self.guest}=>{self.host})" def __call__(self, *arguments): - if len(arguments) != len(self.__parameters): + if len(arguments) < len(self): raise ValueError("conflict between arguments and parameters") for index in range(len(arguments)):