一种将AMD GCN内核反编译为OpenCL的方法
A method for decompilation of AMD GCN kernels to OpenCL
摘要:
简介:反编译器是在没有源代码的情况下进行软件分析和支持的有用工具。它们可用于许多硬件体系结构和程序设计语言。然而,现有的反编译器都不支持现代AMD GPU架构,如AMD GCN和RDNA。目的:我们的目标是为现代AMD GPU架构开发第一个汇编反编译器工具,该工具以OpenCL语言生成代码,该语言广泛用于GPGPU编程。结果如下:我们开发了以下操作的算法:预处理汇编代码,搜索数据访问,提取系统值,反编译算术运算和恢复数据类型。我们还开发了分支操作的反编译模板。实际相关性:我们在Python中实现了所提出的算法,作为一个名为OpenCL Decompiler的工具,它支持AMD GCN指令的大子集。该工具自动将反汇编的GPGPU代码转换为等效的OpenCL代码,从而减少了分析汇编代码所需的工作量。
英文摘要:
Introduction: Decompilers are useful tools for software analysis and support in the absence of source code. They are available for many hardware architectures and programming languages. However, none of the existing decompilers support modern AMD GPU architectures such as AMD GCN and RDNA. Purpose: We aim at developing the first assembly decompiler tool for a modern AMD GPU architecture that generates code in the OpenCL language, which is widely used for programming GPGPUs. Results: We developed the algorithms for the following operations: preprocessing assembly code, searching data accesses, extracting system values, decompiling arithmetic operations and recovering data types. We also developed templates for decompilation of branching operations. Practical relevance: We implemented the presented algorithms in Python as a tool called OpenCLDecompiler, which supports a large subset of AMD GCN instructions. This tool automatically converts disassembled GPGPU code into the equivalent OpenCL code, which reduces the effort required to analyze assembly code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。