diff options
author | Nick Clifton <nickc@redhat.com> | 2009-03-18 16:58:33 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-03-18 16:58:33 +0000 |
commit | 02b1cb404ae0993f5a5cef356c63ab11698fb7ab (patch) | |
tree | fdd0dddbcd52f9ec19da170ac18a46d1bc4a2244 | |
parent | 89ecc4f5e7ea0ba1918d92c5b251bbfd18eb9764 (diff) | |
download | gdb-02b1cb404ae0993f5a5cef356c63ab11698fb7ab.zip gdb-02b1cb404ae0993f5a5cef356c63ab11698fb7ab.tar.gz gdb-02b1cb404ae0993f5a5cef356c63ab11698fb7ab.tar.bz2 |
* 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.
-rw-r--r-- | bfd/Makefile.am | 8 | ||||
-rw-r--r-- | bfd/Makefile.in | 8 | ||||
-rw-r--r-- | bfd/config.bfd | 2 | ||||
-rwxr-xr-x | bfd/configure | 4 | ||||
-rw-r--r-- | bfd/configure.in | 4 | ||||
-rw-r--r-- | bfd/targets.c | 4 | ||||
-rw-r--r-- | opcodes/score-dis.c | 36 |
7 files changed, 40 insertions, 26 deletions
diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 62fae5b..c55450e 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -288,8 +288,6 @@ BFD32_BACKENDS = \ elf32-pj.lo \ elf32-ppc.lo \ elf32-s390.lo \ - elf32-score.lo \ - elf32-score7.lo \ elf32-sh.lo \ elf32-sh-symbian.lo \ elf32-sh64.lo \ @@ -474,8 +472,6 @@ BFD32_BACKENDS_CFILES = \ elf32-sh64.c \ elf32-sh64-com.c \ elf32-s390.c \ - elf32-score.c \ - elf32-score7.c \ elf32-sh.c \ elf32-sh-symbian.c \ elfxx-sparc.c \ @@ -588,6 +584,8 @@ BFD64_BACKENDS = \ elfn32-mips.lo \ elf64-mips.lo \ elf64-mmix.lo \ + elf32-score.lo \ + elf32-score7.lo \ elf64-sh64.lo \ elf64-ppc.lo \ elf64-s390.lo \ @@ -623,6 +621,8 @@ BFD64_BACKENDS_CFILES = \ elf64-mmix.c \ elf64-ppc.c \ elf64-s390.c \ + elf32-score.c \ + elf32-score7.c \ elf64-sh64.c \ elf64-sparc.c \ elf64.c \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index b011252..190888e 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -555,8 +555,6 @@ BFD32_BACKENDS = \ elf32-pj.lo \ elf32-ppc.lo \ elf32-s390.lo \ - elf32-score.lo \ - elf32-score7.lo \ elf32-sh.lo \ elf32-sh-symbian.lo \ elf32-sh64.lo \ @@ -741,8 +739,6 @@ BFD32_BACKENDS_CFILES = \ elf32-sh64.c \ elf32-sh64-com.c \ elf32-s390.c \ - elf32-score.c \ - elf32-score7.c \ elf32-sh.c \ elf32-sh-symbian.c \ elfxx-sparc.c \ @@ -856,6 +852,8 @@ BFD64_BACKENDS = \ elfn32-mips.lo \ elf64-mips.lo \ elf64-mmix.lo \ + elf32-score.lo \ + elf32-score7.lo \ elf64-sh64.lo \ elf64-ppc.lo \ elf64-s390.lo \ @@ -891,6 +889,8 @@ BFD64_BACKENDS_CFILES = \ elf64-mmix.c \ elf64-ppc.c \ elf64-s390.c \ + elf32-score.c \ + elf32-score7.c \ elf64-sh64.c \ elf64-sparc.c \ elf64.c \ diff --git a/bfd/config.bfd b/bfd/config.bfd index 8a448fa..9082658 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1192,14 +1192,12 @@ case "${targ}" in targ_defvec=bfd_elf64_s390_vec want64=true ;; -#endif score*-*-elf*) targ_defvec=bfd_elf32_bigscore_vec targ_selvecs=bfd_elf32_littlescore_vec ;; -#ifdef BFD64 sh64l*-*-elf*) 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" diff --git a/bfd/configure b/bfd/configure index a45eef3..288137b 100755 --- a/bfd/configure +++ b/bfd/configure @@ -21027,8 +21027,8 @@ do 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_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_littlescore_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; target_size=64;; # 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 # which needs it but does not list it. Should be fixed in right place. diff --git a/bfd/configure.in b/bfd/configure.in index df52026..5704a0d 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -748,8 +748,8 @@ do 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_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_littlescore_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; target_size=64;; # 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 # which needs it but does not list it. Should be fixed in right place. diff --git a/bfd/targets.c b/bfd/targets.c index 2eab663..aef9c29 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -980,8 +980,10 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf32_powerpc_vxworks_vec, &bfd_elf32_powerpcle_vec, &bfd_elf32_s390_vec, +#ifdef BFD64 &bfd_elf32_bigscore_vec, - &bfd_elf32_littlescore_vec, + &bfd_elf32_littlescore_vec, +#endif &bfd_elf32_sh_vec, &bfd_elf32_shblin_vec, &bfd_elf32_shl_vec, diff --git a/opcodes/score-dis.c b/opcodes/score-dis.c index 732ddfb..02405e4 100644 --- a/opcodes/score-dis.c +++ b/opcodes/score-dis.c @@ -25,7 +25,6 @@ #include "sysdep.h" #include "dis-asm.h" #define DEFINE_TABLE -/*****************************************************************************/ #include "opintl.h" #include "bfd.h" @@ -34,7 +33,7 @@ #include "elf/internal.h" #include "elf/score.h" -/*****************************************************************************/ +#ifdef BFD64 /* s3_s7: opcodes and export prototypes. */ extern int 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"}, {0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"}, }; -/*****************************************************************************/ + #ifndef streq #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++) { - /* 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) { info->bytes_per_chunk = 2; @@ -664,7 +663,7 @@ print_insn_score48 (struct disassemble_info *info, bfd_vma given) func (stream, _("<illegal instruction>")); return 6; #endif - + abort (); } @@ -675,7 +674,7 @@ print_insn_score32 (bfd_vma pc, struct disassemble_info *info, long given) { struct score_opcode *insn; void *stream = info->stream; - int rb_equal_zero=1; + int rb_equal_zero=1; fprintf_ftype func = info->fprintf_func; 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>")); return 2; #endif + /* No match. */ abort (); } @@ -1044,11 +1044,11 @@ s3_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) { unsigned char b[6]; bfd_vma given,given_h , given_l, given_16, given_32, given_48; - bfd_vma ridparity; int status; void *stream = info->stream; fprintf_ftype func = info->fprintf_func; + info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG; info->bytes_per_chunk = 2; 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. */ given_16 = given; - /* judge if now is insn_16_p */ + /* Judge if now is insn_16_p. */ if ((given & 0x8000)==0) 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. */ given_32 = given; - /* judge if now is insn_32 */ + /* Judge if now is insn_32. */ if ((given &0x80008000)==0x80000000) { /* 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); if (status != 0) { @@ -1140,7 +1140,6 @@ s3_print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) } /* Check 0x800080008000, 0x80008000, 0x8000. */ - if ((given_48 & 0x800080008000LL) != 0x800080000000LL) { #if (SCORE_SIMULATOR_ACTIVE) @@ -1194,3 +1193,18 @@ print_insn_little_score (bfd_vma pc, struct disassemble_info *info) else 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 |