qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first functi


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully
Date: Mon, 16 Mar 2015 08:31:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/13/2015 11:03 PM, Chen Gang wrote:
> +static void decode_rrr_1_opcode_y0(struct DisasContext *dc,
> +                                   tilegx_bundle_bits bundle)
> +{
> +    switch (get_RRROpcodeExtension_Y0(bundle)) {
> +    case UNARY_RRR_1_OPCODE_Y0:
> +        switch (get_UnaryOpcodeExtension_Y0(bundle)) {
> +        case  FNOP_UNARY_OPCODE_Y0:
> +            if (!get_SrcA_Y0(bundle) && !get_Dest_Y0(bundle)) {
> +                gen_fnop();
> +                return;
> +            }
> +            break;
> +        default:
> +            break;
> +        }
> +        break;
> +    default:
> +        break;
> +    }
> +
> +    qemu_log_mask(LOG_UNIMP, "UNIMP rrr_1_opcode_y0, %16.16llx\n", bundle);
> +    dc->exception = TILEGX_EXCP_OPCODE_UNIMPLEMENT;
> +}

I think it would be helpful if, in the first patch, you put all of the opcode
symbols into the proper place in the switch statements.  That way it's easy to
tell at a glance what has yet to be implemented.  For instance, for this
function you'd put

$ grep _UNARY opcode_tilegx.h  | grep _Y0
  CNTLZ_UNARY_OPCODE_Y0 = 1,
  CNTTZ_UNARY_OPCODE_Y0 = 2,
  FNOP_UNARY_OPCODE_Y0 = 3,
  FSINGLE_PACK1_UNARY_OPCODE_Y0 = 4,
  NOP_UNARY_OPCODE_Y0 = 5,
  PCNT_UNARY_OPCODE_Y0 = 6,
  REVBITS_UNARY_OPCODE_Y0 = 7,
  REVBYTES_UNARY_OPCODE_Y0 = 8,
  TBLIDXB0_UNARY_OPCODE_Y0 = 9,
  TBLIDXB1_UNARY_OPCODE_Y0 = 10,
  TBLIDXB2_UNARY_OPCODE_Y0 = 11,
  TBLIDXB3_UNARY_OPCODE_Y0 = 12,

in the get_UnaryOpcodeExtension_Y0 switch statement and

$ grep _RRR_1 opcode_tilegx.h  | grep _Y0
  SHL1ADD_RRR_1_OPCODE_Y0 = 0,
  SHL2ADD_RRR_1_OPCODE_Y0 = 1,
  SHL3ADD_RRR_1_OPCODE_Y0 = 2,
  UNARY_RRR_1_OPCODE_Y0 = 3,

in the get_RRROpcodeExtension_Y0 switch statement.

Likewise with all of the other "decode" functions that contain a switch.

> +    qemu_log("fnop\n");
> +    qemu_log("addi r%d, r%d, %d\n", rdst, rsrc, imm8);

Again, use qemu_log_mask(CPU_LOG_TB_IN_ASM).



r~



reply via email to

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