This is an archive of the discontinued LLVM Phabricator instance.

[mips][fp64a] Temporarily disable odd-numbered double-precision registers when using the FP64A ABI.
ClosedPublic

Authored by dsanders on Jul 16 2014, 5:24 AM.

Details

Summary

A few instructions (mostly cvt.d.w and similar) are causing problems with
-mfp64 and -mno-odd-spreg and it looks like fixing it properly may
take several weeks. In the meantime, let's disable the odd-numbered
double-precision registers so that the generated code is at least valid.

The problem is that instructions like cvt.d.w read from the 32-bit low
subregister of a double-precision FPU register. This often leads to the compiler
to inserting moves to transfer a GPR32 to a FGR32 using mtc1. Such moves
violate the rules against 32-bit writes to odd-numbered FPU registers imposed
by -mno-odd-spreg.

This fixes numerous test-suite failures when compiling for the FP64A ABI
('-mfp64 -mno-odd-spreg'). There is no LLVM test case because it's difficult to
test that odd-numbered FPU registers are not allocatable. Instead, we depend on
the assembler (GAS and -fintegrated-as) raising errors when the rules are
violated.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 11498.Jul 16 2014, 5:24 AM
dsanders retitled this revision from to [mips][fp64a] Temporarily disable odd-numbered double-precision registers when using the FP64A ABI..
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added reviewers: vmedic, sstankovic.
vmedic accepted this revision.Jul 16 2014, 7:08 AM
vmedic edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 16 2014, 7:08 AM
dsanders closed this revision.Jul 16 2014, 8:42 AM