On 07/14/2014 10:41 AM, Bastian Koppelmann wrote:
> +static void gen_compute_branch(DisasContext *ctx, uint32_t opc,
> +                   int r1, int r2 , int32_t constant , int32_t offset)
> +{
> +
> +    switch (opc) {

Watch whitespace, both vertical and horizontal here.

> +/* SB-format jumps */
> +    case OPC1_16_SB_J:
> +    case OPC1_32_B_J:
> +        gen_goto_tb(ctx, 0, ctx->pc + offset * 2);
> +        break;
> +    case OPC1_16_SB_CALL:
> +        gen_helper_1arg(call, ctx->next_pc);
> +        gen_goto_tb(ctx, 0, ctx->pc + sextract32(offset, 0, 8) * 2);

Drop the sextract, since we've already done that...

> +/* SB-format */
> +    case OPC1_16_SB_CALL:
> +    case OPC1_16_SB_J:
> +    case OPC1_16_SB_JNZ:
> +    case OPC1_16_SB_JZ:
> +        address = MASK_OP_SB_DISP8_SEXT(ctx->opcode);
> +        gen_compute_branch(ctx, op1, 0, 0, 0, address);

... here.


r~

Reply via email to