aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorChao-ying Fu <fu@mips.com>2013-09-12 21:41:09 +0000
committerChao-ying Fu <fu@mips.com>2013-09-12 21:41:09 +0000
commit173d34478ad14ae35df062b2240b0d830a83cf31 (patch)
treefba3016118c954e9b4072214c655defa99e76b77 /gas/config
parent46dd523316d99a47824e1d7939fe1e680dd31adc (diff)
downloadgdb-173d34478ad14ae35df062b2240b0d830a83cf31.zip
gdb-173d34478ad14ae35df062b2240b0d830a83cf31.tar.gz
gdb-173d34478ad14ae35df062b2240b0d830a83cf31.tar.bz2
2013-09-12 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
* config/tc-mips.c (match_insn): Set error when $31 is used for bltzal* and bgezal*.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mips.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index ca95922..ff1c610 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -7091,6 +7091,10 @@ match_insn (struct mips_cl_insn *insn, const struct mips_opcode *opcode,
set_insn_error
(0, _("a destination register must be supplied"));
}
+ else if (arg.last_regno == 31
+ && (strncmp (insn->insn_mo->name, "bltzal", 6) == 0
+ || strncmp (insn->insn_mo->name, "bgezal", 6) == 0))
+ set_insn_error (0, _("the source register must not be $31"));
check_completed_insn (&arg);
return TRUE;
}