Commit 7dd9e556e396a6c12a1d31e53ba98a2a90c4e73d

Authored by ths
1 parent 29ddf27b

Register helper functions.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4700 c046a42c-6fe2-441c-8c8c-71466251a162
target-mips/helper.h
1   -void do_raise_exception_err(int excp, int err);
2   -void do_raise_exception(int excp);
3   -void do_interrupt_restart (void);
  1 +#ifndef DEF_HELPER
  2 +#define DEF_HELPER(ret, name, params) ret name params;
  3 +#endif
4 4  
5   -void do_clo (void);
6   -void do_clz (void);
7   -void do_dclo (void);
8   -void do_dclz (void);
  5 +DEF_HELPER(void, do_raise_exception_err, (int excp, int err))
  6 +DEF_HELPER(void, do_raise_exception, (int excp))
  7 +DEF_HELPER(void, do_interrupt_restart, (void))
  8 +
  9 +DEF_HELPER(void, do_clo, (void))
  10 +DEF_HELPER(void, do_clz, (void))
  11 +#ifdef TARGET_MIPS64
  12 +DEF_HELPER(void, do_dclo, (void))
  13 +DEF_HELPER(void, do_dclz, (void))
  14 +#endif
... ...
target-mips/translate.c
... ... @@ -7476,6 +7476,11 @@ static void mips_tcg_init(void)
7476 7476 cpu_T[1] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG2, "T1");
7477 7477 #endif
7478 7478  
  7479 + /* register helpers */
  7480 +#undef DEF_HELPER
  7481 +#define DEF_HELPER(ret, name, params) tcg_register_helper(name, #name);
  7482 +#include "helper.h"
  7483 +
7479 7484 inited = 1;
7480 7485 }
7481 7486  
... ...