On 05/17/2011 03:32 PM, Max Filippov wrote:
> +DEF_HELPER_0(simcall, void)
>  DEF_HELPER_0(dump_state, void)
>  
>  #include "def-helper.h"
> diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c
> index 3a0fa01..b170dbe 100644
> --- a/target-xtensa/op_helper.c
> +++ b/target-xtensa/op_helper.c
> @@ -291,6 +291,11 @@ void HELPER(wsr_lend)(uint32_t v)
>      }
>  }
>  
> +void HELPER(simcall)(void)
> +{
> +    simcall(env);
> +}
> +

You can explicitly pass env as an argument to the helper
and avoid this wrapper function.  See e.g. the ARM port
and its many non-op_helper.c functions.


r~

Reply via email to