Add moxiebox target

This commit is contained in:
Anthony Green 2014-07-27 08:51:20 -04:00
parent e76c5d173b
commit 48494700d5
11 changed files with 52 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2014-07-27 Anthony Green <green@moxielogic.org>
* config.bfd: Add moxie-*-moxiebox*.
2014-07-21 Joel Sherrill <joel.sherrill@oarcorp.com> 2014-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
Add or reactivate or1k-*-rtems* Add or reactivate or1k-*-rtems*

View File

@ -446,6 +446,10 @@ case "${targ}" in
targ_selvecs=moxie_elf32_le_vec targ_selvecs=moxie_elf32_le_vec
;; ;;
moxie-*-moxiebox*)
targ_defvec=moxie_elf32_le_vec
;;
h8300*-*-rtemscoff*) h8300*-*-rtemscoff*)
targ_defvec=h8300_coff_vec targ_defvec=h8300_coff_vec
targ_underscore=yes targ_underscore=yes

View File

@ -1,3 +1,11 @@
2014-07-27 Anthony Green <green@moxielogic.com>
* configure.tgt (generic_target): Add moxie-*-moxiebox*
* config/tc-moxie.c: Remove moxie_target_format.
(md_begin): Set default target_big_endian.
* config/tc-moxie.h: Only set TARGET_BYTES_BIG_ENDIAN if unset.
(TARGET_FORMAT): Set based on target_big_endian.
2014-07-26 Alan Modra <amodra@gmail.com> 2014-07-26 Alan Modra <amodra@gmail.com>
* config/bfin-parse.y: Don't include obstack.h. * config/bfin-parse.y: Don't include obstack.h.

View File

@ -46,7 +46,6 @@ static valueT md_chars_to_number (char * buf, int n);
/* Byte order. */ /* Byte order. */
extern int target_big_endian; extern int target_big_endian;
const char *moxie_target_format = DEFAULT_TARGET_FORMAT;
void void
md_operand (expressionS *op __attribute__((unused))) md_operand (expressionS *op __attribute__((unused)))
@ -75,6 +74,8 @@ md_begin (void)
for (count = 0, opcode = moxie_form3_opc_info; count++ < 10; opcode++) for (count = 0, opcode = moxie_form3_opc_info; count++ < 10; opcode++)
hash_insert (opcode_hash_control, opcode->name, (char *) opcode); hash_insert (opcode_hash_control, opcode->name, (char *) opcode);
target_big_endian = TARGET_BYTES_BIG_ENDIAN;
bfd_set_arch_mach (stdoutput, TARGET_ARCH, 0); bfd_set_arch_mach (stdoutput, TARGET_ARCH, 0);
} }
@ -617,11 +618,9 @@ md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
{ {
case OPTION_EB: case OPTION_EB:
target_big_endian = 1; target_big_endian = 1;
moxie_target_format = "elf32-bigmoxie";
break; break;
case OPTION_EL: case OPTION_EL:
target_big_endian = 0; target_big_endian = 0;
moxie_target_format = "elf32-littlemoxie";
break; break;
default: default:
return 0; return 0;

View File

@ -19,13 +19,13 @@
Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#define TC_MOXIE 1 #define TC_MOXIE 1
#ifndef TARGET_BYTES_BIG_ENDIAN
#define TARGET_BYTES_BIG_ENDIAN 1 #define TARGET_BYTES_BIG_ENDIAN 1
#endif
#define WORKING_DOT_WORD #define WORKING_DOT_WORD
/* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */ /* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */
const char *moxie_target_format; #define TARGET_FORMAT (target_big_endian ? "elf32-bigmoxie" : "elf32-littlemoxie")
#define DEFAULT_TARGET_FORMAT "elf32-bigmoxie"
#define TARGET_FORMAT moxie_target_format
#define TARGET_ARCH bfd_arch_moxie #define TARGET_ARCH bfd_arch_moxie

View File

@ -339,9 +339,10 @@ case ${generic_target} in
mn10300-*-linux*) fmt=elf em=linux ;; mn10300-*-linux*) fmt=elf em=linux ;;
mn10300-*-*) fmt=elf ;; mn10300-*-*) fmt=elf ;;
moxie-*-uclinux) fmt=elf em=linux;; moxie-*-uclinux) fmt=elf em=linux ;;
moxie-*-moxiebox*) fmt=elf endian=little ;;
moxie-*-*) fmt=elf ;; moxie-*-*) fmt=elf ;;
mt-*-elf) fmt=elf bfd_gas=yes ;; mt-*-elf) fmt=elf bfd_gas=yes ;;
msp430-*-*) fmt=elf ;; msp430-*-*) fmt=elf ;;

View File

@ -1,3 +1,11 @@
2014-07-27 Anthony Green <green@moxielogic.com>
* Makefile.am (ALL_EMULATION_SOURCES): Add moxiebox support.
(emoxiebox.c): Build.
* configure.tgt (targ_extra_ofiles): Add moxie-*-moxiebox*.
* emulparams/moxiebox.sh (TEXT_START_ADDR): New file.
* Makefile.in: Rebuilt.
2014-07-17 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> 2014-07-17 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
* emulparams/elf32or1k_linux.sh (TEXT_START_ADDR): Increase from * emulparams/elf32or1k_linux.sh (TEXT_START_ADDR): Increase from

View File

@ -247,6 +247,7 @@ ALL_EMULATION_SOURCES = \
eelf32microblazeel.c \ eelf32microblazeel.c \
eelf32microblaze.c \ eelf32microblaze.c \
eelf32moxie.c \ eelf32moxie.c \
emoxiebox.c \
eelf32mt.c \ eelf32mt.c \
eelf32or1k.c \ eelf32or1k.c \
eelf32or1k_linux.c \ eelf32or1k_linux.c \
@ -1160,6 +1161,9 @@ eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \ eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
$(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
emoxiebox.c: $(srcdir)/emulparams/moxiebox.sh \
$(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \ eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
$(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}

View File

@ -555,6 +555,7 @@ ALL_EMULATION_SOURCES = \
eelf32microblazeel.c \ eelf32microblazeel.c \
eelf32microblaze.c \ eelf32microblaze.c \
eelf32moxie.c \ eelf32moxie.c \
emoxiebox.c \
eelf32mt.c \ eelf32mt.c \
eelf32or1k.c \ eelf32or1k.c \
eelf32or1k_linux.c \ eelf32or1k_linux.c \
@ -1173,6 +1174,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32microblazeel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32microblazeel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mipswindiss.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mipswindiss.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32moxie.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32moxie.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emoxiebox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Po@am__quote@
@ -2600,6 +2602,9 @@ eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \ eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
$(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
emoxiebox.c: $(srcdir)/emulparams/moxiebox.sh \
$(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \ eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
$(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}

View File

@ -188,6 +188,8 @@ fr30-*-*) targ_emul=elf32fr30
frv-*-*linux*) targ_emul=elf32frvfd ;; frv-*-*linux*) targ_emul=elf32frvfd ;;
frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd" frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
;; ;;
moxie-*-moxiebox*) targ_emul=moxiebox
;;
moxie-*-*) targ_emul=elf32moxie moxie-*-*) targ_emul=elf32moxie
;; ;;
h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*) h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)

View File

@ -0,0 +1,9 @@
SCRIPT_NAME=elf
TEMPLATE_NAME=generic
EXTRA_EM_FILE=genelf
OUTPUT_FORMAT="elf32-littlemoxie"
TEXT_START_ADDR=0x1000
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ARCH=moxie
EMBEDDED=yes
STACK_ADDR=0x400000