|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 05/17] x86emul: add XOP decoding
>>> On 14.09.16 at 18:11, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 08/09/16 14:11, Jan Beulich wrote:
>> @@ -1580,6 +1586,9 @@ struct x86_emulate_state {
>> ext_0f = vex_0f,
>> ext_0f38 = vex_0f38,
>> ext_0f3a = vex_0f3a,
>> + ext_8f08 = 8,
>> + ext_8f09,
>> + ext_8f0a,
>
> What is this = 8 for? I presume you didn't slip it in accidentally, but
> I still can't figure out why.
So I can use the value directly from vex.opcx, without further
adjustment.
>> @@ -1848,18 +1857,30 @@ x86_decode(
>> rex_prefix |= REX_R;
>>
>> b = insn_fetch_type(uint8_t);
>> - switch ( ext = vex.opcx )
>> + ext = vex.opcx;
>> + if ( b != 0x8f )
>> + {
>> + switch ( ext )
>> + {
>> + case vex_0f:
>> + d = twobyte_table[b];
>> + break;
>> + case vex_0f38:
>> + d = twobyte_table[0x38];
>> + break;
>> + case vex_0f3a:
>> + d = twobyte_table[0x3a];
>> + break;
>> + default:
>> + rc = X86EMUL_UNHANDLEABLE;
>> + goto done;
>> + }
>> + }
>> + else if ( ext < ext_8f08 +
>> + sizeof(xop_table) / sizeof(*xop_table) )
>
> ARRAY_SIZE() ?
If we want to add another helper #define to the test code, yes. It
being a single instance, that addition didn't seem worth it to me.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |