projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67eaadf
)
syscalls: introduce syscall arguments length
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Fri, 22 Sep 2023 18:30:22 +0000
(21:30 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Fri, 22 Sep 2023 18:30:22 +0000
(21:30 +0300)
src/openpower/syscalls/__init__.py
patch
|
blob
|
history
diff --git
a/src/openpower/syscalls/__init__.py
b/src/openpower/syscalls/__init__.py
index d89ecdb98a26c4e8c16d433306cbe4c014761547..bf86718d5c380fddc8636eea466619235dd82273 100644
(file)
--- 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)):