[mips] For the FP64A ABI, odd-numbered double-precision moves must not use mtc1/mfc1.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 14 Jul 2014 13:08:14 +0000 (13:08 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 14 Jul 2014 13:08:14 +0000 (13:08 +0000)
commitc4ce78e261582d08475c6bbea334c1c9dbea494b
treead1f529775860aaa736e400eb3a173015b01d5d5
parent543f70b0405165a98816c6e0b87349c38385cd40
[mips] For the FP64A ABI, odd-numbered double-precision moves must not use mtc1/mfc1.

Summary:
This is because the FP64A the hardware will redirect 32-bit reads/writes
from/to odd-numbered registers to the upper 32-bits of the corresponding
even register. In effect, simulating FR=0 mode when FR=0 mode is not
available.

Unfortunately, we have to make the decision to avoid mfc1/mtc1 before
register allocation so we currently do this for even registers too.

FPXX has a similar requirement on 32-bit architectures that lack
mfhc1/mthc1 so this patch also handles the affected moves from the FPU for
FPXX too. Moves to the FPU were supported by an earlier commit.

Differential Revision: http://reviews.llvm.org/D4484

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212938 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsMachineFunction.cpp
lib/Target/Mips/MipsMachineFunction.h
lib/Target/Mips/MipsSEFrameLowering.cpp
lib/Target/Mips/MipsSEInstrInfo.cpp
lib/Target/Mips/MipsSubtarget.cpp
test/CodeGen/Mips/fp64a.ll [new file with mode: 0644]
test/CodeGen/Mips/fpxx.ll