HomePhabricator

[PowerPC][HTM] Fix disassembling buffer overflow for tabortdc and others

Authored by jsji on Jun 27 2019, 7:11 AM.

Description

[PowerPC][HTM] Fix disassembling buffer overflow for tabortdc and others

This was reported in https://bugs.llvm.org/show_bug.cgi?id=41751
llvm-mc aborted when disassembling tabortdc.

This patch try to clean up TM related DAGs.

  • Fixes the problem by remove explicit output of cr0, and put it as implicit def.
  • Update int_ppc_tbegin pattern to accommodate the implicit def of cr0.
  • Update the TCHECK operand and int_ppc_tcheck accordingly.
  • Add some builtin test and disassembly tests.
  • Remove unused CRRC0/crrc0

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

llvm-svn: 364544