From f61b4bdcbd12f5389a26e9f3567b395ea253829e Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 12 Sep 2022 22:28:24 +0300 Subject: [PATCH] sv_binutils: support multiple opcodes; minor fixes --- src/openpower/sv/sv_binutils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index d34fb099..6ace71b2 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -391,11 +391,15 @@ class Opcode(Struct): mask: Mask -class Opcodes(Object, c_typedef="const uint64_t *"): +class Opcodes(Object, c_typedef="const struct svp64_opcode *"): def __init__(self, offset): self.__offset = offset return super().__init__() + @classmethod + def c_var(cls, name, prefix="", suffix=""): + return f"{prefix}{cls.c_typedef}{name}{suffix}" + @classmethod def c_decl(cls): yield "const struct svp64_opcode *opcodes;" -- 2.30.2