aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mips.c
diff options
context:
space:
mode:
authorCatherine Moore <clm@redhat.com>2008-01-02 20:59:47 +0000
committerCatherine Moore <clm@redhat.com>2008-01-02 20:59:47 +0000
commite7c604dd092bc0e3d8c632549ae8232b3c7f57bf (patch)
tree30efa2c9eb14464ace2bb9112ec1d8ee15ce39cd /gas/config/tc-mips.c
parentef29ce1ab3161205aec793706eb411a7b2bdba8b (diff)
downloadgdb-e7c604dd092bc0e3d8c632549ae8232b3c7f57bf.zip
gdb-e7c604dd092bc0e3d8c632549ae8232b3c7f57bf.tar.gz
gdb-e7c604dd092bc0e3d8c632549ae8232b3c7f57bf.tar.bz2
* gas/mips/jalr.s: New test.
* gas/mips/jalr.l: New test output. * gas/mips/mips.exp: Run new test.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r--gas/config/tc-mips.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index f19299e..e29041c 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -1,6 +1,6 @@
/* tc-mips.c -- assemble code for a MIPS chip.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
Modified for ECOFF and R4000 support by Ian Lance Taylor of Cygnus
@@ -9133,6 +9133,19 @@ do_msbd:
if (c == 'z' && regno != 0)
break;
+ if (c == 's' && !strcmp (ip->insn_mo->name, "jalr"))
+ {
+ if (regno == lastregno)
+ {
+ insn_error = _("source and destinationations must be different");
+ continue;
+ }
+ if (regno == 31 && lastregno == 0)
+ {
+ insn_error = _("a destination register must be supplied");
+ continue;
+ }
+ }
/* Now that we have assembled one operand, we use the args string
* to figure out where it goes in the instruction. */
switch (c)