Reallow unrestricted use of .set mipsX pseudo-op in gas.

Update testcases accordingly.
This commit is contained in:
Thiemo Seufer
2001-09-07 05:54:12 +00:00
parent cb56d3d327
commit 553178e47b
13 changed files with 63 additions and 10 deletions

View 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.
2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL. * config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL.

View File

@ -10406,10 +10406,55 @@ s_mipsset (x)
else if (strncmp (name, "mips", 4) == 0) else if (strncmp (name, "mips", 4) == 0)
{ {
int isa; 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 /* Permit the user to change the ISA on the fly. Needless to
say, misuse can cause serious problems. */ say, misuse can cause serious problems. */
isa = atoi (name + 4); 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) switch (isa)
{ {
case 0: mips_opts.isa = file_mips_isa; break; case 0: mips_opts.isa = file_mips_isa; break;

View 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.
2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* gas/mips/beq.d: Check branches to external labels. * gas/mips/beq.d: Check branches to external labels.

View File

@ -13,7 +13,6 @@ unshared:
.text .text
.ent func .ent func
func: func:
.set mips4
.set noreorder .set noreorder
.cpload $25 # 0000 lui gp,hi(_gp_disp) .cpload $25 # 0000 lui gp,hi(_gp_disp)
# 0004 addiu gp,gp,lo(_gp_disp) # 0004 addiu gp,gp,lo(_gp_disp)

View File

@ -13,7 +13,6 @@ unshared:
.text .text
func: func:
.set noreorder .set noreorder
.set mips4
li $4, 0x12345678 # 0000 lui a0,0x1234 li $4, 0x12345678 # 0000 lui a0,0x1234
# 0004 ori a0,a0,0x5678 # 0004 ori a0,a0,0x5678
la $4, shared # 0008 addiu a0,gp,shared la $4, shared # 0008 addiu a0,gp,shared

View File

@ -13,7 +13,6 @@ unshared:
.text .text
.ent func .ent func
func: func:
.set mips4
.set noreorder .set noreorder
.cpload $25 # 0000 lui gp,hi(_gp_disp) .cpload $25 # 0000 lui gp,hi(_gp_disp)
# 0004 addiu gp,gp,lo(_gp_disp) # 0004 addiu gp,gp,lo(_gp_disp)

View File

@ -13,7 +13,6 @@ unshared:
.text .text
func: func:
.set noreorder .set noreorder
.set mips4
li $4, 0x12345678 # 0000 lui a0,0x1234 li $4, 0x12345678 # 0000 lui a0,0x1234
# 0004 ori a0,a0,0x5678 # 0004 ori a0,a0,0x5678
la $4, shared # 0008 addiu a0,gp,shared la $4, shared # 0008 addiu a0,gp,shared

View File

@ -13,7 +13,6 @@ unshared:
.text .text
.ent func .ent func
func: func:
.set mips4
.set noreorder .set noreorder
.cpload $25 # 0000 lui gp,hi(_gp_disp) .cpload $25 # 0000 lui gp,hi(_gp_disp)
# 0004 addiu gp,gp,lo(_gp_disp) # 0004 addiu gp,gp,lo(_gp_disp)

View File

@ -13,7 +13,6 @@ unshared:
.text .text
func: func:
.set noreorder .set noreorder
.set mips4
li $4, 0x12345678 # 0000 lui a0,0x1234 li $4, 0x12345678 # 0000 lui a0,0x1234
# 0004 ori a0,a0,0x5678 # 0004 ori a0,a0,0x5678
la $4, shared # 0008 addiu a0,gp,shared la $4, shared # 0008 addiu a0,gp,shared

View File

@ -13,7 +13,6 @@ unshared:
.text .text
.ent func .ent func
func: func:
.set mips4
.set noreorder .set noreorder
.cpload $25 # 0000 lui gp,hi(_gp_disp) .cpload $25 # 0000 lui gp,hi(_gp_disp)
# 0004 addiu gp,gp,lo(_gp_disp) # 0004 addiu gp,gp,lo(_gp_disp)

View File

@ -13,7 +13,6 @@ unshared:
.text .text
func: func:
.set noreorder .set noreorder
.set mips4
li $4, 0x12345678 # 0000 lui a0,0x1234 li $4, 0x12345678 # 0000 lui a0,0x1234
# 0004 ori a0,a0,0x5678 # 0004 ori a0,a0,0x5678
la $4, shared # 0008 daddiu a0,gp,shared la $4, shared # 0008 daddiu a0,gp,shared

View File

@ -13,7 +13,6 @@ unshared:
.text .text
.ent func .ent func
func: func:
.set mips4
.set noreorder .set noreorder
.cpload $25 # 0000 lui gp,hi(_gp_disp) .cpload $25 # 0000 lui gp,hi(_gp_disp)
# 0004 addiu gp,gp,lo(_gp_disp) # 0004 addiu gp,gp,lo(_gp_disp)

View File

@ -13,7 +13,6 @@ unshared:
.text .text
func: func:
.set noreorder .set noreorder
.set mips4
li $4, 0x12345678 # 0000 lui a0,0x1234 li $4, 0x12345678 # 0000 lui a0,0x1234
# 0004 ori a0,a0,0x5678 # 0004 ori a0,a0,0x5678
la $4, shared # 0008 daddiu a0,gp,shared la $4, shared # 0008 daddiu a0,gp,shared