/* tc-rx.c -- Assembler for the Renesas RX
- Copyright 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2008-2015 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#include "as.h"
#include "struc-symbol.h"
-#include "obstack.h"
#include "safe-ctype.h"
#include "dwarf2dbg.h"
#include "libbfd.h"
int rx_pid_register;
int rx_gp_register;
+enum rx_cpu_types rx_cpu = RX600;
+
static void rx_fetchalign (int ignore ATTRIBUTE_UNUSED);
enum options
OPTION_INT_REGS,
OPTION_USES_GCC_ABI,
OPTION_USES_RX_ABI,
+ OPTION_CPU,
};
#define RX_SHORTOPTS ""
{"mint-register", required_argument, NULL, OPTION_INT_REGS},
{"mgcc-abi", no_argument, NULL, OPTION_USES_GCC_ABI},
{"mrx-abi", no_argument, NULL, OPTION_USES_RX_ABI},
+ {"mcpu",required_argument,NULL,OPTION_CPU},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
case OPTION_USES_RX_ABI:
elf_flags |= E_FLAG_RX_ABI;
return 1;
+
+ case OPTION_CPU:
+ if (strcasecmp (arg, "rx100") == 0)
+ rx_cpu = RX100;
+ else if (strcasecmp (arg, "rx200") == 0)
+ rx_cpu = RX200;
+ else if (strcasecmp (arg, "rx600") == 0)
+ rx_cpu = RX600;
+ else if (strcasecmp (arg, "rx610") == 0)
+ rx_cpu = RX610;
+ else
+ {
+ as_warn (_("unrecognised RX CPU type %s"), arg);
+ break;
+ }
+ return 1;
}
return 0;
}
fprintf (stream, _(" --mrelax\n"));
fprintf (stream, _(" --mpid\n"));
fprintf (stream, _(" --mint-register=<value>\n"));
+ fprintf (stream, _(" --mcpu=<rx100|rx200|rx600|rx610>\n"));
}
static void
char * path;
char * filename;
char * current_filename;
- char * eof;
+ char * last_char;
char * p;
char * d;
char * f;
/* Get the filename. Spaces are allowed, NUL characters are not. */
filename = input_line_pointer;
- eof = find_end_of_line (filename, FALSE);
- input_line_pointer = eof;
-
- while (eof >= filename && (* eof == ' ' || * eof == '\n'))
- -- eof;
- end_char = *(++ eof);
- * eof = 0;
- if (eof == filename)
+ last_char = find_end_of_line (filename, FALSE);
+ input_line_pointer = last_char;
+
+ while (last_char >= filename && (* last_char == ' ' || * last_char == '\n'))
+ -- last_char;
+ end_char = *(++ last_char);
+ * last_char = 0;
+ if (last_char == filename)
{
as_bad (_("no filename following .INCLUDE pseudo-op"));
- * eof = end_char;
+ * last_char = end_char;
return;
}
input_scrub_insert_file (path);
}
- * eof = end_char;
+ * last_char = end_char;
}
static void
rx_cons_fix_new (fragS * frag,
int where,
int size,
- expressionS * exp)
+ expressionS * exp,
+ bfd_reloc_code_real_type type)
{
- bfd_reloc_code_real_type type;
-
switch (size)
{
case 1: