sv_binutils: fix enum name in C code
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 31 May 2022 16:16:03 +0000 (16:16 +0000)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 31 May 2022 16:16:03 +0000 (16:16 +0000)
src/openpower/sv/sv_binutils.py

index c0d200e93a433b6c7e960c77df90604881dd9703..8ed66490694847ca332b5043527a5945d6c3a37c 100644 (file)
@@ -198,7 +198,7 @@ class Constant(CType, _enum.Enum, metaclass=EnumMeta):
             yield f"#define {key} {value}"
 
     def c_value(self, *, prefix="", suffix="", **kwargs):
-        yield f"{prefix}{self.__class__.c_tag.upper()}_{self.name.upper()}{suffix}"
+        yield f"{prefix}{self.__class__.c_tag.upper()}_{self.c_name.upper()}{suffix}"
 
 
 Mode = Constant("Mode", _SVP64MODE)