void emitIPA();
void emitATOM();
void emitATOMS();
+ void emitRED();
void emitCCTL();
void emitPIXLD();
emitGPR (0x00, insn->def(0));
}
+void
+CodeEmitterGM107::emitRED()
+{
+ unsigned dType;
+
+ switch (insn->dType) {
+ case TYPE_U32: dType = 0; break;
+ case TYPE_S32: dType = 1; break;
+ case TYPE_U64: dType = 2; break;
+ case TYPE_F32: dType = 3; break;
+ case TYPE_B128: dType = 4; break;
+ case TYPE_S64: dType = 5; break;
+ default: assert(!"unexpected dType"); dType = 0; break;
+ }
+
+ emitInsn (0xebf80000);
+ emitField(0x30, 1, insn->src(0).getIndirect(0)->getSize() == 8);
+ emitField(0x17, 3, insn->subOp);
+ emitField(0x14, 3, dType);
+ emitADDR (0x08, 0x1c, 20, 0, insn->src(0));
+ emitGPR (0x00, insn->src(1));
+}
+
void
CodeEmitterGM107::emitCCTL()
{
if (insn->src(0).getFile() == FILE_MEMORY_SHARED)
emitATOMS();
else
- emitATOM();
+ if (!insn->defExists(0) && insn->subOp < NV50_IR_SUBOP_ATOM_CAS)
+ emitRED();
+ else
+ emitATOM();
break;
case OP_CCTL:
emitCCTL();