auto ir = new AluInstruction(op, dest[chan], i & 1 ? ip.j : ip.i,
PValue(new InlineConstValue(ALU_SRC_PARAM_BASE + io.lds_pos(), 0)),
i == 0 ? EmitInstruction::write : EmitInstruction::last);
+ dest.pin_to_channel(chan);
+
ir->set_bank_swizzle(alu_vec_210);
emit_instruction(ir);
}
for (unsigned i = 0; i < 4 ; ++i) {
ir = new AluInstruction(op, dest[i], i & 1 ? ip.j : ip.i, PValue(new InlineConstValue(ALU_SRC_PARAM_BASE + io.lds_pos(), 0)),
(writemask & (1 << i)) ? EmitInstruction::write : EmitInstruction::empty);
+ dest.pin_to_channel(i);
ir->set_bank_swizzle(alu_vec_210);
emit_instruction(ir);
}
PValue(new InlineConstValue(ALU_SRC_PARAM_BASE + io.lds_pos(), 0)),
i == comp ? EmitInstruction::write : EmitInstruction::empty);
ir->set_bank_swizzle(alu_vec_210);
+ dest.pin_to_channel(i);
emit_instruction(ir);
}
ir->set_flag(alu_last_instr);
m_elms[i] = reg;
}
+void GPRVector::pin_to_channel(int i)
+{
+ auto& v = static_cast<GPRValue&>(*m_elms[i]);
+ v.pin_to_channel();
+}
+
void GPRVector::do_print(std::ostream& os) const
{
os << "R" << sel() << ".";
PValue operator [] (int i) const {return m_elms[i];}
PValue& operator [] (int i) {return m_elms[i];}
+ void pin_to_channel(int i);
PValue x() const {return m_elms[0];}
PValue y() const {return m_elms[1];}