OSDN Git Service

[mips] Add partial support for R6 in the long branch pass
authorSimon Dardis <simon.dardis@mips.com>
Thu, 14 Dec 2017 14:55:25 +0000 (14:55 +0000)
committerSimon Dardis <simon.dardis@mips.com>
Thu, 14 Dec 2017 14:55:25 +0000 (14:55 +0000)
commit6ca3095cfb3d74af71d2512b7e5a02a68f5df30b
treeceb214c6291671449632003078f528094b9f55ea
parente7acf09de46dd60a0610d2cc8703437dd802aeab
[mips] Add partial support for R6 in the long branch pass

MIPSR6 introduced several new jump instructions and deprecated
the use of the 'j' instruction. For microMIPS32R6, 'j' was removed
entirely and it only has non delay slot jumps.

This patch adds support for MIPSR6 by using some R6 instructions--
'bc' instead of 'j', 'jic $reg, 0' instead of 'jalr $zero, $reg'--
and modifies the sequences not to use delay slots for R6.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: dschuff, arichardson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320703 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsLongBranch.cpp
test/CodeGen/Mips/longbranch.ll