From: Dmitry Selyutin Date: Mon, 12 Sep 2022 19:28:24 +0000 (+0300) Subject: sv_binutils: support multiple opcodes; minor fixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f61b4bdcbd12f5389a26e9f3567b395ea253829e;p=openpower-isa.git sv_binutils: support multiple opcodes; minor fixes --- 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;"