aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arc.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-06-30 11:14:41 +0100
committerNick Clifton <nickc@redhat.com>2016-06-30 11:14:41 +0100
commit9004b6bd58b6203cb3d1de1ca8d6ce6fc140ae61 (patch)
treeda644cf9f56a80d9480c1bf94c67f2017ee5cd97 /gas/config/tc-arc.c
parent534dbe460e692a9befd9aca0eb0812db47459a30 (diff)
downloadfsf-binutils-gdb-9004b6bd58b6203cb3d1de1ca8d6ce6fc140ae61.zip
fsf-binutils-gdb-9004b6bd58b6203cb3d1de1ca8d6ce6fc140ae61.tar.gz
fsf-binutils-gdb-9004b6bd58b6203cb3d1de1ca8d6ce6fc140ae61.tar.bz2
Allow ARC target to be configured with --with-cpu=<cpu-name>.
gas * config.in (TARGET_WITH_CPU): Undefine. * configure.ac: Add --with-cpu support, and define in config.h. * configure: Regenerate. * config/tc-arc.c: Use TARGET_WITH_CPU to select default CPU. * NEWS: Mention new configure option.
Diffstat (limited to 'gas/config/tc-arc.c')
-rw-r--r--gas/config/tc-arc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 155d991..2046604 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -51,6 +51,10 @@
/* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6
+#ifndef TARGET_WITH_CPU
+#define TARGET_WITH_CPU "arc700"
+#endif /* TARGET_WITH_CPU */
+
/* Enum used to enumerate the relaxable ins operands. */
enum rlx_operand_type
{
@@ -2466,7 +2470,7 @@ md_begin (void)
const struct arc_opcode *opcode = arc_opcodes;
if (!mach_type_specified_p)
- arc_select_cpu ("arc700");
+ arc_select_cpu (TARGET_WITH_CPU);
/* The endianness can be chosen "at the factory". */
target_big_endian = byte_order == BIG_ENDIAN;
@@ -3401,7 +3405,8 @@ md_show_usage (FILE *stream)
{
fprintf (stream, _("ARC-specific assembler options:\n"));
- fprintf (stream, " -mcpu=<cpu name>\t assemble for CPU <cpu name>\n");
+ fprintf (stream, " -mcpu=<cpu name>\t assemble for CPU <cpu name> "
+ "(default: %s)\n", TARGET_WITH_CPU);
fprintf (stream, " -mcpu=nps400\t\t same as -mcpu=arc700 -mnps400\n");
fprintf (stream, " -mA6/-mARC600/-mARC601 same as -mcpu=arc600\n");
fprintf (stream, " -mA7/-mARC700\t\t same as -mcpu=arc700\n");