Open the file specified for the ASM dump and write the assembly to it.
---
 backend/src/backend/gen_context.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/backend/src/backend/gen_context.cpp 
b/backend/src/backend/gen_context.cpp
index 446b693..56946a3 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -2295,6 +2295,14 @@ namespace gbe
     if (OCL_OUTPUT_ASM)
       outputAssembly(stdout, genKernel);
 
+    if (this->asmFileName) {
+      FILE *asmDumpStream = fopen(this->asmFileName, "w");
+      if (asmDumpStream) {
+        outputAssembly(asmDumpStream, genKernel);
+        fclose(asmDumpStream);
+      }
+    }
+
     return true;
   }
 
-- 
2.1.0

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to