diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-02-05 16:12:04 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-02-05 16:12:04 +0000 |
commit | c916764078fa06f8fc24de28714d1462835b513b (patch) | |
tree | fbd90ee9b9e87153e8361c40ae49f6a66ad08088 /gas | |
parent | b6f32a5bb9eb2dc98ffbdeef87444df795d33964 (diff) | |
download | gdb-c916764078fa06f8fc24de28714d1462835b513b.zip gdb-c916764078fa06f8fc24de28714d1462835b513b.tar.gz gdb-c916764078fa06f8fc24de28714d1462835b513b.tar.bz2 |
* config/tc-mips.c (mips16_ip): Accept floating point registers in
the operand of the exit instruction.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 40 |
2 files changed, 42 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 91dd54a..855c2eb 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Wed Feb 5 11:11:06 1997 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-mips.c (mips16_ip): Accept floating point registers in + the operand of the exit instruction. + Tue Feb 4 14:12:39 1997 Ian Lance Taylor <ian@cygnus.com> * symbols.c (resolve_symbol_value): If we leave an equated symbol diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 52f8c0b..d1dd07e 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -7217,7 +7217,7 @@ mips16_ip (str, ip) mask = 7 << 3; while (*s != '\0') { - int reg1, reg2; + int freg, reg1, reg2; while (*s == ' ' || *s == ',') ++s; @@ -7227,6 +7227,13 @@ mips16_ip (str, ip) break; } ++s; + if (*s != 'f') + freg = 0; + else + { + freg = 1; + ++s; + } reg1 = 0; while (isdigit (*s)) { @@ -7244,6 +7251,16 @@ mips16_ip (str, ip) if (*s != '$') break; ++s; + if (freg) + { + if (*s == 'f') + ++s; + else + { + as_bad ("invalid register list"); + break; + } + } reg2 = 0; while (isdigit (*s)) { @@ -7252,15 +7269,32 @@ mips16_ip (str, ip) ++s; } } - if (reg1 == 4 && reg2 >= 4 && reg2 <= 7 && c != 'L') + if (freg && reg1 == 0 && reg2 == 0 && c == 'L') + { + mask &= ~ (7 << 3); + mask |= 5 << 3; + } + else if (freg && reg1 == 0 && reg2 == 1 && c == 'L') + { + mask &= ~ (7 << 3); + mask |= 6 << 3; + } + else if (reg1 == 4 && reg2 >= 4 && reg2 <= 7 && c != 'L') mask |= (reg2 - 3) << 3; else if (reg1 == 16 && reg2 >= 16 && reg2 <= 17) mask |= (reg2 - 15) << 1; else if (reg1 == 31 && reg2 == 31) mask |= 1; else - as_bad ("invalid register list"); + { + as_bad ("invalid register list"); + break; + } } + /* The mask is filled in in the opcode table for the + benefit of the disassembler. We remove it before + applying the actual mask. */ + ip->insn_opcode &= ~ ((7 << 3) << MIPS16OP_SH_IMM6); ip->insn_opcode |= mask << MIPS16OP_SH_IMM6; } continue; |