OSDN Git Service

[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)
commit73763b4d3549cc0ddc685df90ac306b3a73ecf3c
treec4c40f351313f6464785de723b2952570c93faae
parent5157eeb1c103137a9c68a55ae0177f11f5ded167
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354672 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsDelaySlotFiller.cpp
test/CodeGen/Mips/pseudo-jump-fill.ll [new file with mode: 0644]