Reallow unrestricted use of .set mipsX pseudo-op in gas.
authorThiemo Seufer <ths@networkno.de>
Fri, 7 Sep 2001 05:54:12 +0000 (05:54 +0000)
committerThiemo Seufer <ths@networkno.de>
Fri, 7 Sep 2001 05:54:12 +0000 (05:54 +0000)
Update testcases accordingly.

13 files changed:
gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/mips-abi32-pic.s
gas/testsuite/gas/mips/mips-abi32.s
gas/testsuite/gas/mips/mips-gp32-fp32-pic.s
gas/testsuite/gas/mips/mips-gp32-fp32.s
gas/testsuite/gas/mips/mips-gp32-fp64-pic.s
gas/testsuite/gas/mips/mips-gp32-fp64.s
gas/testsuite/gas/mips/mips-gp64-fp32-pic.s
gas/testsuite/gas/mips/mips-gp64-fp32.s
gas/testsuite/gas/mips/mips-gp64-fp64-pic.s
gas/testsuite/gas/mips/mips-gp64-fp64.s

index 18a62f01283896943b123ec2859afd4219f1d8d7..297b304fcfb826975732a1f292969522e5e7588b 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * config/tc-mips.c (s_mipsset): Reallow unrestricted use of .set mipsX
+       pseudo-op.
+\r
 2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
        * config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL.
