mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-16 12:24:19 +08:00
binutils/testsuite/:
* binutils-all/m68k/movem.s: New file. * binutils-all/m68k/objdump.exp: New file. include/opcode/: * m68k.h: Fix comment. opcodes/: * m68k-dis.c (m68k_valid_ea): Check validity of all codes.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2004-07-09 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* binutils-all/m68k/movem.s: New file.
|
||||||
|
|
||||||
|
* binutils-all/m68k/objdump.exp: New file.
|
||||||
|
|
||||||
2004-05-15 Nick Clifton <nickc@redhat.com>
|
2004-05-15 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* binutils-all/readelf.ss: Allow for ARM mapping symbols.
|
* binutils-all/readelf.ss: Allow for ARM mapping symbols.
|
||||||
|
2
binutils/testsuite/binutils-all/m68k/movem.s
Normal file
2
binutils/testsuite/binutils-all/m68k/movem.s
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
movem.l %d0-%d3,-(%sp)
|
||||||
|
movem.l %d0-%d3,(%sp)
|
53
binutils/testsuite/binutils-all/m68k/objdump.exp
Normal file
53
binutils/testsuite/binutils-all/m68k/objdump.exp
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# Copyright 2004
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
if {![istarget "m68*-*-*"] || [istarget "m68h*-*-*"] || [istarget "m681*-*-*"]} then {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if {[which $OBJDUMP] == 0} then {
|
||||||
|
perror "$OBJDUMP does not exist"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "Version [binutil_version $OBJDUMP]"
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Set up the test of movem.s
|
||||||
|
###########################
|
||||||
|
|
||||||
|
if {![binutils_assemble $srcdir/$subdir/movem.s tmpdir/movem.o]} then {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if [is_remote host] {
|
||||||
|
set objfile [remote_download host tmpdir/movem.o]
|
||||||
|
} else {
|
||||||
|
set objfile tmpdir/movem.o
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make sure that the movem is correctly decoded.
|
||||||
|
|
||||||
|
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $objfile"]
|
||||||
|
|
||||||
|
set want "moveml %d0-%d3,%sp@-.*moveml %d0-%d3,%sp@\[\r\n\]"
|
||||||
|
|
||||||
|
if [regexp $want $got] then {
|
||||||
|
pass "movem test"
|
||||||
|
} else {
|
||||||
|
fail "movem test"
|
||||||
|
}
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-07-09 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* m68k.h: Fix comment.
|
||||||
|
|
||||||
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
|
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
|
||||||
|
|
||||||
* crx.h: New file.
|
* crx.h: New file.
|
||||||
|
@ -219,7 +219,7 @@ struct m68k_opcode_alias
|
|||||||
! control (modes 2,5,6,7.0-3)
|
! control (modes 2,5,6,7.0-3)
|
||||||
(not 0,1,3,4,7.4)
|
(not 0,1,3,4,7.4)
|
||||||
& alterable control (modes 2,5,6,7.0,7.1)
|
& alterable control (modes 2,5,6,7.0,7.1)
|
||||||
(not 0,1,7.2-4)
|
(not 0,1,3,4,7.2-4)
|
||||||
$ alterable data (modes 0,2-6,7.0,7.1)
|
$ alterable data (modes 0,2-6,7.0,7.1)
|
||||||
(not 1,7.2-4)
|
(not 1,7.2-4)
|
||||||
? alterable control, or data register (modes 0,2,5,6,7.0,7.1)
|
? alterable control, or data register (modes 0,2,5,6,7.0,7.1)
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-07-09 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* m68k-dis.c (m68k_valid_ea): Check validity of all codes.
|
||||||
|
|
||||||
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
|
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
|
||||||
|
|
||||||
* Makefile.am (CFILES): Add crx-dis.c, crx-opc.c.
|
* Makefile.am (CFILES): Add crx-dis.c, crx-opc.c.
|
||||||
|
@ -826,7 +826,7 @@ print_insn_arg (d, buffer, p0, addr, info)
|
|||||||
val = fetch_arg (buffer, 's', 6, info);
|
val = fetch_arg (buffer, 's', 6, info);
|
||||||
|
|
||||||
/* If the <ea> is invalid for *d, then reject this match. */
|
/* If the <ea> is invalid for *d, then reject this match. */
|
||||||
if (m68k_valid_ea (*d, val) == FALSE)
|
if (!m68k_valid_ea (*d, val))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Get register number assuming address register. */
|
/* Get register number assuming address register. */
|
||||||
@ -1127,19 +1127,101 @@ print_insn_arg (d, buffer, p0, addr, info)
|
|||||||
/* Check if an EA is valid for a particular code. This is required
|
/* Check if an EA is valid for a particular code. This is required
|
||||||
for the EMAC instructions since the type of source address determines
|
for the EMAC instructions since the type of source address determines
|
||||||
if it is a EMAC-load instruciton if the EA is mode 2-5, otherwise it
|
if it is a EMAC-load instruciton if the EA is mode 2-5, otherwise it
|
||||||
is a non-load EMAC instruction and the bits mean register Ry. */
|
is a non-load EMAC instruction and the bits mean register Ry.
|
||||||
|
A similar case exists for the movem instructions where the register
|
||||||
|
mask is interpreted differently for different EAs. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bfd_boolean
|
||||||
m68k_valid_ea (char code, int val)
|
m68k_valid_ea (char code, int val)
|
||||||
{
|
{
|
||||||
int mode;
|
int mode, mask;
|
||||||
|
#define M(n0,n1,n2,n3,n4,n5,n6,n70,n71,n72,n73,n74) \
|
||||||
|
(n0 | n1 << 1 | n2 << 2 | n3 << 3 | n4 << 4 | n5 << 5 | n6 << 6 \
|
||||||
|
| n70 << 7 | n71 << 8 | n72 << 9 | n73 << 10 | n74 << 11)
|
||||||
|
|
||||||
|
switch (code)
|
||||||
|
{
|
||||||
|
case '*':
|
||||||
|
mask = M (1,1,1,1,1,1,1,1,1,1,1,1);
|
||||||
|
break;
|
||||||
|
case '~':
|
||||||
|
mask = M (0,0,1,1,1,1,1,1,1,0,0,0);
|
||||||
|
break;
|
||||||
|
case '%':
|
||||||
|
mask = M (1,1,1,1,1,1,1,1,1,0,0,0);
|
||||||
|
break;
|
||||||
|
case ';':
|
||||||
|
mask = M (1,0,1,1,1,1,1,1,1,1,1,1);
|
||||||
|
break;
|
||||||
|
case '@':
|
||||||
|
mask = M (1,0,1,1,1,1,1,1,1,1,1,0);
|
||||||
|
break;
|
||||||
|
case '!':
|
||||||
|
mask = M (0,0,1,0,0,1,1,1,1,1,1,0);
|
||||||
|
break;
|
||||||
|
case '&':
|
||||||
|
mask = M (0,0,1,0,0,1,1,1,1,0,0,0);
|
||||||
|
break;
|
||||||
|
case '$':
|
||||||
|
mask = M (1,0,1,1,1,1,1,1,1,0,0,0);
|
||||||
|
break;
|
||||||
|
case '?':
|
||||||
|
mask = M (0,1,0,0,1,1,1,1,1,0,0,0);
|
||||||
|
break;
|
||||||
|
case '/':
|
||||||
|
mask = M (1,0,1,0,0,1,1,1,1,1,1,0);
|
||||||
|
break;
|
||||||
|
case '|':
|
||||||
|
mask = M (0,0,1,0,0,1,1,1,1,1,1,0);
|
||||||
|
break;
|
||||||
|
case '>':
|
||||||
|
mask = M (0,0,1,0,1,1,1,1,1,1,1,0);
|
||||||
|
break;
|
||||||
|
case '<':
|
||||||
|
mask = M (0,0,1,1,0,1,1,1,1,0,0,0);
|
||||||
|
break;
|
||||||
|
case 'm':
|
||||||
|
mask = M (1,1,1,1,1,0,0,0,0,0,0,0);
|
||||||
|
break;
|
||||||
|
case 'n':
|
||||||
|
mask = M (0,0,0,0,0,1,0,0,0,1,0,0);
|
||||||
|
break;
|
||||||
|
case 'o':
|
||||||
|
mask = M (0,0,0,0,0,0,1,1,1,0,1,1);
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
mask = M (1,1,1,1,1,1,0,0,0,0,0,0);
|
||||||
|
break;
|
||||||
|
case 'q':
|
||||||
|
mask = M (1,0,1,1,1,1,0,0,0,0,0,0);
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
mask = M (1,0,1,1,1,1,0,1,1,0,0,0);
|
||||||
|
break;
|
||||||
|
case 'b':
|
||||||
|
mask = M (1,0,1,1,1,1,0,0,0,1,0,0);
|
||||||
|
break;
|
||||||
|
case 'w':
|
||||||
|
mask = M (0,0,1,1,1,1,0,0,0,1,0,0);
|
||||||
|
break;
|
||||||
|
case 'y':
|
||||||
|
mask = M (0,0,1,0,0,1,0,0,0,0,0,0);
|
||||||
|
break;
|
||||||
|
case 'z':
|
||||||
|
mask = M (0,0,1,0,0,1,0,0,0,1,0,0);
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
mask = M (0,0,1,1,1,1,0,0,0,0,0,0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
#undef M
|
||||||
|
|
||||||
mode = (val >> 3) & 7;
|
mode = (val >> 3) & 7;
|
||||||
if (code == '4')
|
if (mode == 7)
|
||||||
if (!(mode >= 2 && mode <= 5))
|
mode += val & 7;
|
||||||
return FALSE;
|
return (mask & (1 << mode)) != 0;
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fetch BITS bits from a position in the instruction specified by CODE.
|
/* Fetch BITS bits from a position in the instruction specified by CODE.
|
||||||
|
Reference in New Issue
Block a user