gpu-compute: move disassemle() implementation to GPUStaticInst
authorTony Gutierrez <anthony.gutierrez@amd.com>
Thu, 27 Oct 2016 02:47:05 +0000 (22:47 -0400)
committerTony Gutierrez <anthony.gutierrez@amd.com>
Thu, 27 Oct 2016 02:47:05 +0000 (22:47 -0400)
src/arch/hsail/insts/gpu_static_inst.cc
src/arch/hsail/insts/gpu_static_inst.hh
src/gpu-compute/gpu_static_inst.cc
src/gpu-compute/gpu_static_inst.hh

index bbaeb13e66fa5b42c4489d479ae625e300f17a93..dba2756d0a397b7bdd08df0765bd9b0e9b292c87 100644 (file)
@@ -50,15 +50,4 @@ namespace HsailISA
     {
         disassembly = opcode;
     }
-
-    const std::string&
-    HsailGPUStaticInst::disassemble()
-    {
-        if (disassembly.empty()) {
-            generateDisassembly();
-            assert(!disassembly.empty());
-        }
-
-        return disassembly;
-    }
 } // namespace HsailISA
index 6a5ad5003136d65c3028a60ea7b33d83672e90db..5dcfe78d5f12dc2322938b221990c12bd165ea99 100644 (file)
@@ -54,7 +54,6 @@ namespace HsailISA
       public:
         HsailGPUStaticInst(const BrigObject *obj, const std::string &opcode);
         void generateDisassembly();
-        const std::string &disassemble();
         uint32_t instSize() { return 4; }
         bool isValid() const override { return true; }
 
index bcb8a5f3d91ad367d25374c73e7001db1fcafcb8..83b429e62390a37c8e356316061d23d01344ec81 100644 (file)
@@ -40,3 +40,13 @@ GPUStaticInst::GPUStaticInst(const std::string &opcode)
       _instNum(0), _scalarOp(false)
 {
 }
+const std::string&
+GPUStaticInst::disassemble()
+{
+    if (disassembly.empty()) {
+        generateDisassembly();
+        assert(!disassembly.empty());
+    }
+
+    return disassembly;
+}
index 447e1efa3b1274a96bf757ee26ac2bb94ed58e31..911e4f308278f084c4696b61d750ae1a70df2188 100644 (file)
@@ -72,7 +72,7 @@ class GPUStaticInst
 
     virtual void execute(GPUDynInstPtr gpuDynInst) = 0;
     virtual void generateDisassembly() = 0;
-    virtual const std::string &disassemble() = 0;
+    const std::string& disassemble();
     virtual int getNumOperands() = 0;
     virtual bool isCondRegister(int operandIndex) = 0;
     virtual bool isScalarRegister(int operandIndex) = 0;