/* This will be the case for almost all instructions. */
switch (dst.file) {
case VGRF:
- case HW_REG:
+ case ARF:
+ case FIXED_GRF:
case MRF:
case ATTR:
this->regs_written = DIV_ROUND_UP(dst.component_size(exec_size),
fs_reg::fs_reg(struct brw_reg reg) :
backend_reg(reg)
{
- this->file = HW_REG;
+ this->file = (enum register_file)reg.file;
this->reg_offset = 0;
this->subreg_offset = 0;
this->reladdr = NULL;
bool
fs_reg::equals(const fs_reg &r) const
{
- return (file == r.file &&
- nr == r.nr &&
+ return (memcmp((brw_reg *)this, (brw_reg *)&r, sizeof(brw_reg)) == 0 &&
reg_offset == r.reg_offset &&
subreg_offset == r.subreg_offset &&
- type == r.type &&
- negate == r.negate &&
- abs == r.abs &&
!reladdr && !r.reladdr &&
- (file != HW_REG ||
- memcmp((brw_reg *)this, (brw_reg *)&r, sizeof(brw_reg)) == 0) &&
- (file != IMM || d == r.d) &&
stride == r.stride);
}
fs_reg &
fs_reg::set_smear(unsigned subreg)
{
- assert(file != HW_REG && file != IMM);
+ assert(file != ARF && file != FIXED_GRF && file != IMM);
subreg_offset = subreg * type_sz(type);
stride = 0;
return *this;
unsigned
fs_reg::component_size(unsigned width) const
{
- const unsigned stride = (file != HW_REG ? this->stride :
+ const unsigned stride = ((file != ARF && file != FIXED_GRF) ? this->stride :
hstride == 0 ? 0 :
1 << (hstride - 1));
return MAX2(width * stride, 1) * type_sz(type);
case UNIFORM:
case IMM:
return 1;
+ case ARF:
+ case FIXED_GRF:
case VGRF:
case ATTR:
- case HW_REG:
return DIV_ROUND_UP(components_read(arg) *
src[arg].component_size(exec_size),
REG_SIZE);
*/
foreach_block_and_inst(block, fs_inst, inst, cfg) {
if (inst->opcode == FS_OPCODE_LINTERP) {
- assert(inst->src[1].file == HW_REG);
+ assert(inst->src[1].file == FIXED_GRF);
inst->src[1].nr += urb_start;
}
if (inst->opcode == FS_OPCODE_CINTERP) {
- assert(inst->src[0].file == HW_REG);
+ assert(inst->src[0].file == FIXED_GRF);
inst->src[0].nr += urb_start;
}
}
inst->base_mrf = -1;
}
- /* Rewrite all ATTR file references to HW_REGs. */
+ /* Rewrite all ATTR file references to GRFs. */
convert_attr_sources_to_hw_regs(inst);
}
}
assign_curb_setup();
/* Now that we have the uniform assigned, go ahead and force it to a vec4. */
- assert(mov->src[0].file == HW_REG);
+ assert(mov->src[0].file == FIXED_GRF);
mov->src[0] = brw_vec4_grf(mov->src[0].nr, 0);
}
/* Clear the flag for registers that actually got read (as expected). */
for (int i = 0; i < inst->sources; i++) {
int grf;
- if (inst->src[i].file == VGRF) {
- grf = inst->src[i].nr;
- } else if (inst->src[i].file == HW_REG &&
- inst->src[i].brw_reg::file == BRW_GENERAL_REGISTER_FILE) {
+ if (inst->src[i].file == VGRF || inst->src[i].file == FIXED_GRF) {
grf = inst->src[i].nr;
} else {
continue;
fprintf(file, "+%d.%d",
inst->dst.reg_offset, inst->dst.subreg_offset);
break;
+ case FIXED_GRF:
+ fprintf(file, "g%d", inst->dst.nr);
+ break;
case MRF:
fprintf(file, "m%d", inst->dst.nr);
break;
case ATTR:
fprintf(file, "***attr%d***", inst->dst.nr + inst->dst.reg_offset);
break;
- case HW_REG:
- if (inst->dst.brw_reg::file == BRW_ARCHITECTURE_REGISTER_FILE) {
- switch (inst->dst.nr) {
- case BRW_ARF_NULL:
- fprintf(file, "null");
- break;
- case BRW_ARF_ADDRESS:
- fprintf(file, "a0.%d", inst->dst.subnr);
- break;
- case BRW_ARF_ACCUMULATOR:
- fprintf(file, "acc%d", inst->dst.subnr);
- break;
- case BRW_ARF_FLAG:
- fprintf(file, "f%d.%d", inst->dst.nr & 0xf,
- inst->dst.subnr);
- break;
- default:
- fprintf(file, "arf%d.%d", inst->dst.nr & 0xf,
- inst->dst.subnr);
- break;
- }
- } else {
- fprintf(file, "hw_reg%d", inst->dst.nr);
+ case ARF:
+ switch (inst->dst.nr) {
+ case BRW_ARF_NULL:
+ fprintf(file, "null");
+ break;
+ case BRW_ARF_ADDRESS:
+ fprintf(file, "a0.%d", inst->dst.subnr);
+ break;
+ case BRW_ARF_ACCUMULATOR:
+ fprintf(file, "acc%d", inst->dst.subnr);
+ break;
+ case BRW_ARF_FLAG:
+ fprintf(file, "f%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
+ break;
+ default:
+ fprintf(file, "arf%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
+ break;
}
if (inst->dst.subnr)
fprintf(file, "+%d", inst->dst.subnr);
fprintf(file, "+%d.%d", inst->src[i].reg_offset,
inst->src[i].subreg_offset);
break;
+ case FIXED_GRF:
+ fprintf(file, "g%d", inst->src[i].nr);
+ break;
case MRF:
fprintf(file, "***m%d***", inst->src[i].nr);
break;
break;
}
break;
- case HW_REG:
- if (inst->src[i].brw_reg::file == BRW_ARCHITECTURE_REGISTER_FILE) {
- switch (inst->src[i].nr) {
- case BRW_ARF_NULL:
- fprintf(file, "null");
- break;
- case BRW_ARF_ADDRESS:
- fprintf(file, "a0.%d", inst->src[i].subnr);
- break;
- case BRW_ARF_ACCUMULATOR:
- fprintf(file, "acc%d", inst->src[i].subnr);
- break;
- case BRW_ARF_FLAG:
- fprintf(file, "f%d.%d", inst->src[i].nr & 0xf,
- inst->src[i].subnr);
- break;
- default:
- fprintf(file, "arf%d.%d", inst->src[i].nr & 0xf,
- inst->src[i].subnr);
- break;
- }
- } else {
- fprintf(file, "hw_reg%d", inst->src[i].nr);
+ case ARF:
+ switch (inst->src[i].nr) {
+ case BRW_ARF_NULL:
+ fprintf(file, "null");
+ break;
+ case BRW_ARF_ADDRESS:
+ fprintf(file, "a0.%d", inst->src[i].subnr);
+ break;
+ case BRW_ARF_ACCUMULATOR:
+ fprintf(file, "acc%d", inst->src[i].subnr);
+ break;
+ case BRW_ARF_FLAG:
+ fprintf(file, "f%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr);
+ break;
+ default:
+ fprintf(file, "arf%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr);
+ break;
}
if (inst->src[i].subnr)
fprintf(file, "+%d", inst->src[i].subnr);
switch (reg.file) {
case BAD_FILE:
break;
- case VGRF:
+ case ARF:
+ case FIXED_GRF:
case MRF:
- case HW_REG:
+ case VGRF:
case ATTR:
return byte_offset(reg,
delta * reg.component_size(bld.dispatch_width()));
switch (entry->src.file) {
case UNIFORM:
case BAD_FILE:
- case HW_REG:
+ case ARF:
+ case FIXED_GRF:
inst->src[arg].reg_offset = entry->src.reg_offset;
inst->src[arg].subreg_offset = entry->src.subreg_offset;
break;
foreach_inst_in_block(fs_inst, inst, block) {
/* Skip some cases. */
if (is_expression(this, inst) && !inst->is_partial_write() &&
- (inst->dst.file != HW_REG || inst->dst.is_null()))
+ ((inst->dst.file != ARF && inst->dst.file != FIXED_GRF) ||
+ inst->dst.is_null()))
{
bool found = false;
bool negate = false;
brw_file_from_reg(fs_reg *reg)
{
switch (reg->file) {
+ case ARF:
+ return BRW_ARCHITECTURE_REGISTER_FILE;
+ case FIXED_GRF:
case VGRF:
return BRW_GENERAL_REGISTER_FILE;
case MRF:
case IMM:
return BRW_IMMEDIATE_VALUE;
case BAD_FILE:
- case HW_REG:
case ATTR:
case UNIFORM:
unreachable("not reached");
unreachable("not reached");
}
break;
- case HW_REG:
+ case ARF:
+ case FIXED_GRF:
brw_reg = *static_cast<struct brw_reg *>(reg);
break;
case BAD_FILE:
else
use_ip = ip;
- /* Note that UNIFORM args have been turned into FIXED_HW_REG by
+ /* Note that UNIFORM args have been turned into FIXED_GRF by
* assign_curbe_setup(), and interpolation uses fixed hardware regs from
* the start (see interp_reg()).
*/
for (int i = 0; i < inst->sources; i++) {
- if (inst->src[i].file == HW_REG &&
- inst->src[i].brw_reg::file == BRW_GENERAL_REGISTER_FILE) {
+ if (inst->src[i].file == FIXED_GRF) {
int node_nr = inst->src[i].nr;
if (node_nr >= payload_node_count)
continue;
case MRF:
reg.nr += delta / 32;
break;
+ case ARF:
+ case FIXED_GRF:
case IMM:
- case HW_REG:
case UNIFORM:
assert(delta == 0);
}
case MRF:
case ATTR:
return byte_offset(reg, delta * reg.stride * type_sz(reg.type));
- case HW_REG:
+ case ARF:
+ case FIXED_GRF:
assert(delta == 0);
}
return reg;
case MRF:
return horiz_offset(reg, 8 * idx);
+ case ARF:
+ case FIXED_GRF:
case ATTR:
- case HW_REG:
unreachable("Cannot take half of this register type");
}
return reg;
static inline src_reg
offset(src_reg reg, unsigned delta)
{
- assert(delta == 0 || (reg.file != HW_REG && reg.file != IMM));
+ assert(delta == 0 ||
+ (reg.file != ARF && reg.file != FIXED_GRF && reg.file != IMM));
reg.reg_offset += delta;
return reg;
}
static inline dst_reg
offset(dst_reg reg, unsigned delta)
{
- assert(delta == 0 || (reg.file != HW_REG && reg.file != IMM));
+ assert(delta == 0 ||
+ (reg.file != ARF && reg.file != FIXED_GRF && reg.file != IMM));
reg.reg_offset += delta;
return reg;
}
if (inst->src[i].file == VGRF) {
reads_remaining[inst->src[i].nr]++;
- } else if (inst->src[i].file == HW_REG &&
- inst->src[i].brw_reg::file == BRW_GENERAL_REGISTER_FILE) {
+ } else if (inst->src[i].file == FIXED_GRF) {
if (inst->src[i].nr >= hw_reg_count)
continue;
if (inst->src[i].file == VGRF) {
reads_remaining[inst->src[i].nr]--;
- } else if (inst->src[i].file == HW_REG &&
- inst->src[i].brw_reg::file == BRW_GENERAL_REGISTER_FILE &&
+ } else if (inst->src[i].file == FIXED_GRF &&
inst->src[i].nr < hw_reg_count) {
for (int off = 0; off < inst->regs_read(i); off++)
hw_reads_remaining[inst->src[i].nr + off]--;
reads_remaining[inst->src[i].nr] == 1)
benefit += v->alloc.sizes[inst->src[i].nr];
- if (inst->src[i].file == HW_REG &&
- inst->src[i].brw_reg::file == BRW_GENERAL_REGISTER_FILE &&
+ if (inst->src[i].file == FIXED_GRF &&
inst->src[i].nr < hw_reg_count) {
for (int off = 0; off < inst->regs_read(i); off++) {
int reg = inst->src[i].nr + off;
add_dep(last_grf_write[inst->src[i].nr * 16 + inst->src[i].reg_offset + r], n);
}
}
- } else if (inst->src[i].file == HW_REG &&
- (inst->src[i].brw_reg::file ==
- BRW_GENERAL_REGISTER_FILE)) {
+ } else if (inst->src[i].file == FIXED_GRF) {
if (post_reg_alloc) {
for (int r = 0; r < inst->regs_read(i); r++)
add_dep(last_grf_write[inst->src[i].nr + r], n);
add_dep(last_accumulator_write, n);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM &&
- (inst->src[i].file != HW_REG ||
- inst->src[i].brw_reg::file != BRW_IMMEDIATE_VALUE)) {
+ inst->src[i].file != UNIFORM) {
assert(inst->src[i].file != MRF);
add_barrier_deps(n);
}
add_dep(last_mrf_write[reg], n);
last_mrf_write[reg] = n;
}
- } else if (inst->dst.file == HW_REG &&
- inst->dst.brw_reg::file == BRW_GENERAL_REGISTER_FILE) {
+ } else if (inst->dst.file == FIXED_GRF) {
if (post_reg_alloc) {
for (int r = 0; r < inst->regs_written; r++)
last_grf_write[inst->dst.nr + r] = n;
add_dep(n, last_grf_write[inst->src[i].nr * 16 + inst->src[i].reg_offset + r], 0);
}
}
- } else if (inst->src[i].file == HW_REG &&
- (inst->src[i].brw_reg::file ==
- BRW_GENERAL_REGISTER_FILE)) {
+ } else if (inst->src[i].file == FIXED_GRF) {
if (post_reg_alloc) {
for (int r = 0; r < inst->regs_read(i); r++)
add_dep(n, last_grf_write[inst->src[i].nr + r], 0);
add_dep(n, last_accumulator_write, 0);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM &&
- (inst->src[i].file != HW_REG ||
- inst->src[i].brw_reg::file != BRW_IMMEDIATE_VALUE)) {
+ inst->src[i].file != UNIFORM) {
assert(inst->src[i].file != MRF);
add_barrier_deps(n);
}
last_mrf_write[reg] = n;
}
- } else if (inst->dst.file == HW_REG &&
- inst->dst.brw_reg::file == BRW_GENERAL_REGISTER_FILE) {
+ } else if (inst->dst.file == FIXED_GRF) {
if (post_reg_alloc) {
for (int r = 0; r < inst->regs_written; r++)
last_grf_write[inst->dst.nr + r] = n;
if (inst->src[i].file == VGRF) {
for (unsigned j = 0; j < inst->regs_read(i); ++j)
add_dep(last_grf_write[inst->src[i].nr + j], n);
- } else if (inst->src[i].file == HW_REG &&
- (inst->src[i].brw_reg::file ==
- BRW_GENERAL_REGISTER_FILE)) {
+ } else if (inst->src[i].file == FIXED_GRF) {
add_dep(last_fixed_grf_write, n);
} else if (inst->src[i].is_accumulator()) {
assert(last_accumulator_write);
add_dep(last_accumulator_write, n);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM &&
- (inst->src[i].file != HW_REG ||
- inst->src[i].brw_reg::file != BRW_IMMEDIATE_VALUE)) {
+ inst->src[i].file != UNIFORM) {
/* No reads from MRF, and ATTR is already translated away */
assert(inst->src[i].file != MRF &&
inst->src[i].file != ATTR);
} else if (inst->dst.file == MRF) {
add_dep(last_mrf_write[inst->dst.nr], n);
last_mrf_write[inst->dst.nr] = n;
- } else if (inst->dst.file == HW_REG &&
- inst->dst.brw_reg::file == BRW_GENERAL_REGISTER_FILE) {
+ } else if (inst->dst.file == FIXED_GRF) {
last_fixed_grf_write = n;
} else if (inst->dst.is_accumulator()) {
add_dep(last_accumulator_write, n);
if (inst->src[i].file == VGRF) {
for (unsigned j = 0; j < inst->regs_read(i); ++j)
add_dep(n, last_grf_write[inst->src[i].nr + j]);
- } else if (inst->src[i].file == HW_REG &&
- (inst->src[i].brw_reg::file ==
- BRW_GENERAL_REGISTER_FILE)) {
+ } else if (inst->src[i].file == FIXED_GRF) {
add_dep(n, last_fixed_grf_write);
} else if (inst->src[i].is_accumulator()) {
add_dep(n, last_accumulator_write);
} else if (inst->src[i].file != BAD_FILE &&
inst->src[i].file != IMM &&
- inst->src[i].file != UNIFORM &&
- (inst->src[i].file != HW_REG ||
- inst->src[i].brw_reg::file != BRW_IMMEDIATE_VALUE)) {
+ inst->src[i].file != UNIFORM) {
assert(inst->src[i].file != MRF &&
inst->src[i].file != ATTR);
add_barrier_deps(n);
last_grf_write[inst->dst.nr + j] = n;
} else if (inst->dst.file == MRF) {
last_mrf_write[inst->dst.nr] = n;
- } else if (inst->dst.file == HW_REG &&
- inst->dst.brw_reg::file == BRW_GENERAL_REGISTER_FILE) {
+ } else if (inst->dst.file == FIXED_GRF) {
last_fixed_grf_write = n;
} else if (inst->dst.is_accumulator()) {
last_accumulator_write = n;
bool
backend_reg::is_null() const
{
- return file == HW_REG &&
- brw_reg::file == BRW_ARCHITECTURE_REGISTER_FILE &&
- nr == BRW_ARF_NULL;
+ return file == ARF && nr == BRW_ARF_NULL;
}
bool
backend_reg::is_accumulator() const
{
- return file == HW_REG &&
- brw_reg::file == BRW_ARCHITECTURE_REGISTER_FILE &&
- nr == BRW_ARF_ACCUMULATOR;
+ return file == ARF && nr == BRW_ARF_ACCUMULATOR;
}
bool
#define MAX_VGRF_SIZE 16
enum PACKED register_file {
- VGRF,
+ ARF,
+ FIXED_GRF,
MRF,
IMM,
- HW_REG, /* a struct brw_reg */
+ VGRF,
ATTR,
UNIFORM, /* prog_data->params[reg] */
BAD_FILE,
src_reg::src_reg(struct brw_reg reg) :
backend_reg(reg)
{
- this->file = HW_REG;
+ this->file = (enum register_file)reg.file;
this->reg_offset = 0;
this->reladdr = NULL;
}
src_reg::src_reg(const dst_reg ®) :
backend_reg(static_cast<struct brw_reg>(reg))
{
- this->file = reg.file;
+ this->file = (enum register_file)reg.file;
this->reg_offset = reg.reg_offset;
this->reladdr = reg.reladdr;
this->swizzle = brw_swizzle_for_mask(reg.writemask);
{
init();
- this->file = file;
+ this->file = (enum register_file)file;
this->nr = nr;
this->type = brw_type_for_base_type(type);
this->writemask = writemask;
dst_reg::dst_reg(struct brw_reg reg) :
backend_reg(reg)
{
- this->file = HW_REG;
+ this->file = (enum register_file)reg.file;
this->reg_offset = 0;
this->reladdr = NULL;
}
bool
dst_reg::equals(const dst_reg &r) const
{
- return (file == r.file &&
- nr == r.nr &&
+ return (memcmp((brw_reg *)this, (brw_reg *)&r, sizeof(brw_reg)) == 0 &&
reg_offset == r.reg_offset &&
- type == r.type &&
- negate == r.negate &&
- abs == r.abs &&
- writemask == r.writemask &&
(reladdr == r.reladdr ||
- (reladdr && r.reladdr && reladdr->equals(*r.reladdr))) &&
- (file != HW_REG ||
- memcmp((brw_reg *)this, (brw_reg *)&r, sizeof(brw_reg)) == 0));
+ (reladdr && r.reladdr && reladdr->equals(*r.reladdr))));
}
bool
bool
src_reg::equals(const src_reg &r) const
{
- return (file == r.file &&
- nr == r.nr &&
+ return (memcmp((brw_reg *)this, (brw_reg *)&r, sizeof(brw_reg)) == 0 &&
reg_offset == r.reg_offset &&
- type == r.type &&
- negate == r.negate &&
- abs == r.abs &&
- swizzle == r.swizzle &&
- !reladdr && !r.reladdr &&
- (file != HW_REG ||
- memcmp((brw_reg *)this, (brw_reg *)&r, sizeof(brw_reg)) == 0) &&
- (file != IMM || d == r.d));
+ !reladdr && !r.reladdr);
}
bool
bool progress = false;
foreach_block_and_inst_safe(block, vec4_instruction, inst, cfg) {
- if (inst->dst.file == BAD_FILE || inst->dst.file == HW_REG ||
+ if (inst->dst.file == BAD_FILE ||
+ inst->dst.file == ARF ||
+ inst->dst.file == FIXED_GRF ||
inst->is_send_from_grf())
continue;
int reg = inst->src[i].nr + inst->src[i].reg_offset;
if (inst->src[i].file == VGRF) {
last_grf_write[reg] = NULL;
- } else if (inst->src[i].file == HW_REG) {
+ } else if (inst->src[i].file == FIXED_GRF) {
memset(last_grf_write, 0, sizeof(last_grf_write));
break;
}
* against a previous one writing to its destination.
*/
int reg = inst->dst.nr + inst->dst.reg_offset;
- if (inst->dst.file == VGRF) {
+ if (inst->dst.file == VGRF || inst->dst.file == FIXED_GRF) {
if (last_grf_write[reg] &&
!(inst->dst.writemask & grf_channels_written[reg])) {
last_grf_write[reg]->no_dd_clear = true;
last_mrf_write[reg] = inst;
mrf_channels_written[reg] |= inst->dst.writemask;
- } else if (inst->dst.nr == HW_REG) {
- if (inst->dst.brw_reg::file == BRW_GENERAL_REGISTER_FILE)
- memset(last_grf_write, 0, sizeof(last_grf_write));
- if (inst->dst.brw_reg::file == BRW_MESSAGE_REGISTER_FILE)
- memset(last_mrf_write, 0, sizeof(last_mrf_write));
}
}
}
if (mlen > 0)
return false;
- /* We can't use swizzles on the accumulator and that's really the only
- * HW_REG we would care to reswizzle so just disallow them all.
- */
for (int i = 0; i < 3; i++) {
- if (src[i].file == HW_REG)
+ if (src[i].is_accumulator())
return false;
}
case VGRF:
fprintf(file, "vgrf%d.%d", inst->dst.nr, inst->dst.reg_offset);
break;
+ case FIXED_GRF:
+ fprintf(file, "g%d", inst->dst.nr);
+ break;
case MRF:
fprintf(file, "m%d", inst->dst.nr);
break;
- case HW_REG:
- if (inst->dst.brw_reg::file == BRW_ARCHITECTURE_REGISTER_FILE) {
- switch (inst->dst.nr) {
- case BRW_ARF_NULL:
- fprintf(file, "null");
- break;
- case BRW_ARF_ADDRESS:
- fprintf(file, "a0.%d", inst->dst.subnr);
- break;
- case BRW_ARF_ACCUMULATOR:
- fprintf(file, "acc%d", inst->dst.subnr);
- break;
- case BRW_ARF_FLAG:
- fprintf(file, "f%d.%d", inst->dst.nr & 0xf,
- inst->dst.subnr);
- break;
- default:
- fprintf(file, "arf%d.%d", inst->dst.nr & 0xf,
- inst->dst.subnr);
- break;
- }
- } else {
- fprintf(file, "hw_reg%d", inst->dst.nr);
+ case ARF:
+ switch (inst->dst.nr) {
+ case BRW_ARF_NULL:
+ fprintf(file, "null");
+ break;
+ case BRW_ARF_ADDRESS:
+ fprintf(file, "a0.%d", inst->dst.subnr);
+ break;
+ case BRW_ARF_ACCUMULATOR:
+ fprintf(file, "acc%d", inst->dst.subnr);
+ break;
+ case BRW_ARF_FLAG:
+ fprintf(file, "f%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
+ break;
+ default:
+ fprintf(file, "arf%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
+ break;
}
if (inst->dst.subnr)
fprintf(file, "+%d", inst->dst.subnr);
case VGRF:
fprintf(file, "vgrf%d", inst->src[i].nr);
break;
+ case FIXED_GRF:
+ fprintf(file, "g%d", inst->src[i].nr);
+ break;
case ATTR:
fprintf(file, "attr%d", inst->src[i].nr);
break;
break;
}
break;
- case HW_REG:
- if (inst->src[i].brw_reg::file == BRW_ARCHITECTURE_REGISTER_FILE) {
- switch (inst->src[i].nr) {
- case BRW_ARF_NULL:
- fprintf(file, "null");
- break;
- case BRW_ARF_ADDRESS:
- fprintf(file, "a0.%d", inst->src[i].subnr);
- break;
- case BRW_ARF_ACCUMULATOR:
- fprintf(file, "acc%d", inst->src[i].subnr);
- break;
- case BRW_ARF_FLAG:
- fprintf(file, "f%d.%d", inst->src[i].nr & 0xf,
- inst->src[i].subnr);
- break;
- default:
- fprintf(file, "arf%d.%d", inst->src[i].nr & 0xf,
- inst->src[i].subnr);
- break;
- }
- } else {
- fprintf(file, "hw_reg%d", inst->src[i].nr);
+ case ARF:
+ switch (inst->src[i].nr) {
+ case BRW_ARF_NULL:
+ fprintf(file, "null");
+ break;
+ case BRW_ARF_ADDRESS:
+ fprintf(file, "a0.%d", inst->src[i].subnr);
+ break;
+ case BRW_ARF_ACCUMULATOR:
+ fprintf(file, "acc%d", inst->src[i].subnr);
+ break;
+ case BRW_ARF_FLAG:
+ fprintf(file, "f%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr);
+ break;
+ default:
+ fprintf(file, "arf%d.%d", inst->src[i].nr & 0xf, inst->src[i].subnr);
+ break;
}
if (inst->src[i].subnr)
fprintf(file, "+%d", inst->src[i].subnr);
assert(!src.reladdr);
break;
- case HW_REG:
+ case ARF:
+ case FIXED_GRF:
continue;
case BAD_FILE:
reg.writemask = dst.writemask;
break;
- case HW_REG:
+ case ARF:
+ case FIXED_GRF:
reg = dst;
break;
foreach_inst_in_block (vec4_instruction, inst, block) {
/* Skip some cases. */
if (is_expression(inst) && !inst->predicate && inst->mlen == 0 &&
- (inst->dst.file != HW_REG || inst->dst.is_null()))
+ ((inst->dst.file != ARF && inst->dst.file != FIXED_GRF) ||
+ inst->dst.is_null()))
{
bool found = false;