qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 10/15] target-tricore: Add instructions of SB


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 10/15] target-tricore: Add instructions of SB opcode format
Date: Tue, 15 Jul 2014 08:31:50 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

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

[Prev in Thread] Current Thread [Next in Thread]