[PATCH] D80637: [AMDGPU][MC][DISASSEMBLER] Corrected decoder to consume each code fragment once

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 28 04:52:00 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGbab5dadfcd0f: [AMDGPU][MC][DISASSEMBLER] Corrected decoder to consume each code fragment only… (authored by dp).

Changed prior to commit:
  https://reviews.llvm.org/D80637?vs=266543&id=266818#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80637/new/

https://reviews.llvm.org/D80637

Files:
  llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
  llvm/test/MC/Disassembler/AMDGPU/gfx10_dasm_all.txt


Index: llvm/test/MC/Disassembler/AMDGPU/gfx10_dasm_all.txt
===================================================================
--- llvm/test/MC/Disassembler/AMDGPU/gfx10_dasm_all.txt
+++ llvm/test/MC/Disassembler/AMDGPU/gfx10_dasm_all.txt
@@ -98025,8 +98025,8 @@
 # GFX10: v_trunc_f64_e64 v[5:6], |v[1:2]| ; encoding: [0x05,0x01,0x97,0xd5,0x01,0x01,0x00,0x00]
 0x05,0x01,0x97,0xd5,0x01,0x01,0x00,0x00
 
-# GFX10: v_writelane_b32 v255, 0, s2     ; encoding: [0xff,0x00,0x61,0xd7,0x80,0x04,0x00,0x00]
-0xff,0x00,0x61,0xd7,0x80,0x04,0x00,0x00
+# GFX10-FIXME: v_writelane_b32 v255, 0, s2     ; encoding: [0xff,0x00,0x61,0xd7,0x80,0x04,0x00,0x00]
+# 0xff,0x00,0x61,0xd7,0x80,0x04,0x00,0x00
 
 # GFX10: v_writelane_b32 v5, -1, s2      ; encoding: [0x05,0x00,0x61,0xd7,0xc1,0x04,0x00,0x00]
 0x05,0x00,0x61,0xd7,0xc1,0x04,0x00,0x00
Index: llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+++ llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
@@ -362,13 +362,6 @@
     Res = tryDecodeInst(DecoderTableGFX1064, MI, QW, Address);
   } while (false);
 
-  if (Res && (MaxInstBytesNum - Bytes.size()) == 12 && (!HasLiteral ||
-        !(MCII->get(MI.getOpcode()).TSFlags & SIInstrFlags::VOP3))) {
-    MaxInstBytesNum = 8;
-    Bytes = Bytes_.slice(0, MaxInstBytesNum);
-    eatBytes<uint64_t>(Bytes);
-  }
-
   if (Res && (MI.getOpcode() == AMDGPU::V_MAC_F32_e64_vi ||
               MI.getOpcode() == AMDGPU::V_MAC_F32_e64_gfx6_gfx7 ||
               MI.getOpcode() == AMDGPU::V_MAC_F32_e64_gfx10 ||


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80637.266818.patch
Type: text/x-patch
Size: 1639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200528/01429507/attachment.bin>


More information about the llvm-commits mailing list