From 05cedcf6c14a80362a47750f56ad4ebb4d676e11 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 30 Nov 1994 01:29:26 +0000 Subject: [PATCH] Initial ARC support. --- bfd/.Sanitize | 36 ++++++++++++++++++++++++++++++++++++ bfd/ChangeLog | 9 +++++++++ bfd/bfd-in2.h | 14 +++++++++++++- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/bfd/.Sanitize b/bfd/.Sanitize index c5f1dae..ff20bb2 100644 --- a/bfd/.Sanitize +++ b/bfd/.Sanitize @@ -31,6 +31,14 @@ else lose_these_too="${rce_files} ${lose_these_too}" fi +arc_files="cpu-arc.c elf32-arc.c" + +if ( echo $* | grep keep\-arc > /dev/null ) ; then + keep_these_too="${arc_files} ${keep_these_too}" +else + lose_these_too="${arc_files} ${lose_these_too}" +fi + # All files listed between the "Things-to-keep:" line and the # "Files-to-sed:" line will be kept. All other files will be removed. # Directories listed in this section will have their own Sanitize @@ -291,6 +299,34 @@ else done fi +arc_files="ChangeLog archures.c reloc.c targets.c config.bfd configure.in bfd-in2.h elfcode.h libbfd.h" +if ( echo $* | grep keep\-arc > /dev/null ) ; then + for i in $arc_files ; do + if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Keeping arc stuff in $i + fi + fi + done +else + for i in $arc_files ; do + if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then + if [ -n "${verbose}" ] ; then + echo Removing traces of \"arc\" from $i... + fi + cp $i new + sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new + if [ -n "${safe}" -a ! -f .Recover/$i ] ; then + if [ -n "${verbose}" ] ; then + echo Caching $i in .Recover... + fi + mv $i .Recover + fi + mv new $i + fi + done +fi + for i in * ; do if test ! -d $i && (grep sanitize $i > /dev/null) ; then echo '***' Some mentions of Sanitize are still left in $i! 1>&2 diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 24dc49f..186697c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +start-sanitize-arc +Tue Nov 29 17:14:21 1994 Doug Evans + + * archures.c: Initial support for the ARC. + * reloc.c, targets.c, config.bfd, configure.in, elfcode.h: Likewise. + * bfd-in2.h: Regenerated. + * libbfd.h: Likewise. +end-sanitize-arc + Tue Nov 29 14:00:19 1994 J.T. Conklin * config.bfd (i[345]86-*-freebsd*): Use i386-bsd as bfd_name. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index ae32bae..6a25c59 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1028,8 +1028,11 @@ enum bfd_architecture bfd_arch_arm, /* Advanced Risc Machines ARM */ bfd_arch_ns32k, /* National Semiconductors ns32000 */ /* start-sanitize-rce */ - bfd_arch_rce, /* Experimental Motorola RCE */ + bfd_arch_rce, /* Motorola RCE */ /* end-sanitize-rce */ + /* start-sanitize-arc */ + bfd_arch_arc, /* Argonaut RISC Core */ + /* end-sanitize-arc */ bfd_arch_last }; @@ -1510,6 +1513,15 @@ not stored in the instruction. */ BFD_RELOC_ARM_SWI, BFD_RELOC_ARM_MULTI, BFD_RELOC_ARM_CP_OFF_IMM, +/* start-sanitize-arc */ + +/* Argonaut RISC Core (ARC) relocs. +ARC 22 bit pc-relative branch. The lowest two bits must be zero and are +not stored in the instruction. High 20 bits installed in bits 7 through 26 +of instruction. */ + BFD_RELOC_ARC_B22_PCREL, +/* end-sanitize-arc */ + BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; const struct reloc_howto_struct * -- 2.7.4