[ORC][MIPS] Fill delay-slot after `jr` instruction
authorSimon Atanasyan <simon@atanasyan.com>
Sat, 12 Jan 2019 11:12:08 +0000 (11:12 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Sat, 12 Jan 2019 11:12:08 +0000 (11:12 +0000)
commit789f4154db2297525163c4e389d37d2dc93c460b
tree9fa12ff02bdd9b39760510d38acf1bf7bdc46f1e
parentf903f782e706c62918d7a205701d46f701972012
[ORC][MIPS] Fill delay-slot after `jr` instruction

MIPS `jr` instruction uses a delay-slot. To escape execution of
arbitrary instruction we should either fill the delay-slot by `nop`
instruction or swap `jr` instruction and logically preceding
instruction. This fix implements the second method to generate a bit
more effective code.

llvm-svn: 351001
llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp