swr: [rasterizer jitter] Add DEBUGTRAP jit builder function
authorTim Rowley <timothy.o.rowley@intel.com>
Tue, 24 Jan 2017 19:30:05 +0000 (13:30 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Wed, 8 Feb 2017 19:57:47 +0000 (13:57 -0600)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp
src/gallium/drivers/swr/rasterizer/jitter/builder_misc.h

index 8744eb6..d65267e 100644 (file)
@@ -350,6 +350,13 @@ namespace SwrJit
     }
     #endif
 
+    //////////////////////////////////////////////////////////////////////////
+    Value *Builder::DEBUGTRAP()
+    {
+        Function *func = Intrinsic::getDeclaration(JM()->mpCurrentModule, Intrinsic::debugtrap);
+        return CALL(func);
+    }
+
     Value *Builder::VRCP(Value *va)
     {
         return FDIV(VIMMED1(1.0f), va);  // 1 / a
index 67f938e..9d55ce2 100644 (file)
@@ -152,7 +152,8 @@ void STACKRESTORE(Value* pSaved);
 
 Value* POPCNT(Value* a);
 
-Value* INT3() { return INTERRUPT(C((uint8_t)3)); }
+Value* DEBUGTRAP();
+Value* INT3() { return DEBUGTRAP(); }
 
 
 Value *VEXTRACTI128(Value* a, Constant* imm8);