From: Dmitry Selyutin Date: Sun, 23 Jan 2022 10:33:27 +0000 (+0000) Subject: sv_binutils: output header guard X-Git-Tag: sv_maxu_works-initial~545 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=79b571e86767d830af8dd5243b95fd8854a670c6;p=openpower-isa.git sv_binutils: output header guard --- diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 0b733ca0..389e0e3c 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -246,6 +246,11 @@ class Codegen(_enum.Enum): yield "#include " yield "" + yield "#ifdef __cplusplus" + yield "extern \"C\" {" + yield "#endif" + yield "" + yield from Opcode.c_decl() yield "" @@ -265,6 +270,11 @@ class Codegen(_enum.Enum): yield "extern const unsigned int svp64_num_entries;" yield "" + yield "#ifdef __cplusplus" + yield "}" + yield "#endif" + yield "" + yield f"#endif /* {self.name} */" yield ""