diff options
author | Anthony Green <green@moxielogic.com> | 2014-07-27 08:51:20 -0400 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2014-07-27 08:51:20 -0400 |
commit | 48494700d58ee0dc781d288191679072cbaf9d16 (patch) | |
tree | e08d09f8663a2c6afcdb3cf783b310b79461fc88 /gas | |
parent | e76c5d173bbf7137555919dd136004a7c0118af7 (diff) | |
download | gdb-48494700d58ee0dc781d288191679072cbaf9d16.zip gdb-48494700d58ee0dc781d288191679072cbaf9d16.tar.gz gdb-48494700d58ee0dc781d288191679072cbaf9d16.tar.bz2 |
Add moxiebox target
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-moxie.c | 5 | ||||
-rw-r--r-- | gas/config/tc-moxie.h | 6 | ||||
-rw-r--r-- | gas/configure.tgt | 5 |
4 files changed, 16 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1861e37..d094926 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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> * config/bfin-parse.y: Don't include obstack.h. diff --git a/gas/config/tc-moxie.c b/gas/config/tc-moxie.c index 430a144..02a59b7 100644 --- a/gas/config/tc-moxie.c +++ b/gas/config/tc-moxie.c @@ -46,7 +46,6 @@ static valueT md_chars_to_number (char * buf, int n); /* Byte order. */ extern int target_big_endian; -const char *moxie_target_format = DEFAULT_TARGET_FORMAT; void md_operand (expressionS *op __attribute__((unused))) @@ -75,6 +74,8 @@ md_begin (void) for (count = 0, opcode = moxie_form3_opc_info; count++ < 10; 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); } @@ -617,11 +618,9 @@ md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED) { case OPTION_EB: target_big_endian = 1; - moxie_target_format = "elf32-bigmoxie"; break; case OPTION_EL: target_big_endian = 0; - moxie_target_format = "elf32-littlemoxie"; break; default: return 0; diff --git a/gas/config/tc-moxie.h b/gas/config/tc-moxie.h index d5a24cd..ed4f273 100644 --- a/gas/config/tc-moxie.h +++ b/gas/config/tc-moxie.h @@ -19,13 +19,13 @@ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #define TC_MOXIE 1 +#ifndef TARGET_BYTES_BIG_ENDIAN #define TARGET_BYTES_BIG_ENDIAN 1 +#endif #define WORKING_DOT_WORD /* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */ -const char *moxie_target_format; -#define DEFAULT_TARGET_FORMAT "elf32-bigmoxie" -#define TARGET_FORMAT moxie_target_format +#define TARGET_FORMAT (target_big_endian ? "elf32-bigmoxie" : "elf32-littlemoxie") #define TARGET_ARCH bfd_arch_moxie diff --git a/gas/configure.tgt b/gas/configure.tgt index 7ef0c06..877f34d 100644 --- a/gas/configure.tgt +++ b/gas/configure.tgt @@ -339,9 +339,10 @@ case ${generic_target} in mn10300-*-linux*) fmt=elf em=linux ;; mn10300-*-*) fmt=elf ;; - moxie-*-uclinux) fmt=elf em=linux;; + moxie-*-uclinux) fmt=elf em=linux ;; + moxie-*-moxiebox*) fmt=elf endian=little ;; moxie-*-*) fmt=elf ;; - + mt-*-elf) fmt=elf bfd_gas=yes ;; msp430-*-*) fmt=elf ;; |