From 482a4ec2537ab58cfd621b1ec0cb5e4b0863d41b Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Fri, 21 Jun 2024 13:35:25 +0200 Subject: [PATCH] fixes semihosting callbacks in templates --- gen_input/templates/asmjit/CORENAME.cpp.gtl | 4 ++-- gen_input/templates/tcc/CORENAME.cpp.gtl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gen_input/templates/asmjit/CORENAME.cpp.gtl b/gen_input/templates/asmjit/CORENAME.cpp.gtl index b671123..9192715 100644 --- a/gen_input/templates/asmjit/CORENAME.cpp.gtl +++ b/gen_input/templates/asmjit/CORENAME.cpp.gtl @@ -363,7 +363,7 @@ volatile std::array dummy = { auto vm = new asmjit::${coreDef.name.toLowerCase()}::vm_impl(*cpu, false); if (port != 0) debugger::server::run_server(vm, port); if(init_data){ - auto* cb = reinterpret_cast::reg_t, arch::traits::reg_t)>*>(init_data); + auto* cb = reinterpret_cast::reg_t>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}}; @@ -373,7 +373,7 @@ volatile std::array dummy = { auto vm = new asmjit::${coreDef.name.toLowerCase()}::vm_impl(*cpu, false); if (port != 0) debugger::server::run_server(vm, port); if(init_data){ - auto* cb = reinterpret_cast::reg_t, arch::traits::reg_t)>*>(init_data); + auto* cb = reinterpret_cast::reg_t>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}}; diff --git a/gen_input/templates/tcc/CORENAME.cpp.gtl b/gen_input/templates/tcc/CORENAME.cpp.gtl index f9ee677..73add3d 100644 --- a/gen_input/templates/tcc/CORENAME.cpp.gtl +++ b/gen_input/templates/tcc/CORENAME.cpp.gtl @@ -334,7 +334,7 @@ volatile std::array dummy = { auto vm = new tcc::${coreDef.name.toLowerCase()}::vm_impl(*cpu, false); if (port != 0) debugger::server::run_server(vm, port); if(init_data){ - auto* cb = reinterpret_cast::reg_t, arch::traits::reg_t)>*>(init_data); + auto* cb = reinterpret_cast::reg_t>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}}; @@ -344,7 +344,7 @@ volatile std::array dummy = { auto vm = new tcc::${coreDef.name.toLowerCase()}::vm_impl(*cpu, false); if (port != 0) debugger::server::run_server(vm, port); if(init_data){ - auto* cb = reinterpret_cast::reg_t, arch::traits::reg_t)>*>(init_data); + auto* cb = reinterpret_cast::reg_t>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}};