diff options
author | Nick Clifton <nickc@redhat.com> | 1997-09-08 22:03:09 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1997-09-08 22:03:09 +0000 |
commit | 8816811b859e4f63d44a43f57a8c86ecde3c2f25 (patch) | |
tree | 12b309107d4930642f22d34bce3ac081b9c6bf2a /gas/config | |
parent | 19a1867285d669b892939d9205d58bc7d200da78 (diff) | |
download | gdb-8816811b859e4f63d44a43f57a8c86ecde3c2f25.zip gdb-8816811b859e4f63d44a43f57a8c86ecde3c2f25.tar.gz gdb-8816811b859e4f63d44a43f57a8c86ecde3c2f25.tar.bz2 |
Add command line option to specify processor type.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-v850.c | 69 | ||||
-rw-r--r-- | gas/config/tc-v850.h | 16 |
2 files changed, 63 insertions, 22 deletions
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 6bf5c2c..cb200a5 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -31,9 +31,12 @@ static bfd_reloc_code_real_type hold_cons_reloc; /* Set to TRUE if we want to be pedantic about signed overflows. */ -static boolean warn_signed_overflows = FALSE; +static boolean warn_signed_overflows = FALSE; static boolean warn_unsigned_overflows = FALSE; +/* Indicates the target processor type. */ +static int machine = TARGET_MACHINE; + /* Structure to hold information about predefined registers. */ struct reg_name @@ -763,7 +766,15 @@ md_show_usage (stream) FILE *stream; { fprintf (stream, "V850 options:\n"); - fprintf (stream, "\t-wsigned_overflow Warn if signed immediate values overflow\n"); + fprintf (stream, "\t-wsigned_overflow Warn if signed immediate values overflow\n"); + fprintf (stream, "\t-wunsigned_overflow Warn if unsigned immediate values overflow\n"); + fprintf (stream, "\t-mv850 The code is targeted at the v850\n"); +/* start-sanitize-v850e */ + fprintf (stream, "\t-mv850e The code is targeted at the v850e\n"); +/* end-sanitize-v850e */ +/* start-sanitize-v850eq */ + fprintf (stream, "\t-mv850eq The code is targeted at the v850eq\n"); +/* end-sanitize-v850eq */ } int @@ -771,18 +782,44 @@ md_parse_option (c, arg) int c; char * arg; { - if (c == 'w' && strcmp (arg, "signed_overflow") == 0) + switch (c) { - warn_signed_overflows = TRUE; - return 1; - } + case 'w': + if (strcmp (arg, "signed_overflow") == 0) + { + warn_signed_overflows = TRUE; + return 1; + } + else if (strcmp (arg, "unsigned_overflow") == 0) + { + warn_unsigned_overflows = TRUE; + return 1; + } + break; - if (c == 'w' && strcmp (arg, "unsigned_overflow") == 0) - { - warn_unsigned_overflows = TRUE; - return 1; + case 'm': + if (strcmp (arg, "v850") == 0) + { + machine = 0; + return 1; + } +/* start-sanitize-v850e */ + else if (strcmp (arg, "v850e") == 0) + { + machine = bfd_mach_v850e; + return 1; + } +/* end-sanitize-v850e */ +/* start-sanitize-v850eq */ + else if (strcmp (arg, "v850eq") == 0) + { + machine = bfd_mach_v850eq; + return 1; + } +/* end-sanitize-v850eq */ + break; } - + return 0; } @@ -907,14 +944,8 @@ md_begin () } op++; } - - bfd_set_arch_mach (stdoutput, TARGET_ARCH, 0); - /* start-sanitize-v850e */ - bfd_set_arch_mach (stdoutput, TARGET_ARCH, bfd_mach_v850e); - /* end-sanitize-v850e */ - /* start-sanitize-v850eq */ - bfd_set_arch_mach (stdoutput, TARGET_ARCH, bfd_mach_v850eq); - /* end-sanitize-v850eq */ + + bfd_set_arch_mach (stdoutput, TARGET_ARCH, machine); applicable = bfd_applicable_section_flags (stdoutput); diff --git a/gas/config/tc-v850.h b/gas/config/tc-v850.h index cfd6cfa..31baf0b 100644 --- a/gas/config/tc-v850.h +++ b/gas/config/tc-v850.h @@ -27,9 +27,19 @@ #endif /* The target BFD architecture. */ -#define TARGET_ARCH bfd_arch_v850 - -#define TARGET_FORMAT "elf32-v850" +#define TARGET_ARCH bfd_arch_v850 + +#define TARGET_FORMAT "elf32-v850" + +#define TARGET_MACHINE 0 +/* start-sanitize-v850e */ +#undef TARGET_MACHINE +#define TARGET_MACHINE bfd_mach_v850e +/* end-sanitize-v850e */ +/* start-sanitize-v850eq */ +#undef TARGET_MACHINE +#define TARGET_MACHINE bfd_mach_v850eq +/* end-sanitize-v850eq */ #define MD_APPLY_FIX3 #define md_operand(x) |