From 03d15dbd5047381640867a713e3526689b6ae821 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 9 Jan 2022 15:24:49 +0000 Subject: [PATCH] sv_binutils: print opcode as hexadecimal --- src/openpower/sv/sv_binutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 3bddd99b..f416d083 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -118,8 +118,8 @@ class Opcode(Field): def c_value(self, prefix="", suffix=""): yield f"{prefix}{{" yield from indent([ - f".value = {self.value},", - f".mask = {self.mask},", + f".value = UINT32_C(0x{self.value:08X}),", + f".mask = UINT32_C(0x{self.mask:08X}),", ]) yield f"}}{suffix}" -- 2.30.2