intel/eu: Encode and decode native instruction opcodes from/to IR opcodes.
Change brw_inst_set_opcode() and brw_inst_opcode() to call brw_opcode_encode/decode() transparently in order to translate between hardware and IR opcodes, and update the EU compaction code in order to do the same as needed, so we can eventually drop the one-to-one correspondence between hardware and IR opcodes. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -74,7 +74,7 @@ clear_pad_bits(const struct gen_device_info *devinfo, brw_inst *inst)
|
||||
}
|
||||
|
||||
if (devinfo->gen == 8 && !devinfo->is_cherryview &&
|
||||
is_3src(devinfo, (opcode)brw_inst_opcode(devinfo, inst))) {
|
||||
is_3src(devinfo, brw_inst_opcode(devinfo, inst))) {
|
||||
brw_inst_set_bits(inst, 105, 105, 0);
|
||||
brw_inst_set_bits(inst, 84, 84, 0);
|
||||
brw_inst_set_bits(inst, 36, 35, 0);
|
||||
@@ -92,7 +92,7 @@ skip_bit(const struct gen_device_info *devinfo, brw_inst *src, int bit)
|
||||
if (bit == 29)
|
||||
return true;
|
||||
|
||||
if (is_3src(devinfo, (opcode)brw_inst_opcode(devinfo, src))) {
|
||||
if (is_3src(devinfo, brw_inst_opcode(devinfo, src))) {
|
||||
if (devinfo->gen >= 9 || devinfo->is_cherryview) {
|
||||
if (bit == 127)
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user