RX610.
* config/rx-parse.y: (rx_check_float_support): Add function to
check floating point operation support for target RX100 and
RX200.
* config/tc-rx.c: Add CPU options RX100, RX200, RX600, and RX610.
* doc/c-rx.texi: Add -mcpu option to recognize macros for RX100,
RX200, RX600, and RX610
+2013-07-18 Sandeep Kumar Singh <Sandeep.Singh2@kpitcummins.com>
+
+ * config/rx-defs.h: Add macros for RX100, RX200, RX600, and
+ RX610.
+ * config/rx-parse.y: (rx_check_float_support): Add function to
+ check floating point operation support for target RX100 and
+ RX200.
+ * config/tc-rx.c: Add CPU options RX100, RX200, RX600, and RX610.
+ * doc/c-rx.texi: Add -mcpu option to recognize macros for RX100,
+ RX200, RX600, and RX610
+
2013-07-18 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* config/tc-avr.c (md_show_usage): Add avrxmega2 to help text
/* rx-defs.h Renesas RX internal definitions
- Copyright 2008, 2009
- Free Software Foundation, Inc.
+ Copyright 2008-2013 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
02110-1301, USA. */
#ifndef RX_DEFS_H
-#define RX_DEFS_H
+#define RX_DEFS_H
/* Third operand to rx_op. */
#define RXREL_SIGNED 0
#define RX_RELAX_IMM 2
#define RX_RELAX_DISP 3
+enum rx_cpu_types
+{
+ RX600,
+ RX610,
+ RX200,
+ RX100
+};
+
extern int rx_pid_register;
extern int rx_gp_register;
+extern enum rx_cpu_types rx_cpu;
extern int rx_error (const char *);
extern void rx_lex_init (char *, char *);
extern char * rx_lex_start;
extern char * rx_lex_end;
-#endif
+
+#endif /* RX_DEFS_H */
/* rx-parse.y Renesas RX parser
- Copyright 2008, 2009
- Free Software Foundation, Inc.
+ Copyright 2008-2013 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define id24(a,b2,b3) B3 (0xfb+a, b2, b3)
+static void rx_check_float_support (void);
static int rx_intop (expressionS, int, int);
static int rx_uintop (expressionS, int);
static int rx_disp3op (expressionS);
;
-
float2_op
: '#' EXPR ',' REG
- { id24 (2, 0x72, sub_op << 4); F ($4, 20, 4); O4 ($2); }
+ { rx_check_float_support (); id24 (2, 0x72, sub_op << 4); F ($4, 20, 4); O4 ($2); }
| float2_op_ni
;
float2_op_ni
: REG ',' REG
- { id24 (1, 0x83 + (sub_op << 2), 0); F ($1, 16, 4); F ($3, 20, 4); }
+ { rx_check_float_support (); id24 (1, 0x83 + (sub_op << 2), 0); F ($1, 16, 4); F ($3, 20, 4); }
| disp '[' REG ']' opt_l ',' REG
- { id24 (1, 0x80 + (sub_op << 2), 0); F ($3, 16, 4); F ($7, 20, 4); DSP ($1, 14, LSIZE); }
+ { rx_check_float_support (); id24 (1, 0x80 + (sub_op << 2), 0); F ($3, 16, 4); F ($7, 20, 4); DSP ($1, 14, LSIZE); }
;
/* ====================================================================== */
if (val < minv || val > maxv)
as_warn (_("Value %d out of range %d..%d"), val, minv, maxv);
}
+
+static void
+rx_check_float_support (void)
+{
+ if (rx_cpu == RX100 || rx_cpu == RX200)
+ rx_error (_("target CPU type does not support floating point instructions"));
+}
/* tc-rx.c -- Assembler for the Renesas RX
- Copyright 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright 2008-2013 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
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
-@c Copyright 2008, 2009, 2011
-@c Free Software Foundation, Inc.
+@c Copyright 2008-2013 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
arguments that are passed on the stack are aligned to their natural
alignments. This option is the default.
+@cindex @samp{-mcpu=}
+@item -mcpu=@var{name}
+This option tells the assembler the target CPU type. Currently the
+@code{rx200}, @code{rx600} and @code{rx610} are recognised as valid
+cpu names. Attempting to assemble an instruction not supported by the
+indicated cpu type will result in an error message being generated.
+
@end table
@node RX-Modifiers