summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBai Yannan <yannan.bai@intel.com>2015-11-18 16:28:39 +0800
committerYang Rong <rong.r.yang@intel.com>2015-12-02 15:29:38 +0800
commitd10f16e746f0c3cdc90ac25a0c4ed5869e90ddca (patch)
tree335d2613ea442d5b1cb72b851b97303d74df4b01
parentef90ce66b2763e75475cde59c95166ddea99cc11 (diff)
GBE/DebugInfo: Print line and column NO. with ASM
Print line and column numbers with ASM, if OCL_DEBUGINFO is true. Signed-off-by: Yannan Bai <yannan.bai@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
-rw-r--r--backend/src/backend/gen_context.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index a9f6fab3..b78706a5 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -2923,6 +2923,9 @@ namespace gbe
if (OCL_OUTPUT_ASM)
outputAssembly(stdout, genKernel);
+ if (OCL_DEBUGINFO)
+ outputAssembly(stdout, genKernel);
+
if (this->asmFileName) {
FILE *asmDumpStream = fopen(this->asmFileName, "a");
if (asmDumpStream) {
@@ -2954,6 +2957,10 @@ namespace gbe
curLabel = (ir::LabelIndex)(curLabel + 1);
}
}
+
+ if (OCL_DEBUGINFO)
+ fprintf(file, "[%3i,%3i]", p->storedbg[insnID].line, p->storedbg[insnID].col);
+
fprintf(file, " (%8i) ", insnID);
pCom = (GenCompactInstruction*)&p->store[insnID];
if(pCom->bits1.cmpt_control == 1) {