[mips][micromips] fix filling delay slots for PseudoIndirectBranch_MM
authorPetar Jovanovic <petar.jovanovic@mips.com>
Fri, 22 Feb 2019 14:53:58 +0000 (14:53 +0000)
committerPetar Jovanovic <petar.jovanovic@mips.com>
Fri, 22 Feb 2019 14:53:58 +0000 (14:53 +0000)
commit6083106b1216566f189ecb6e0ae0340b61c4254a
treebf7fa8102b426cdaff28ff67fc576e95d23d9c86
parent3167b3035e8a7fc9c96e00f8e7aad9de218cd0b8
[mips][micromips] fix filling delay slots for PseudoIndirectBranch_MM

Filling a delay slot in 32bit jump instructions with a 16bit instruction
can cause issues. According to the documentation such an operation is
unpredictable.
This patch adds opcode Mips::PseudoIndirectBranch_MM alongside
Mips::PseudoIndirectBranch and other instructions that are expanded to jr
instruction and do not allow a 16bit instruction in their delay slots.

Patch by Mirko Brkusanin.

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

llvm-svn: 354672
llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
llvm/test/CodeGen/Mips/pseudo-jump-fill.ll [new file with mode: 0644]