From 54b12b13e946e0a436f4261cb5acc1d74491130a Mon Sep 17 00:00:00 2001 From: jaby Date: Sat, 28 Sep 2024 17:48:06 +0200 Subject: [PATCH] Fix generation of GLOBAL asm constructors --- include/PSX/System/IOPorts/spu_io.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/PSX/System/IOPorts/spu_io.hpp b/include/PSX/System/IOPorts/spu_io.hpp index 1b7638a7..4fea5d37 100644 --- a/include/PSX/System/IOPorts/spu_io.hpp +++ b/include/PSX/System/IOPorts/spu_io.hpp @@ -46,10 +46,13 @@ namespace JabyEngine { }; #pragma pack(pop) + // Required so GCC does not create guards for the ReverbON reference + #define __eon_declaration __new_declare_io_port(EchoIO, 0x1F801D98) + static auto& Voice = __new_declare_io_port_array(struct Voice, VoiceCount, 0x1F801C00); static auto& PMON = __new_declare_io_port(PitchModulationIO, 0x1F801D90); static auto& NON = __new_declare_io_port(NoiseIO, 0x1F801D94); - static auto& EON = __new_declare_io_port(EchoIO, 0x1F801D98); + static auto& EON = __eon_declaration; static auto& SRAMTransferAdr = __new_declare_io_port(SRAMAdrIO, 0x1F801DA6); static auto& ControlRegister = __new_declare_io_port(ControlRegisterIO, 0x1F801DAA); static auto& DataTransferControl = __new_declare_io_port(DataTransferControlIO, 0x1F801DAC); @@ -81,7 +84,7 @@ namespace JabyEngine { static inline auto& Left = __new_declare_io_port(SimpleVolumeIO, 0x1F801D84); static inline auto& Right = __new_declare_io_port(SimpleVolumeIO, 0x1F801D86); }; - static inline auto& On = EON; + static inline auto& On = __eon_declaration; static inline auto& WorkAreaAdr = __new_declare_io_port(SRAMAdrIO, 0x1F801DA2); }; }