mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-21 10:02:26 +00:00
* Makefile.am (BFD32_BACKENDS): Remove elf32-score and
elf32-score7 files. (BFD32_BACKEND_CFILES): Likewise. (BFD64_BACKENDS): Add elf32-score and elf32-score7 files. (BFD64_BACKENDS_CFILES): Likewise. * Makefile.in: Regenerate. * config.bfd: More Score targets into BFD64 list. * configure.in: Move score vectors to 64-bit list. * targets.c: Likewise. * score-dis.c: Only compile when 64-bit bfds are enabled.
This commit is contained in:
parent
89ecc4f5e7
commit
02b1cb404a
@ -288,8 +288,6 @@ BFD32_BACKENDS = \
|
|||||||
elf32-pj.lo \
|
elf32-pj.lo \
|
||||||
elf32-ppc.lo \
|
elf32-ppc.lo \
|
||||||
elf32-s390.lo \
|
elf32-s390.lo \
|
||||||
elf32-score.lo \
|
|
||||||
elf32-score7.lo \
|
|
||||||
elf32-sh.lo \
|
elf32-sh.lo \
|
||||||
elf32-sh-symbian.lo \
|
elf32-sh-symbian.lo \
|
||||||
elf32-sh64.lo \
|
elf32-sh64.lo \
|
||||||
@ -474,8 +472,6 @@ BFD32_BACKENDS_CFILES = \
|
|||||||
elf32-sh64.c \
|
elf32-sh64.c \
|
||||||
elf32-sh64-com.c \
|
elf32-sh64-com.c \
|
||||||
elf32-s390.c \
|
elf32-s390.c \
|
||||||
elf32-score.c \
|
|
||||||
elf32-score7.c \
|
|
||||||
elf32-sh.c \
|
elf32-sh.c \
|
||||||
elf32-sh-symbian.c \
|
elf32-sh-symbian.c \
|
||||||
elfxx-sparc.c \
|
elfxx-sparc.c \
|
||||||
@ -588,6 +584,8 @@ BFD64_BACKENDS = \
|
|||||||
elfn32-mips.lo \
|
elfn32-mips.lo \
|
||||||
elf64-mips.lo \
|
elf64-mips.lo \
|
||||||
elf64-mmix.lo \
|
elf64-mmix.lo \
|
||||||
|
elf32-score.lo \
|
||||||
|
elf32-score7.lo \
|
||||||
elf64-sh64.lo \
|
elf64-sh64.lo \
|
||||||
elf64-ppc.lo \
|
elf64-ppc.lo \
|
||||||
elf64-s390.lo \
|
elf64-s390.lo \
|
||||||
@ -623,6 +621,8 @@ BFD64_BACKENDS_CFILES = \
|
|||||||
elf64-mmix.c \
|
elf64-mmix.c \
|
||||||
elf64-ppc.c \
|
elf64-ppc.c \
|
||||||
elf64-s390.c \
|
elf64-s390.c \
|
||||||
|
elf32-score.c \
|
||||||
|
elf32-score7.c \
|
||||||
elf64-sh64.c \
|
elf64-sh64.c \
|
||||||
elf64-sparc.c \
|
elf64-sparc.c \
|
||||||
elf64.c \
|
elf64.c \
|
||||||
|
@ -555,8 +555,6 @@ BFD32_BACKENDS = \
|
|||||||
elf32-pj.lo \
|
elf32-pj.lo \
|
||||||
elf32-ppc.lo \
|
elf32-ppc.lo \
|
||||||
elf32-s390.lo \
|
elf32-s390.lo \
|
||||||
elf32-score.lo \
|
|
||||||
elf32-score7.lo \
|
|
||||||
elf32-sh.lo \
|
elf32-sh.lo \
|
||||||
elf32-sh-symbian.lo \
|
elf32-sh-symbian.lo \
|
||||||
elf32-sh64.lo \
|
elf32-sh64.lo \
|
||||||
@ -741,8 +739,6 @@ BFD32_BACKENDS_CFILES = \
|
|||||||
elf32-sh64.c \
|
elf32-sh64.c \
|
||||||
elf32-sh64-com.c \
|
elf32-sh64-com.c \
|
||||||
elf32-s390.c \
|
elf32-s390.c \
|
||||||
elf32-score.c \
|
|
||||||
elf32-score7.c \
|
|
||||||
elf32-sh.c \
|
elf32-sh.c \
|
||||||
elf32-sh-symbian.c \
|
elf32-sh-symbian.c \
|
||||||
elfxx-sparc.c \
|
elfxx-sparc.c \
|
||||||
@ -856,6 +852,8 @@ BFD64_BACKENDS = \
|
|||||||
elfn32-mips.lo \
|
elfn32-mips.lo \
|
||||||
elf64-mips.lo \
|
elf64-mips.lo \
|
||||||
elf64-mmix.lo \
|
elf64-mmix.lo \
|
||||||
|
elf32-score.lo \
|
||||||
|
elf32-score7.lo \
|
||||||
elf64-sh64.lo \
|
elf64-sh64.lo \
|
||||||
elf64-ppc.lo \
|
elf64-ppc.lo \
|
||||||
elf64-s390.lo \
|
elf64-s390.lo \
|
||||||
@ -891,6 +889,8 @@ BFD64_BACKENDS_CFILES = \
|
|||||||
elf64-mmix.c \
|
elf64-mmix.c \
|
||||||
elf64-ppc.c \
|
elf64-ppc.c \
|
||||||
elf64-s390.c \
|
elf64-s390.c \
|
||||||
|
elf32-score.c \
|
||||||
|
elf32-score7.c \
|
||||||
elf64-sh64.c \
|
elf64-sh64.c \
|
||||||
elf64-sparc.c \
|
elf64-sparc.c \
|
||||||
elf64.c \
|
elf64.c \
|
||||||
|
@ -1192,14 +1192,12 @@ case "${targ}" in
|
|||||||
targ_defvec=bfd_elf64_s390_vec
|
targ_defvec=bfd_elf64_s390_vec
|
||||||
want64=true
|
want64=true
|
||||||
;;
|
;;
|
||||||
#endif
|
|
||||||
|
|
||||||
score*-*-elf*)
|
score*-*-elf*)
|
||||||
targ_defvec=bfd_elf32_bigscore_vec
|
targ_defvec=bfd_elf32_bigscore_vec
|
||||||
targ_selvecs=bfd_elf32_littlescore_vec
|
targ_selvecs=bfd_elf32_littlescore_vec
|
||||||
;;
|
;;
|
||||||
|
|
||||||
#ifdef BFD64
|
|
||||||
sh64l*-*-elf*)
|
sh64l*-*-elf*)
|
||||||
targ_defvec=bfd_elf32_sh64l_vec
|
targ_defvec=bfd_elf32_sh64l_vec
|
||||||
targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
|
targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
|
||||||
|
4
bfd/configure
vendored
4
bfd/configure
vendored
@ -21027,8 +21027,8 @@ do
|
|||||||
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
||||||
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
||||||
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
|
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
|
||||||
bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
|
bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||||
bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
|
bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||||
# FIXME: We include cofflink.lo not because it's needed for
|
# FIXME: We include cofflink.lo not because it's needed for
|
||||||
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
|
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
|
||||||
# which needs it but does not list it. Should be fixed in right place.
|
# which needs it but does not list it. Should be fixed in right place.
|
||||||
|
@ -748,8 +748,8 @@ do
|
|||||||
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
||||||
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
|
||||||
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
|
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
|
||||||
bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
|
bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||||
bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;;
|
bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;;
|
||||||
# FIXME: We include cofflink.lo not because it's needed for
|
# FIXME: We include cofflink.lo not because it's needed for
|
||||||
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
|
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
|
||||||
# which needs it but does not list it. Should be fixed in right place.
|
# which needs it but does not list it. Should be fixed in right place.
|
||||||
|
@ -980,8 +980,10 @@ static const bfd_target * const _bfd_target_vector[] =
|
|||||||
&bfd_elf32_powerpc_vxworks_vec,
|
&bfd_elf32_powerpc_vxworks_vec,
|
||||||
&bfd_elf32_powerpcle_vec,
|
&bfd_elf32_powerpcle_vec,
|
||||||
&bfd_elf32_s390_vec,
|
&bfd_elf32_s390_vec,
|
||||||
|
#ifdef BFD64
|
||||||
&bfd_elf32_bigscore_vec,
|
&bfd_elf32_bigscore_vec,
|
||||||
&bfd_elf32_littlescore_vec,
|
&bfd_elf32_littlescore_vec,
|
||||||
|
#endif
|
||||||
&bfd_elf32_sh_vec,
|
&bfd_elf32_sh_vec,
|
||||||
&bfd_elf32_shblin_vec,
|
&bfd_elf32_shblin_vec,
|
||||||
&bfd_elf32_shl_vec,
|
&bfd_elf32_shl_vec,
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "sysdep.h"
|
#include "sysdep.h"
|
||||||
#include "dis-asm.h"
|
#include "dis-asm.h"
|
||||||
#define DEFINE_TABLE
|
#define DEFINE_TABLE
|
||||||
/*****************************************************************************/
|
|
||||||
#include "opintl.h"
|
#include "opintl.h"
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
|
||||||
@ -34,7 +33,7 @@
|
|||||||
#include "elf/internal.h"
|
#include "elf/internal.h"
|
||||||
#include "elf/score.h"
|
#include "elf/score.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
#ifdef BFD64
|
||||||
/* s3_s7: opcodes and export prototypes. */
|
/* s3_s7: opcodes and export prototypes. */
|
||||||
extern int
|
extern int
|
||||||
s7_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little);
|
s7_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little);
|
||||||
@ -475,7 +474,7 @@ static struct score_opcode score_opcodes[] =
|
|||||||
{0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"},
|
{0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"},
|
||||||
{0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"},
|
{0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"},
|
||||||
};
|
};
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef streq
|
#ifndef streq
|
||||||
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
||||||
@ -520,7 +519,7 @@ print_insn_score48 (struct disassemble_info *info, bfd_vma given)
|
|||||||
|
|
||||||
for (insn = score_opcodes; insn->assembler; insn++)
|
for (insn = score_opcodes; insn->assembler; insn++)
|
||||||
{
|
{
|
||||||
/* using insn->mask &0xff00000000 to distinguish 48/32 bit */
|
/* Using insn->mask &0xff00000000 to distinguish 48/32 bit. */
|
||||||
if (((insn->mask & 0xff0000000000LL)!=0) && (given & insn->mask) == insn->value)
|
if (((insn->mask & 0xff0000000000LL)!=0) && (given & insn->mask) == insn->value)
|
||||||
{
|
{
|
||||||
info->bytes_per_chunk = 2;
|
info->bytes_per_chunk = 2;
|
||||||
@ -664,7 +663,7 @@ print_insn_score48 (struct disassemble_info *info, bfd_vma given)
|
|||||||
func (stream, _("<illegal instruction>"));
|
func (stream, _("<illegal instruction>"));
|
||||||
return 6;
|
return 6;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -675,7 +674,7 @@ print_insn_score32 (bfd_vma pc, struct disassemble_info *info, long given)
|
|||||||
{
|
{
|
||||||
struct score_opcode *insn;
|
struct score_opcode *insn;
|
||||||
void *stream = info->stream;
|
void *stream = info->stream;
|
||||||
int rb_equal_zero=1;
|
int rb_equal_zero=1;
|
||||||
fprintf_ftype func = info->fprintf_func;
|
fprintf_ftype func = info->fprintf_func;
|
||||||
|
|
||||||
for (insn = score_opcodes; insn->assembler; insn++)
|
for (insn = score_opcodes; insn->assembler; insn++)
|
||||||
@ -1033,6 +1032,7 @@ print_insn_score16 (bfd_vma pc, struct disassemble_info *info, long given)
|
|||||||
func (stream, _("<illegal instruction>"));
|
func (stream, _("<illegal instruction>"));
|
||||||
return 2;
|
return 2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* No match. */
|
/* No match. */
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
@ -1044,11 +1044,11 @@ s3_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
|
|||||||
{
|
{
|
||||||
unsigned char b[6];
|
unsigned char b[6];
|
||||||
bfd_vma given,given_h , given_l, given_16, given_32, given_48;
|
bfd_vma given,given_h , given_l, given_16, given_32, given_48;
|
||||||
|
|
||||||
bfd_vma ridparity;
|
bfd_vma ridparity;
|
||||||
int status;
|
int status;
|
||||||
void *stream = info->stream;
|
void *stream = info->stream;
|
||||||
fprintf_ftype func = info->fprintf_func;
|
fprintf_ftype func = info->fprintf_func;
|
||||||
|
|
||||||
info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
|
info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
|
||||||
info->bytes_per_chunk = 2;
|
info->bytes_per_chunk = 2;
|
||||||
status = info->read_memory_func (pc, (bfd_byte *) & b[0], 4, info);
|
status = info->read_memory_func (pc, (bfd_byte *) & b[0], 4, info);
|
||||||
@ -1075,7 +1075,7 @@ s3_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
|
|||||||
/* Set given_16. */
|
/* Set given_16. */
|
||||||
given_16 = given;
|
given_16 = given;
|
||||||
|
|
||||||
/* judge if now is insn_16_p */
|
/* Judge if now is insn_16_p. */
|
||||||
if ((given & 0x8000)==0)
|
if ((given & 0x8000)==0)
|
||||||
return print_insn_score16 (pc, info, given);
|
return print_insn_score16 (pc, info, given);
|
||||||
|
|
||||||
@ -1093,7 +1093,7 @@ s3_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
|
|||||||
/* Set given_32. */
|
/* Set given_32. */
|
||||||
given_32 = given;
|
given_32 = given;
|
||||||
|
|
||||||
/* judge if now is insn_32 */
|
/* Judge if now is insn_32. */
|
||||||
if ((given &0x80008000)==0x80000000)
|
if ((given &0x80008000)==0x80000000)
|
||||||
{
|
{
|
||||||
/* Get rid of parity. */
|
/* Get rid of parity. */
|
||||||
@ -1104,7 +1104,7 @@ s3_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the insn is 48 bit */
|
/* The insn is 48 bit. */
|
||||||
status = info->read_memory_func (pc, (bfd_byte *) & b[0], 6, info);
|
status = info->read_memory_func (pc, (bfd_byte *) & b[0], 6, info);
|
||||||
if (status != 0)
|
if (status != 0)
|
||||||
{
|
{
|
||||||
@ -1140,7 +1140,6 @@ s3_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check 0x800080008000, 0x80008000, 0x8000. */
|
/* Check 0x800080008000, 0x80008000, 0x8000. */
|
||||||
|
|
||||||
if ((given_48 & 0x800080008000LL) != 0x800080000000LL)
|
if ((given_48 & 0x800080008000LL) != 0x800080000000LL)
|
||||||
{
|
{
|
||||||
#if (SCORE_SIMULATOR_ACTIVE)
|
#if (SCORE_SIMULATOR_ACTIVE)
|
||||||
@ -1194,3 +1193,18 @@ print_insn_little_score (bfd_vma pc, struct disassemble_info *info)
|
|||||||
else
|
else
|
||||||
return s7_print_insn (pc, info, TRUE);
|
return s7_print_insn (pc, info, TRUE);
|
||||||
}
|
}
|
||||||
|
#else /* not BFD64 */
|
||||||
|
int
|
||||||
|
print_insn_big_score (bfd_vma pc ATTRIBUTE_UNUSED,
|
||||||
|
struct disassemble_info * info ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
print_insn_little_score (bfd_vma pc ATTRIBUTE_UNUSED,
|
||||||
|
struct disassemble_info * info ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user