[Beignet] [PATCH] GBE: fix empty block disassemble bug.
Yongjia Zhang
zhang_yong_jia at 126.com
Thu Jul 17 11:16:52 PDT 2014
If a block is empty, there will be more than one label pointing the
same instruction we need to step over all those labels.
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
backend/src/backend/gen_context.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index 2a4047a..f9ffc6e 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -1897,6 +1897,10 @@ namespace gbe
curLabel < this->getFunction().labelNum()) {
std::cout << " L" << curLabel + 1 << ":" << std::endl;
curLabel = (ir::LabelIndex)(curLabel + 1);
+ while(labelPos.find((ir::LabelIndex)(curLabel + 1))->second == insnID) {
+ std::cout << " L" << curLabel + 1 << ":" << std::endl;
+ curLabel = (ir::LabelIndex)(curLabel + 1);
+ }
}
std::cout << " (" << std::setw(8) << insnID << ") ";
pCom = (GenCompactInstruction*)&p->store[insnID];
--
1.8.3.2
More information about the Beignet
mailing list