[Mesa-dev] [PATCH 02/10] i965: Disassemble vector float immediates properly.

Matt Turner mattst88 at gmail.com
Fri Oct 24 10:01:21 PDT 2014


On Fri, Oct 24, 2014 at 1:27 AM, Francisco Jerez <currojerez at riseup.net> wrote:
> Francisco Jerez <currojerez at riseup.net> writes:
>
>> Matt Turner <mattst88 at gmail.com> writes:
>>
>>> ---
>>>  src/mesa/drivers/dri/i965/brw_disasm.c | 7 ++++++-
>>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
>>> index 53ec767..6f5290e 100644
>>> --- a/src/mesa/drivers/dri/i965/brw_disasm.c
>>> +++ b/src/mesa/drivers/dri/i965/brw_disasm.c
>>> @@ -31,6 +31,7 @@
>>>  #include "brw_defines.h"
>>>  #include "brw_reg.h"
>>>  #include "brw_inst.h"
>>> +#include "brw_packed_float.h"
>>>
>>>  const struct opcode_desc opcode_descs[128] = {
>>>     [BRW_OPCODE_MOV]      = { .name = "mov",     .nsrc = 1, .ndst = 1 },
>>> @@ -1009,7 +1010,11 @@ imm(FILE *file, struct brw_context *brw, unsigned type, brw_inst *inst)
>>>        format(file, "0x%08xUV", brw_inst_imm_ud(brw, inst));
>>>        break;
>>>     case BRW_HW_REG_IMM_TYPE_VF:
>>> -      format(file, "Vector Float");
>>> +      format (file, "[%.7f, %.7f, %.7f, %.7f]VF",
>>
> Oh, and wouldn't it make sense to use the same specifier we use for
> float arguments "%-gF" so we get a consistent formatting in the
> disassembly?

Yes, I like that better. Thanks!

(The space after the function name shows how long ago I wrote this code :)


More information about the mesa-dev mailing list