From e2da306eee8b1fd581ec124aebab153889460144 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Fri, 31 May 2024 10:45:28 +0200 Subject: [PATCH] fixes semihosting cb registration --- gen_input/templates/llvm/CORENAME.cpp.gtl | 4 ++-- src/vm/llvm/vm_tgc5c.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gen_input/templates/llvm/CORENAME.cpp.gtl b/gen_input/templates/llvm/CORENAME.cpp.gtl index 1b13101..9bbd147 100644 --- a/gen_input/templates/llvm/CORENAME.cpp.gtl +++ b/gen_input/templates/llvm/CORENAME.cpp.gtl @@ -373,7 +373,7 @@ volatile std::array dummy = { auto vm = new llvm::${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*, arch::traits::reg_t*)>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}}; @@ -383,7 +383,7 @@ volatile std::array dummy = { auto vm = new llvm::${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*, arch::traits::reg_t*)>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}}; diff --git a/src/vm/llvm/vm_tgc5c.cpp b/src/vm/llvm/vm_tgc5c.cpp index 1212037..aa4d9a0 100644 --- a/src/vm/llvm/vm_tgc5c.cpp +++ b/src/vm/llvm/vm_tgc5c.cpp @@ -4722,7 +4722,7 @@ volatile std::array dummy = { auto vm = new llvm::tgc5c::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*, arch::traits::reg_t*)>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}}; @@ -4732,7 +4732,7 @@ volatile std::array dummy = { auto vm = new llvm::tgc5c::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*, arch::traits::reg_t*)>*>(init_data); cpu->set_semihosting_callback(*cb); } return {cpu_ptr{cpu}, vm_ptr{vm}};