diff --git a/target-sh4/helper.h b/target-sh4/helper.h new file mode 100644 index 0000000000000000000000000000000000000000..60addabeb787b97010b1b90395e1b1cb249fc6d3 --- /dev/null +++ b/target-sh4/helper.h @@ -0,0 +1,4 @@ +#ifndef DEF_HELPER +#define DEF_HELPER(ret, name, params) ret name params; +#endif + diff --git a/target-sh4/translate.c b/target-sh4/translate.c index 4fef2d82ecb5ac9fb661e23819e7ab5854b4e363..c00f6574936c7315191326bdbc17b9d6a34667aa 100644 --- a/target-sh4/translate.c +++ b/target-sh4/translate.c @@ -31,6 +31,7 @@ #include "cpu.h" #include "exec-all.h" #include "disas.h" +#include "helper.h" #include "tcg-op.h" #include "qemu-common.h" @@ -68,6 +69,12 @@ static void sh4_translate_init(void) cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env"); cpu_T[0] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG1, "T0"); cpu_T[1] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG2, "T1"); + + /* register helpers */ +#undef DEF_HELPER +#define DEF_HELPER(ret, name, params) tcg_register_helper(name, #name); +#include "helper.h" + done_init = 1; }