> +CPUOPENRISCState *cpu_openrisc_init(const char *cpu_model) > +{ > + CPUOPENRISCState *env; > + static int tcg_inited; > + > + env = g_malloc0(sizeof(*env)); > + memset(env, 0, sizeof(*env)); ^^^^^^ No need to memset env to zero, since g_malloc0 already did it for you.
> diff --git a/target-openrisc/helper.h b/target-openrisc/helper.h > new file mode 100644 > index 0000000..103d9b4 > --- /dev/null > +++ b/target-openrisc/helper.h [snip] > +#include "def-helper.h" > + > +#include "def-helper.h" I suppose you only need to #include "def-helper.h" once? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj