[Beignet] [PATCH 10/27] Disasm supports to print long imm value in instruction.

junyan.he at inbox.com junyan.he at inbox.com
Tue Jan 6 02:01:12 PST 2015


From: Junyan He <junyan.he at linux.intel.com>

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 backend/src/backend/gen/gen_mesa_disasm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/backend/src/backend/gen/gen_mesa_disasm.c b/backend/src/backend/gen/gen_mesa_disasm.c
index 1241e4c..a55bc3f 100644
--- a/backend/src/backend/gen/gen_mesa_disasm.c
+++ b/backend/src/backend/gen/gen_mesa_disasm.c
@@ -987,6 +987,19 @@ static int imm(FILE *file, uint32_t type, const void* inst)
       break;
     case GEN_TYPE_F:
       format(file, "%-gF", GEN_BITS_FIELD(inst, bits3.f));
+      break;
+    case GEN_TYPE_L:
+      assert(!(gen_version < 80));
+      format(file, "0x%.8x %.8xQ", (((const union Gen8NativeInstruction *)inst)->bits3).ud,
+                                (((const union Gen8NativeInstruction *)inst)->bits2).ud);
+      break;
+    case GEN_TYPE_UL:
+    {
+      assert(!(gen_version < 80));
+      uint64_t val = (((const union Gen8NativeInstruction *)inst)->bits3).ud;
+      val = (val << 32) + ((((const union Gen8NativeInstruction *)inst)->bits2).ud);
+      format(file, "0x%luUQ", val);
+    }
   }
   return 0;
 }
-- 
1.9.1



More information about the Beignet mailing list