Commit 988d7eaa7ba97795a55cc5ebf884335afa53b607

Authored by aurel32
1 parent 6858571c

SH4: add support for TCG helpers

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5096 c046a42c-6fe2-441c-8c8c-71466251a162
target-sh4/helper.h 0 → 100644
  1 +#ifndef DEF_HELPER
  2 +#define DEF_HELPER(ret, name, params) ret name params;
  3 +#endif
  4 +
... ...
target-sh4/translate.c
... ... @@ -31,6 +31,7 @@
31 31 #include "cpu.h"
32 32 #include "exec-all.h"
33 33 #include "disas.h"
  34 +#include "helper.h"
34 35 #include "tcg-op.h"
35 36 #include "qemu-common.h"
36 37  
... ... @@ -68,6 +69,12 @@ static void sh4_translate_init(void)
68 69 cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env");
69 70 cpu_T[0] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG1, "T0");
70 71 cpu_T[1] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG2, "T1");
  72 +
  73 + /* register helpers */
  74 +#undef DEF_HELPER
  75 +#define DEF_HELPER(ret, name, params) tcg_register_helper(name, #name);
  76 +#include "helper.h"
  77 +
71 78 done_init = 1;
72 79 }
73 80  
... ...