OSDN Git Service

[mips] Handle the `long-calls` feature flags in the MIPS backend
authorSimon Atanasyan <simon@atanasyan.com>
Sat, 15 Jul 2017 07:14:25 +0000 (07:14 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Sat, 15 Jul 2017 07:14:25 +0000 (07:14 +0000)
commitb51511924409bfbbcdbdf6c9b875b2affcb8bdc8
tree5c228956ca15896364d4b3d7e045e2e2166385ba
parent55ceb9c2d8e9a8d6ac77cc23f09bb064d8f6a46d
[mips] Handle the `long-calls` feature flags in the MIPS backend

If the `long-calls` feature flags is enabled, disable use of the `jal`
instruction. Instead of that call a function by by first loading its
address into a register, and then using the contents of that register.

Differential revision: https://reviews.llvm.org/D35168

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308087 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/Mips.td
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsSubtarget.h
test/CodeGen/Mips/long-calls.ll [new file with mode: 0644]