OSDN Git Service

[AMDGPU] Disassembler code refactored + error messages.
authorNikolay Haustov <Nikolay.Haustov@amd.com>
Tue, 1 Mar 2016 13:57:29 +0000 (13:57 +0000)
committerNikolay Haustov <Nikolay.Haustov@amd.com>
Tue, 1 Mar 2016 13:57:29 +0000 (13:57 +0000)
commitd129fa6931e0f53f9339174cf18087ac68c75688
treeab8ae06a2bf01ca1597ef6036f554a86521eb1a7
parent3a3e8ddebbfaa83f4567f70b9a6aadacedaec918
[AMDGPU] Disassembler code refactored + error messages.

Idea behind this change is to make code shorter and as much common for all targets as possible. Let's even accept more code than is valid for a particular target, leaving it for the assembler to sort out.

64bit instructions decoding added.

Error\warning messages on unrecognized instructions operands added, InstPrinter allowed to print invalid operands helping to find invalid/unsupported code.

The change is massive and hard to compare with previous version, so it makes sense just to take a look on the new version. As a bonus, with a few TD changes following, it disassembles the majority of instructions. Currently it fully disassembles >300K binary source of some blas kernel.

Previous TODOs were saved whenever possible.

Patch by: Valery Pykhtin

Differential Revision: http://reviews.llvm.org/D17720

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262332 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h
lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp