qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v1 13/13] target-ppc: introduce opc4 for Expanded


From: Nikunj A Dadhania
Subject: Re: [Qemu-devel] [RFC v1 13/13] target-ppc: introduce opc4 for Expanded Opcode
Date: Fri, 22 Jul 2016 15:30:31 +0530
User-agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu)

Bharata B Rao <address@hidden> writes:

> On Mon, Jul 18, 2016 at 10:35 PM, Nikunj A Dadhania
> <address@hidden> wrote:
>> ISA 3.0 has introduced EO - Expanded Opcode. Introduce third level
>> indirect opcode table and corresponding parsing routines.
>>
>> EO (11:12) Expanded opcode field
>> Formats: XX1
>>
>> EO (11:15) Expanded opcode field
>> Formats: VX, X, XX2
>>
>> Signed-off-by: Nikunj A Dadhania <address@hidden>
>> ---
>> +static int register_trplind_insn (opc_handler_t **ppc_opcodes,
>> +                                  unsigned char idx1, unsigned char idx2,
>> +                                  unsigned char idx3, unsigned char idx4,
>> +                                  opc_handler_t *handler)
>> +{
>> +    opc_handler_t **table;
>> +
>> +    if (register_ind_in_table(ppc_opcodes, idx1, idx2, NULL) < 0) {
>> +        printf("*** ERROR: unable to join indirect table idx "
>> +               "[%02x-%02x]\n", idx1, idx2);
>> +        return -1;
>> +    }
>> +    table = ind_table(ppc_opcodes[idx1]);
>> +    if (register_ind_in_table(table, idx2, idx3, NULL) < 0) {
>> +        printf("*** ERROR: unable to join 2nd-level indirect table idx "
>> +               "[%02x-%02x-%02x]\n", idx1, idx2, idx3);
>> +        return -1;
>> +    }
>> +    table = ind_table(table[idx2]);
>> +    if (register_ind_in_table(table, idx3, idx4, handler) < 0) {
>> +        printf("*** ERROR: unable to insert opcode "
>> +               "[%02x-%02x-%02x-%02x]\n", idx1, idx2, idx3, idx4);
>> +        return -1;
>> +    }
>> +    return 0;
>> +}
>
> If you are adding a 3rd level opcode table, explicit freeing of the
> same from ppc_cpu_unrealizefn() is necessary right ?

Yes, you are right, will add in my next revision.

Regards,
Nikunj




reply via email to

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