index c30176754d19893d49f8b5841814930687532a63..0855af0919d611ea75fc3ac67dc010e2c3a03e80 100644 (file)
@@ -10406,10 +10406,55 @@ s_mipsset (x)
   else if (strncmp (name, "mips", 4) == 0)
     {
       int isa;
+      static int saved_mips_gp32;
+      static int saved_mips_fp32;
+      static int saved_mips_32bit_abi;
+      static int is_saved;
 
       /* Permit the user to change the ISA on the fly.  Needless to
         say, misuse can cause serious problems.  */
       isa = atoi (name + 4);
+      switch (isa)
+      {
+      case  0:
+       mips_gp32 = saved_mips_gp32;
+       mips_fp32 = saved_mips_fp32;
+       mips_32bit_abi = saved_mips_32bit_abi;
+       is_saved = 0;
+       break;
+      case  1:
+      case  2:
+      case 32:
+       if (! is_saved)
+         {
+           saved_mips_gp32 = mips_gp32;
+           saved_mips_fp32 = mips_fp32;
+           saved_mips_32bit_abi = mips_32bit_abi;
+         }
+       mips_gp32 = 1;
+       mips_fp32 = 1;
+       is_saved = 1;
+       break;
+      case  3:
+      case  4:
+      case  5:
+      case 64:
+       if (! is_saved)
+         {
+           saved_mips_gp32 = mips_gp32;
+           saved_mips_fp32 = mips_fp32;
+           saved_mips_32bit_abi = mips_32bit_abi;
+         }
+       mips_gp32 = 0;
+       mips_fp32 = 0;
+       mips_32bit_abi = 0;
+       is_saved = 1;
+       break;
+      default:
+       as_bad (_("unknown ISA level"));
+       break;
+      }
+
       switch (isa)
       {
       case  0: mips_opts.isa = file_mips_isa;   break;
index a037123ffae6552f97ccadf5e2332e158dc88a1b..176ce32dbba8d1c87cecff9a4eb2ed466f2dba84 100644 (file)
@@ -1,3 +1,16 @@
+2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * gas/mips/mips-abi32-pic.s: Remove .set mips4 pseudo-op.
+       * gas/mips/mips-abi32.s: Likewise.
+       * gas/mips/mips-gp32-fp32-pic.s: Likewise.
+       * gas/mips/mips-gp32-fp32.s: Likewise.
+       * gas/mips/mips-gp32-fp64-pic.s: Likewise.
+       * gas/mips/mips-gp32-fp64.s: Likewise.
+       * gas/mips/mips-gp64-fp32-pic.s: Likewise.
+       * gas/mips/mips-gp64-fp32.s: Likewise.
+       * gas/mips/mips-gp64-fp64-pic.s: Likewise.
+       * gas/mips/mips-gp64-fp64.s: Likewise.
+\r
 2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
        * gas/mips/beq.d: Check branches to external labels.
index c727607ab56f51ee10b3f3e8b3e9cacd963d6012..5fcb0583ac890ccfe31e2786362e1e47a3ad263b 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
        .ent    func
 func:
-       .set mips4
        .set noreorder
        .cpload $25             # 0000 lui      gp,hi(_gp_disp)
                                # 0004 addiu    gp,gp,lo(_gp_disp)
index bd20fe59f74ebf3ff8eab546eec163f7fa23cf29..c2db021b902c3959517feefcf05426644f373b74 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
 func:
        .set noreorder
-       .set mips4
        li      $4, 0x12345678  # 0000 lui      a0,0x1234
                                # 0004 ori      a0,a0,0x5678
        la      $4, shared      # 0008 addiu    a0,gp,shared
index 1603dc1eae3ebb5dd1061a8dce9f495deb306102..767182344ae8f544e895ea1389199cb9aa903509 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
        .ent    func
 func:
-       .set mips4
        .set noreorder
        .cpload $25             # 0000 lui      gp,hi(_gp_disp)
                                # 0004 addiu    gp,gp,lo(_gp_disp)
index 955b77ee11dcdcb5e3c410d53a6411947d08a1df..b9ed87f9cd4618fd1b21bddeed73f2f7b5b8f266 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
 func:
        .set noreorder
-       .set mips4
        li      $4, 0x12345678  # 0000 lui      a0,0x1234
                                # 0004 ori      a0,a0,0x5678
        la      $4, shared      # 0008 addiu    a0,gp,shared
index 0110b1e900a7dd9bfa7ae95304053f50a68d7ec0..2a4f5adf6c3de05b7a8a12dd68da969d4c0db3a2 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
        .ent    func
 func:
-       .set mips4
        .set noreorder
        .cpload $25             # 0000 lui      gp,hi(_gp_disp)
                                # 0004 addiu    gp,gp,lo(_gp_disp)
index 4578a33eba512722d030d6ef9626f7757b25f0c9..87503e4f5d17ce73b789a25d3f1d0c00a1b93c79 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
 func:
        .set noreorder
-       .set mips4
        li      $4, 0x12345678  # 0000 lui      a0,0x1234
                                # 0004 ori      a0,a0,0x5678
        la      $4, shared      # 0008 addiu    a0,gp,shared
index aae2afbacf073ffe91a3068658e13a6e9f8ddf3e..c67ad06d4ada6f54a062ed64fe22ff4a90ab0cac 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
        .ent    func
 func:
-       .set mips4
        .set noreorder
        .cpload $25             # 0000 lui      gp,hi(_gp_disp)
                                # 0004 addiu    gp,gp,lo(_gp_disp)
index 190998b89c72aff60cfb2602bf103fb456dfa747..29071038d82cf8609a38da6c70672da601fb38de 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
 func:
        .set noreorder
-       .set mips4
        li      $4, 0x12345678  # 0000 lui      a0,0x1234
                                # 0004 ori      a0,a0,0x5678
        la      $4, shared      # 0008 daddiu   a0,gp,shared
index 0858b055272398670288f022bd9a575446889c16..1f144f5a1d4e7ff3a281cbf080f242870f455302 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
        .ent    func
 func:
-       .set mips4
        .set noreorder
        .cpload $25             # 0000 lui      gp,hi(_gp_disp)
                                # 0004 addiu    gp,gp,lo(_gp_disp)
index a3b4f4d11831654e1f2048dfa449e10acdf14afc..8698fb49537cee4b4d74748ff99c0ab805ecca3d 100644 (file)
@@ -13,7 +13,6 @@ unshared:
        .text
 func:
        .set noreorder
-       .set mips4
        li      $4, 0x12345678  # 0000 lui      a0,0x1234
                                # 0004 ori      a0,a0,0x5678
        la      $4, shared      # 0008 daddiu   a0,gp,shared