Adjust offsets for max load instruction offsets. This is more pessimistic
authorReed Kotler <rkotler@mips.com>
Thu, 16 Jan 2014 00:47:46 +0000 (00:47 +0000)
committerReed Kotler <rkotler@mips.com>
Thu, 16 Jan 2014 00:47:46 +0000 (00:47 +0000)
than it needs to be by 1 bit but I need to finish some other things so
that all the boundary cases will work in that situation. constpool.c
in test-suite will fail to assemble under our new internal test-suite sync
without this change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199343 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/Mips16InstrInfo.td
lib/Target/Mips/MipsConstantIslandPass.cpp
test/CodeGen/Mips/const6a.ll

index 840dfde650a14fd382156a8f6e6c0b48a109308d..8d8b2ed20b9816d264a239d872e937d87cb86930 100644 (file)
@@ -119,6 +119,7 @@ class FJAL16_ins<bits<1> _X, string asmstr,
          !strconcat(asmstr, "\t$imm\n\tnop"),[],
          itin>  {
   let isCodeGenOnly=1;
+  let Size=6;
 }
 
 class FJALB16_ins<bits<1> _X, string asmstr,
@@ -127,6 +128,7 @@ class FJALB16_ins<bits<1> _X, string asmstr,
          !strconcat(asmstr, "\t$imm\t# branch\n\tnop"),[],
          itin>  {
   let isCodeGenOnly=1;
+  let Size=6;
 }
 
 //
index 334327d3f5b24481586a31bcad26dcdd43586d44..8f607b057d209fb7bb8f0f5728db957bc1000726 100644 (file)
@@ -790,11 +790,11 @@ initializeFunctionInfo(const std::vector<MachineInstr*> &CPEMIs) {
             Bits = 8;
             Scale = 4;
             LongFormOpcode = Mips::LwRxPcTcpX16;
-            LongFormBits = 16;
+            LongFormBits = 14;
             LongFormScale = 1;
             break;
           case Mips::LwRxPcTcpX16:
-            Bits = 16;
+            Bits = 14;
             Scale = 1;
             NegOk = true;
             break;
index 8b402accc7de67647936ab6caa6db4b251bd121a..d34239058734c22697b0660324e6295af7d81983 100644 (file)
@@ -19,7 +19,7 @@ entry:
 ; load-relax: $CPI0_0:
 ; load-relax:  .4byte  3735943886
 ; load-relax:  .end    t
-  call void asm sideeffect ".space 40000", ""() #1, !srcloc !1
+  call void asm sideeffect ".space 10000", ""() #1, !srcloc !1
   ret void
 }