nv50/ir: add MEMBAR emission for GM107
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 13 Feb 2016 21:06:15 +0000 (22:06 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 13 Feb 2016 21:06:15 +0000 (22:06 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp

index dee26225b7e1efe52dc5449619b842e085f167a5..8fcff37e617cb12f26dc68f937f7112e073288df 100644 (file)
@@ -193,6 +193,8 @@ private:
    void emitNOP();
    void emitKIL();
    void emitOUT();
+
+   void emitMEMBAR();
 };
 
 /*******************************************************************************
@@ -2627,6 +2629,13 @@ CodeEmitterGM107::emitOUT()
    emitGPR  (0x00, insn->def(0));
 }
 
+void
+CodeEmitterGM107::emitMEMBAR()
+{
+   emitInsn (0xef980000);
+   emitField(0x08, 2, insn->subOp >> 2);
+}
+
 /*******************************************************************************
  * assembler front-end
  ******************************************************************************/
@@ -2926,6 +2935,9 @@ CodeEmitterGM107::emitInstruction(Instruction *i)
    case OP_RESTART:
       emitOUT();
       break;
+   case OP_MEMBAR:
+      emitMEMBAR();
+      break;
    default:
       assert(!"invalid opcode");
       emitNOP();