[all-commits] [llvm/llvm-project] 11fbd0: [PowerPC] Remove asserts from the disassembler.

stefanp-ibm via All-commits all-commits at lists.llvm.org
Wed May 24 10:22:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 11fbd0c6abc9c47714247b58d9d8b0ef12bf1a4e
      https://github.com/llvm/llvm-project/commit/11fbd0c6abc9c47714247b58d9d8b0ef12bf1a4e
  Author: Stefan Pintilie <stefanp at ca.ibm.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
    A llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-dfp-invalid.txt

  Log Message:
  -----------
  [PowerPC] Remove asserts from the disassembler.

My previous patch had added a couple of asserts to the disassembler.
The problem with this is that the disassembler is not just used for the
text section it is also used to disassemble the data section of an
object where the bytes do not necessarily represent instructions. If the
data in the data section happens to look like an illegal instruction
then llvm-objdump will assert on data because it is finding an illegal
instruction that is not actually an instruction at all.

Reviewed By: nemanjai, #powerpc

Differential Revision: https://reviews.llvm.org/D149711




More information about the All-commits mailing list