Commit 69f5aa9b by Sandeep Kumar Singh Committed by Nick Clifton

rx.h (TARGET_CPU_CPP_BUILTINS): Add macros for RX100, RX200, and RX600.

	* rx/rx.h (TARGET_CPU_CPP_BUILTINS): Add macros for RX100, RX200,
	and RX600.
	* rx/rx.opt: Add macro for rx100 with string rx100 and value
	RX100.
	* rx/rx-opts.h (rx_cpu_types): Add new cpu type rx100.
	* rx/t-rx: Add rx100 under multi library matches option for nofpu
	option.

From-SVN: r199417
parent 4b847da9
2013-05-29 Sandeep Kumar Singh <Sandeep.Singh2@kpitcummins.com>
* rx/rx.h (TARGET_CPU_CPP_BUILTINS): Add macros for RX100, RX200,
and RX600.
* rx/rx.opt: Add macro for rx100 with string rx100 and value
RX100.
* rx/rx-opts.h (rx_cpu_types): Add new cpu type rx100.
* rx/t-rx: Add rx100 under multi library matches option for nofpu
option.
2013-05-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 2013-05-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/57441 PR tree-optimization/57441
......
...@@ -24,7 +24,8 @@ enum rx_cpu_types ...@@ -24,7 +24,8 @@ enum rx_cpu_types
{ {
RX600, RX600,
RX610, RX610,
RX200 RX200,
RX100
}; };
#endif #endif
...@@ -975,6 +975,8 @@ rx_gen_move_template (rtx * operands, bool is_movu) ...@@ -975,6 +975,8 @@ rx_gen_move_template (rtx * operands, bool is_movu)
loading an immediate into a register. */ loading an immediate into a register. */
extension = ".W"; extension = ".W";
break; break;
case DFmode:
case DImode:
case SFmode: case SFmode:
case SImode: case SImode:
extension = ".L"; extension = ".L";
...@@ -988,19 +990,44 @@ rx_gen_move_template (rtx * operands, bool is_movu) ...@@ -988,19 +990,44 @@ rx_gen_move_template (rtx * operands, bool is_movu)
} }
if (MEM_P (src) && rx_pid_data_operand (XEXP (src, 0)) == PID_UNENCODED) if (MEM_P (src) && rx_pid_data_operand (XEXP (src, 0)) == PID_UNENCODED)
src_template = "(%A1-__pid_base)[%P1]"; {
gcc_assert (GET_MODE (src) != DImode);
gcc_assert (GET_MODE (src) != DFmode);
src_template = "(%A1 - __pid_base)[%P1]";
}
else if (MEM_P (src) && rx_small_data_operand (XEXP (src, 0))) else if (MEM_P (src) && rx_small_data_operand (XEXP (src, 0)))
src_template = "%%gp(%A1)[%G1]"; {
gcc_assert (GET_MODE (src) != DImode);
gcc_assert (GET_MODE (src) != DFmode);
src_template = "%%gp(%A1)[%G1]";
}
else else
src_template = "%1"; src_template = "%1";
if (MEM_P (dest) && rx_small_data_operand (XEXP (dest, 0))) if (MEM_P (dest) && rx_small_data_operand (XEXP (dest, 0)))
dst_template = "%%gp(%A0)[%G0]"; {
gcc_assert (GET_MODE (dest) != DImode);
gcc_assert (GET_MODE (dest) != DFmode);
dst_template = "%%gp(%A0)[%G0]";
}
else else
dst_template = "%0"; dst_template = "%0";
sprintf (out_template, "%s%s\t%s, %s", is_movu ? "movu" : "mov", if (GET_MODE (dest) == DImode || GET_MODE (dest) == DFmode)
extension, src_template, dst_template); {
gcc_assert (! is_movu);
if (REG_P (src) && REG_P (dest) && (REGNO (dest) == REGNO (src) + 1))
sprintf (out_template, "mov.L\t%H1, %H0 | mov.L\t%1, %0");
else
sprintf (out_template, "mov.L\t%1, %0 | mov.L\t%H1, %H0");
}
else
sprintf (out_template, "%s%s\t%s, %s", is_movu ? "movu" : "mov",
extension, src_template, dst_template);
return out_template; return out_template;
} }
...@@ -3240,6 +3267,12 @@ rx_ok_to_inline (tree caller, tree callee) ...@@ -3240,6 +3267,12 @@ rx_ok_to_inline (tree caller, tree callee)
|| lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (callee)) != NULL_TREE; || lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (callee)) != NULL_TREE;
} }
static bool
rx_enable_lra (void)
{
return TARGET_ENABLE_LRA || 1;
}
#undef TARGET_NARROW_VOLATILE_BITFIELD #undef TARGET_NARROW_VOLATILE_BITFIELD
#define TARGET_NARROW_VOLATILE_BITFIELD rx_narrow_volatile_bitfield #define TARGET_NARROW_VOLATILE_BITFIELD rx_narrow_volatile_bitfield
...@@ -3391,6 +3424,9 @@ rx_ok_to_inline (tree caller, tree callee) ...@@ -3391,6 +3424,9 @@ rx_ok_to_inline (tree caller, tree callee)
#undef TARGET_WARN_FUNC_RETURN #undef TARGET_WARN_FUNC_RETURN
#define TARGET_WARN_FUNC_RETURN rx_warn_func_return #define TARGET_WARN_FUNC_RETURN rx_warn_func_return
#undef TARGET_LRA_P
#define TARGET_LRA_P rx_enable_lra
struct gcc_target targetm = TARGET_INITIALIZER; struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-rx.h" #include "gt-rx.h"
...@@ -29,9 +29,22 @@ ...@@ -29,9 +29,22 @@
builtin_define ("__RX610__"); \ builtin_define ("__RX610__"); \
builtin_assert ("machine=RX610"); \ builtin_assert ("machine=RX610"); \
} \ } \
else \ else if (rx_cpu_type == RX100) \
builtin_assert ("machine=RX600"); \ { \
\ builtin_define ("__RX100__"); \
builtin_assert ("machine=RX100"); \
} \
else if (rx_cpu_type == RX200) \
{ \
builtin_define ("__RX200__"); \
builtin_assert ("machine=RX200"); \
} \
else if (rx_cpu_type == RX600) \
{ \
builtin_define ("__RX600__"); \
builtin_assert ("machine=RX600"); \
} \
\
if (TARGET_BIG_ENDIAN_DATA) \ if (TARGET_BIG_ENDIAN_DATA) \
builtin_define ("__RX_BIG_ENDIAN__"); \ builtin_define ("__RX_BIG_ENDIAN__"); \
else \ else \
...@@ -60,6 +73,7 @@ ...@@ -60,6 +73,7 @@
#undef CC1_SPEC #undef CC1_SPEC
#define CC1_SPEC "\ #define CC1_SPEC "\
%{mas100-syntax:%{gdwarf*:%e-mas100-syntax is incompatible with -gdwarf}} \ %{mas100-syntax:%{gdwarf*:%e-mas100-syntax is incompatible with -gdwarf}} \
%{mcpu=rx100:%{fpu:%erx100 cpu does not have FPU hardware}} \
%{mcpu=rx200:%{fpu:%erx200 cpu does not have FPU hardware}}" %{mcpu=rx200:%{fpu:%erx200 cpu does not have FPU hardware}}"
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
;; then all operations on doubles have to be handled by ;; then all operations on doubles have to be handled by
;; library functions. ;; library functions.
(define_mode_iterator register_modes (define_mode_iterator register_modes
[(SF "ALLOW_RX_FPU_INSNS") (SI "") (HI "") (QI "")]) [(SF "") (SI "") (HI "") (QI "")])
(define_constants (define_constants
[ [
...@@ -2621,3 +2621,21 @@ ...@@ -2621,3 +2621,21 @@
"" ""
"" ""
) )
(define_insn "movdi"
[(set:DI (match_operand:DI 0 "nonimmediate_operand" "=rm")
(match_operand:DI 1 "general_operand" "rmi"))]
"TARGET_ENABLE_LRA || 1"
{ return rx_gen_move_template (operands, false); }
[(set_attr "length" "16")
(set_attr "timings" "22")]
)
(define_insn "movdf"
[(set:DF (match_operand:DF 0 "nonimmediate_operand" "=rm")
(match_operand:DF 1 "general_operand" "rmi"))]
"TARGET_ENABLE_LRA || 1"
{ return rx_gen_move_template (operands, false); }
[(set_attr "length" "16")
(set_attr "timings" "22")]
)
...@@ -61,6 +61,9 @@ Enum(rx_cpu_types) String(rx200) Value(RX200) ...@@ -61,6 +61,9 @@ Enum(rx_cpu_types) String(rx200) Value(RX200)
EnumValue EnumValue
Enum(rx_cpu_types) String(rx600) Value(RX600) Enum(rx_cpu_types) String(rx600) Value(RX600)
EnumValue
Enum(rx_cpu_types) String(rx100) Value(RX100)
;--------------------------------------------------- ;---------------------------------------------------
mbig-endian-data mbig-endian-data
...@@ -132,3 +135,7 @@ Enable the use of the old, broken, ABI where all stacked function arguments are ...@@ -132,3 +135,7 @@ Enable the use of the old, broken, ABI where all stacked function arguments are
mrx-abi mrx-abi
Target RejectNegative Report InverseMask(GCC_ABI) Target RejectNegative Report InverseMask(GCC_ABI)
Enable the use the standard RX ABI where all stacked function arguments are naturally aligned. This is the default. Enable the use the standard RX ABI where all stacked function arguments are naturally aligned. This is the default.
mlra
Target Report Mask(ENABLE_LRA)
Enable the use of the LRA register allocator.
...@@ -28,7 +28,7 @@ MULTILIB_DIRNAMES = 64-bit-double no-fpu-libs big-endian-data pid ...@@ -28,7 +28,7 @@ MULTILIB_DIRNAMES = 64-bit-double no-fpu-libs big-endian-data pid
# MULTILIB_OPTIONS += mgcc-abi # MULTILIB_OPTIONS += mgcc-abi
# MULTILIB_DIRNAMES += gcc-abi # MULTILIB_DIRNAMES += gcc-abi
MULTILIB_MATCHES = nofpu=mnofpu nofpu=mcpu?rx200 MULTILIB_MATCHES = nofpu=mnofpu nofpu=mcpu?rx200 nofpu=mcpu?rx100
MULTILIB_EXCEPTIONS = MULTILIB_EXCEPTIONS =
MULTILIB_EXTRA_OPTS = MULTILIB_EXTRA_OPTS =
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment