[llvm] r194126 - Fix definition for Mips16 pc relative load word instructions.

reed kotler rkotler at mips.com
Fri Nov 8 11:57:03 PST 2013


On 11/06/2013 09:07 AM, Rafael EspĂ­ndola wrote:
> Test case?
>
I'm open to suggestions for "make check" test cases for this constant 
island stuff.

I can make them easily but they will be huge. You need a large program 
to trigger some of these cases.
Then people will complain about having all these giant bit code files 
that they have to compile whenever
they run "make check".

Right now I am forcing the situations I want with hidden developer only 
command line paramaters so that the
test cases for the main logic can be and understandable.

Well perhaps these is some kind of bit code that can be used to emit an 
inline array of words in place of instructions
or something. So that one bit code statement makes a 65k hole.

Reed

> On Tuesday, November 5, 2013, Reed Kotler wrote:
>
>     Author: rkotler
>     Date: Tue Nov  5 22:29:52 2013
>     New Revision: 194126
>
>     URL: http://llvm.org/viewvc/llvm-project?rev=194126&view=rev
>     Log:
>     Fix definition for Mips16 pc relative load word instructions.
>
>
>     Modified:
>         llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp
>
>     Modified: llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp?rev=194126&r1=194125&r2=194126&view=diff
>     ==============================================================================
>     --- llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp (original)
>     +++ llvm/trunk/lib/Target/Mips/MipsConstantIslandPass.cpp Tue Nov
>      5 22:29:52 2013
>     @@ -614,12 +614,13 @@ initializeFunctionInfo(const std::vector
>                  llvm_unreachable("Unknown addressing mode for CP
>     reference!");
>                case Mips::LwRxPcTcp16:
>                  Bits = 8;
>     -            Scale = 2;
>     +            Scale = 4;
>                  LongFormOpcode = Mips::LwRxPcTcpX16;
>                  break;
>                case Mips::LwRxPcTcpX16:
>                  Bits = 16;
>     -            Scale = 2;
>     +            Scale = 1;
>     +            NegOk = true;
>                  break;
>                }
>                // Remember that this is a user of a CP entry.
>     @@ -782,9 +783,6 @@ MachineBasicBlock *MipsConstantIslands::
>      /// isOffsetInRange - Checks whether UserOffset (the location of
>     a constant pool
>      /// reference) is within MaxDisp of TrialOffset (a proposed
>     location of a
>      /// constant pool entry).
>     -/// UserOffset is computed by getUserOffset above to include PC
>     adjustments. If
>     -/// the mod 4 alignment of UserOffset is not known, the
>     uncertainty must be
>     -/// subtracted from MaxDisp instead. CPUser::getMaxDisp() does that.
>      bool MipsConstantIslands::isOffsetInRange(unsigned UserOffset,
>                                               unsigned TrialOffset,
>     unsigned MaxDisp,
>                                               bool NegativeOK) {
>
>
>     _______________________________________________
>     llvm-commits mailing list
>     llvm-commits at cs.uiuc.edu <javascript:;>
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131108/10f3a062/attachment.html>


More information about the llvm-commits mailing list