add disassembler support for message gateway
authorLu Guanqun <guanqun.lu@intel.com>
Wed, 10 Apr 2013 08:11:53 +0000 (16:11 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Thu, 11 Apr 2013 08:46:00 +0000 (16:46 +0800)
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/backend/gen/gen_mesa_disasm.c
backend/src/backend/gen_defs.hpp

index 9cdc581..6d9bf7f 100644 (file)
@@ -310,6 +310,17 @@ static const char *target_function_gen6[16] = {
   [GEN_SFID_DATAPORT_DATA_CACHE] = "data"
 };
 
+static const char *gateway_sub_function[8] = {
+  [0] = "open gateway",
+  [1] = "close gateway",
+  [2] = "forward gateway",
+  [3] = "get time stamp",
+  [4] = "barrier",
+  [5] = "update gateway state",
+  [6] = "MMIO R/W",
+  [7] = "reserved"
+};
+
 static const char *math_function[16] = {
   [GEN_MATH_FUNCTION_INV] = "inv",
   [GEN_MATH_FUNCTION_LOG] = "log",
@@ -1106,6 +1117,12 @@ int gen_disasm (FILE *file, const void *opaque_insn)
                 inst->bits3.gen7_untyped_rw.simd_mode,
                 inst->bits3.gen7_untyped_rw.msg_type);
         break;
+      case GEN_SFID_MESSAGE_GATEWAY:
+        format (file, " (subfunc: %s, notify: %d, ackreq: %d)",
+            gateway_sub_function[inst->bits3.gen7_msg_gw.subfunc],
+            inst->bits3.gen7_msg_gw.notify,
+            inst->bits3.gen7_msg_gw.ackreq);
+        break;
 
       default:
         format (file, "unsupported target %d", target);
index f7428b2..187224a 100644 (file)
@@ -778,6 +778,20 @@ struct GenInstruction
       uint32_t pad1:2;
     } da3src;
 
+    /*! Message gateway */
+    struct {
+      uint32_t subfunc:3;
+      uint32_t pad:11;
+      uint32_t ackreq:1;
+      uint32_t notify:2;
+      uint32_t pad2:2;
+      uint32_t header_present:1;
+      uint32_t response_length:5;
+      uint32_t msg_length:4;
+      uint32_t pad3:2;
+      uint32_t end_of_thread:1;
+    } gen7_msg_gw;
+
     int d;
     uint32_t ud;
     float f;