* gas/mips/jalr.s: New test.
* gas/mips/jalr.l: New test output. * gas/mips/mips.exp: Run new test.
This commit is contained in:
parent
ef29ce1ab3
commit
e7c604dd09
@ -1,3 +1,7 @@
|
||||
2008-01-02 Catherine Moore <clm@codesourcery.com>
|
||||
|
||||
* config/tc-mips.c (mips_ip): Check operands on jalr instruction.
|
||||
|
||||
2007-12-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* config/tc-i386.c (md_show_usage): Add -mmnemonic, -msyntax,
|
||||
|
@ -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)
|
||||
|
@ -1,3 +1,9 @@
|
||||
2008-01-02 Catherine Moore <clm@codesourcery.com>
|
||||
|
||||
* gas/mips/jalr.s: New test.
|
||||
* gas/mips/jalr.l: New test output.
|
||||
* gas/mips/mips.exp: Run new test.
|
||||
|
||||
2007-12-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* gas/i386/inval.s: Add test for cvtsi2ss/cvtsi2sd.
|
||||
|
5
gas/testsuite/gas/mips/jalr.l
Normal file
5
gas/testsuite/gas/mips/jalr.l
Normal file
@ -0,0 +1,5 @@
|
||||
.*: Assembler messages:
|
||||
.*:1: Error: illegal operands.*
|
||||
.*:2: Error: a destination register must be supplied.*
|
||||
.*:3: Error: source and destinationations must be different.*
|
||||
|
4
gas/testsuite/gas/mips/jalr.s
Normal file
4
gas/testsuite/gas/mips/jalr.s
Normal file
@ -0,0 +1,4 @@
|
||||
jalr $32
|
||||
jalr $31
|
||||
jalr $7, $7
|
||||
jalr $31, $2
|
@ -573,6 +573,7 @@ if { [istarget mips*-*-vxworks*] } {
|
||||
|
||||
run_list_test "illegal" "-32"
|
||||
run_list_test "baddata1" "-32"
|
||||
run_list_test "jalr" ""
|
||||
|
||||
# LOSE: As of 2002-02-08, the next 4 tests fail for target mips-ecoff.
|
||||
# It's unknown whether they _should_ pass as-is, or whether different
|
||||
|
Loading…
Reference in New Issue
Block a user