From 6eb77a71931894a259e8ac4f926ecfe0cf7df610 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 28 Aug 2022 18:01:51 -0700 Subject: [PATCH] add SH4 to architecture enum --- src/FunctionCompiler.cc | 2 +- src/FunctionCompiler.hh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/FunctionCompiler.cc b/src/FunctionCompiler.cc index 525c3bdf..a1c5f2a4 100644 --- a/src/FunctionCompiler.cc +++ b/src/FunctionCompiler.cc @@ -87,7 +87,7 @@ string CompiledFunctionCode::generate_client_command( if (this->arch == Architecture::POWERPC) { return this->generate_client_command_t( label_writes, suffix); - } else if (this->arch == Architecture::X86) { + } else if ((this->arch == Architecture::X86) || (this->arch == Architecture::SH4)) { return this->generate_client_command_t( label_writes, suffix); } else { diff --git a/src/FunctionCompiler.hh b/src/FunctionCompiler.hh index 63361c5b..71ea9057 100644 --- a/src/FunctionCompiler.hh +++ b/src/FunctionCompiler.hh @@ -16,13 +16,14 @@ bool function_compiler_available(); -// TODO: Support x86 function calls in the future. Currently we only support -// PPC32 because I haven't written an appropriate x86 assembler yet. +// TODO: Support x86 and SH4 function calls in the future. Currently we only +// support PPC32 because I haven't written an appropriate x86 assembler yet. struct CompiledFunctionCode { enum class Architecture { - POWERPC = 0, - X86, + POWERPC = 0, // GC + X86, // PC, XB, BB + SH4, // Dreamcast }; Architecture arch; std::string code;