Lines Matching refs:operands

67    unsigned addr_dwords = instr->operands.size() - 3;
69 if (instr->operands[3 + i].physReg() != instr->operands[3].physReg().advance(i * 4))
80 ctx.constaddrs[instr->operands[0].constantValue()].getpc_end = out.size() + 1;
83 instr->operands.pop_back();
85 ctx.constaddrs[instr->operands[2].constantValue()].add_literal = out.size() + 1;
88 instr->operands.pop_back();
89 assert(instr->operands[1].isConstant());
91 instr->operands[1] = Operand::literal32(instr->operands[1].constantValue());
117 encoding |= instr->operands.size() >= 2 ? instr->operands[1].physReg() << 8 : 0;
118 encoding |= !instr->operands.empty() ? instr->operands[0].physReg() : 0;
143 : !instr->operands.empty() && instr->operands[0].physReg() <= 127
144 ? instr->operands[0].physReg() << 16
154 encoding |= !instr->operands.empty() ? instr->operands[0].physReg() : 0;
161 encoding |= instr->operands.size() == 2 ? instr->operands[1].physReg() << 8 : 0;
162 encoding |= !instr->operands.empty() ? instr->operands[0].physReg() : 0;
180 bool soe = instr->operands.size() >= (!instr->definitions.empty() ? 3 : 4);
188 encoding |= instr->operands.size() ? (instr->operands[0].physReg() >> 1) << 9 : 0;
189 if (instr->operands.size() >= 2) {
190 if (!instr->operands[1].isConstant()) {
191 encoding |= instr->operands[1].physReg().reg();
192 } else if (instr->operands[1].constantValue() >= 1024) {
195 encoding |= instr->operands[1].constantValue() >> 2;
201 if (instr->operands.size() >= 2 && instr->operands[1].isConstant() &&
202 instr->operands[1].constantValue() >= 1024)
203 out.push_back(instr->operands[1].constantValue() >> 2);
221 if (instr->operands.size() >= 2)
222 encoding |= instr->operands[1].isConstant() ? 1 << 17 : 0; /* IMM - immediate enable */
228 if (is_load || instr->operands.size() >= 3) { /* SDATA */
229 encoding |= (is_load ? instr->definitions[0].physReg() : instr->operands[2].physReg())
232 if (instr->operands.size() >= 1) { /* SBASE */
233 encoding |= instr->operands[0].physReg() >> 1;
244 if (instr->operands.size() >= 2) {
245 const Operand& op_off1 = instr->operands[1];
260 const Operand& op_off2 = instr->operands.back();
277 encoding |= (0xFF & instr->operands[1].physReg()) << 9;
278 encoding |= instr->operands[0].physReg();
287 if (!instr->operands.empty())
288 encoding |= instr->operands[0].physReg();
295 encoding |= (0xFF & instr->operands[1].physReg()) << 9;
296 encoding |= instr->operands[0].physReg();
323 encoding |= instr->operands[0].physReg() << 9;
327 encoding |= instr->operands[2].physReg() << 18;
343 encoding |= (0x3 & instr->operands[0].constantValue());
345 encoding |= (0xFF & instr->operands[0].physReg());
366 reg = instr->operands.size() >= 3 && !(instr->operands[2].physReg() == m0)
367 ? instr->operands[2].physReg()
370 reg = instr->operands.size() >= 2 && !(instr->operands[1].physReg() == m0)
371 ? instr->operands[1].physReg()
374 encoding |= (0xFF & instr->operands[0].physReg());
401 encoding |= instr->operands[2].physReg() << 24;
403 encoding |= (instr->operands[0].physReg() >> 2) << 16;
404 unsigned reg = instr->operands.size() > 3 ? instr->operands[3].physReg()
407 encoding |= (0xFF & instr->operands[1].physReg());
434 encoding |= instr->operands[2].physReg() << 24;
437 encoding |= (instr->operands[0].physReg() >> 2) << 16;
438 unsigned reg = instr->operands.size() > 3 ? instr->operands[3].physReg()
441 encoding |= (0xFF & instr->operands[1].physReg());
477 encoding = (0xFF & instr->operands[3].physReg()); /* VADDR */
480 } else if (!instr->operands[2].isUndefined()) {
481 encoding |= (0xFF & instr->operands[2].physReg()) << 8; /* VDATA */
483 encoding |= (0x1F & (instr->operands[0].physReg() >> 2)) << 16; /* T# (resource) */
484 if (!instr->operands[1].isUndefined())
485 encoding |= (0x1F & (instr->operands[1].physReg() >> 2)) << 21; /* sampler */
499 for (unsigned i = 0; i < instr->operands.size() - 4u; i++)
500 nsa[i / 4] |= (0xFF & instr->operands[4 + i].physReg().reg()) << (i % 4 * 8);
539 encoding = (0xFF & instr->operands[0].physReg());
542 if (instr->operands.size() >= 3)
543 encoding |= (0xFF & instr->operands[2].physReg()) << 8;
544 if (!instr->operands[1].isUndefined()) {
545 assert(ctx.gfx_level >= GFX10 || instr->operands[1].physReg() != 0x7F);
547 encoding |= instr->operands[1].physReg() << 16;
554 (instr->format == Format::SCRATCH && instr->operands[0].isUndefined()))
578 encoding = 0xFF & exp.operands[0].physReg();
579 encoding |= (0xFF & exp.operands[1].physReg()) << 8;
580 encoding |= (0xFF & exp.operands[2].physReg()) << 16;
581 encoding |= (0xFF & exp.operands[3].physReg()) << 24;
632 encoding = 0x3 & instr->operands[0].constantValue();
634 encoding |= instr->operands[0].physReg() << 0;
635 encoding |= instr->operands[1].physReg() << 9;
638 for (unsigned i = 0; i < instr->operands.size(); i++)
639 encoding |= instr->operands[i].physReg() << (i * 9);
667 for (unsigned i = 0; i < instr->operands.size(); i++)
668 encoding |= instr->operands[i].physReg() << (i * 9);
679 Operand dpp_op = instr->operands[0];
680 instr->operands[0] = Operand(PhysReg{250}, v1);
701 Operand dpp_op = instr->operands[0];
702 instr->operands[0] = Operand(PhysReg{234}, v1);
715 Operand sdwa_op = instr->operands[0];
716 instr->operands[0] = Operand(PhysReg{249}, v1);
743 if (instr->operands.size() >= 2) {
744 encoding |= sdwa.sel[1].to_sdwa_sel(instr->operands[1].physReg().byte()) << 24;
752 if (instr->operands.size() >= 2)
753 encoding |= (instr->operands[1].physReg() < 256) << 31;
762 for (const Operand& op : instr->operands) {