diff options
author | Thiemo Seufer <ths@networkno.de> | 2001-09-07 05:54:12 +0000 |
---|---|---|
committer | Thiemo Seufer <ths@networkno.de> | 2001-09-07 05:54:12 +0000 |
commit | 553178e47b1d01715741459d1f828a86c1a2a51b (patch) | |
tree | 3cdb462b859522ec4df5bd586b6b933c5a2717bf /gas/config/tc-mips.c | |
parent | cb56d3d327dc7fd17dbc3e3f95131cb6b312f18e (diff) | |
download | gdb-553178e47b1d01715741459d1f828a86c1a2a51b.zip gdb-553178e47b1d01715741459d1f828a86c1a2a51b.tar.gz gdb-553178e47b1d01715741459d1f828a86c1a2a51b.tar.bz2 |
Reallow unrestricted use of .set mipsX pseudo-op in gas.
Update testcases accordingly.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index c301767..0855af0 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -10406,12 +10406,57 @@ 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; case 1: mips_opts.isa = ISA_MIPS1; break; case 2: mips_opts.isa = ISA_MIPS2; break; |