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=b2bbeec1bad4f579436f7edbb7e1a56dd5d875ff;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)):