On 30/04/2019 17:36, Richard Henderson wrote:

> On 4/28/19 7:38 AM, Mark Cave-Ayland wrote:
>> +#define GEN_VSX_HELPER_X3(name, op1, op2, inval, type)                      
>>   \
>> +static void gen_##name(DisasContext *ctx)                                   
>>   \
>> +{                                                                           
>>   \
>> +    TCGv_i32 opc;                                                           
>>   \
>> +    TCGv_ptr xt, xa, xb;                                                    
>>   \
>> +    if (unlikely(!ctx->vsx_enabled)) {                                      
>>   \
>> +        gen_exception(ctx, POWERPC_EXCP_VSXU);                              
>>   \
>> +        return;                                                             
>>   \
>> +    }                                                                       
>>   \
>> +    opc = tcg_const_i32(ctx->opcode);                                       
>>   \
>> +    xt = gen_vsr_ptr(xT(ctx->opcode));                                      
>>   \
>> +    xa = gen_vsr_ptr(xA(ctx->opcode));                                      
>>   \
>> +    xb = gen_vsr_ptr(xB(ctx->opcode));                                      
>>   \
> 
> Do you still need to pass opc?
> 
> Anyway, I guess this is still progress...
> Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

Right, it looks like VSX_CMP is the culprit here. Am I right in thinking that 
it's
best to remove the opc parameter from GEN_VSX_HELPER_X3 above, and then have a
separate gen and helper function for just the VSX_CMP instructions? Presumably 
this
reduces of the overhead at both translation and execution time for the 
instructions
that don't require it.


ATB,

Mark.

Reply via email to