Commit b84d824d by Nick Clifton Committed by Nick Clifton

v850.c (F): New function.

	* config/v850/v850.c (F): New function.  Mark the given insn as
	being frame related.
	(v850_all_frame_related): New function.  Mark the given push insn
	as being frame related.
	(v850_pass_by_reference): When using the RH850 ABI do not pass
	arguments by reference.
	(v850_strict_argument_naming): Delete function.
	(v850_function_arg): Use word alignment with the RH850 ABI.
	(v850_arg_partial_bytes): Likewise.
	(v850_function_arg_advance): Likewise.
	(v850_print_operand): Handle CONST_INT and CONST_DOUBLE.
	(compute_register_save_size): Use df_regs_ever_live_p.
	(increment_stack): Mark prologue adjustments as being frame
	related.
	(expand_prologue): Handle pretend args.  Mark insns generated as
	being frame related.
	(expand_epilogue): Likewise.
	(v850_return_in_memory): When using the RH850 ABI return
	aggregates in memory.
	(v850_setup_incoming_varargs): Delete function.
	(v850_option_override): New function.
	(TARGET_DEBUG_UNWIND_INFO): Delete definition.
	(TARGET_SETUP_INCOMING_VARARGS): Likewise.
	(TARGET_STRICT_ARGUMENT_NAMING): Likewise.
	(TARGET_OPTION_OVERRIDE): Define.
	* config/v850/v850.h (ASM_SPEC): Pass 8byte-align and gcc-abi
	options on to assembler.
	(LINK_SPEC): Likewise.
	(TARGET_CPU_CPP_BUILTINS): Define __V850_8BYTE_ALIGN__ and
	__V850_GCC_ABI__.
	(STACK_BOUNDARY): Set to BIGGEST_ALIGNMENT.
	(FUNCTION_BOUNDARY): With the RH850 ABI always 32-bit alignment.
	(BIGGEST_ALIGNMENT): With -8byte-align set to 64-bits.
	(BIGGEST_FIELD_ALIGNMENT): Likewise.
	(enum reg_class): Swap EVEN_REGS and GENERAL_REGS.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	(struct cum_arg): Delete anonymous_args field.
	(INIT_CUMULATIVE_ARGS): Update.
	(PREFERRED_DEBUG): Set to DWARF2_DEBUG.
	(DWARF2_FRAME_INFO): Define.
	(DWARF2_UNWIND_INFO): Define.
	(INCOMING_RETURN_ADDR_RTX): Define.
	(DWARF_FRAME_RETURN_COLUMN): Define.
	(TARGET_USE_FPU): Define.
	* config/v850/v850.md: Replace TARGET_V850E2V3 in floating point
	insns with TARGET_USE_FPU.
	(fixuns_truncsfsi2): New pattern.
	(fixuns_truncdfsi2): New pattern.
	(fix_truncsfdi2): New pattern.
	(fixuns_truncsfdi2): New pattern.
	(fix_truncdfdi2): New pattern.
	(fixuns_truncdfdi2): New pattern.
	(unsfloatsisf2): New pattern.
	(unsfloatsidf2): New pattern.
	(floatdisf2): New pattern.
	(unsfloatdisf2): New pattern.
	(floatdidf2): New pattern.
	(unsfloatdidf2): New pattern.
	(fnmasf4): Fix RTl description.
	(fnmssf4): Likewise.
	* config/v850/v850.opt (mrelax): New option.
	(mlong-jumps): Likewise.
	(msoft-float): Likewise.
	(mhard-float): Likewise.
	(mrh850-abi): Likewise.
	(mgcc-abi): Likewise.
	(m8byte-align): Likewise.
	* config/v850/t-v850 (MULTILIB_OPTIONS): Update multilib options.
	(MULTILIB_DIRNAMES): Likewise.

From-SVN: r193661
parent aef5ffaa
......@@ -4,6 +4,79 @@
2012-11-20 Nick Clifton <nickc@redhat.com>
* config/v850/v850.c (F): New function. Mark the given insn as
being frame related.
(v850_all_frame_related): New function. Mark the given push insn
as being frame related.
(v850_pass_by_reference): When using the RH850 ABI do not pass
arguments by reference.
(v850_strict_argument_naming): Delete function.
(v850_function_arg): Use word alignment with the RH850 ABI.
(v850_arg_partial_bytes): Likewise.
(v850_function_arg_advance): Likewise.
(v850_print_operand): Handle CONST_INT and CONST_DOUBLE.
(compute_register_save_size): Use df_regs_ever_live_p.
(increment_stack): Mark prologue adjustments as being frame
related.
(expand_prologue): Handle pretend args. Mark insns generated as
being frame related.
(expand_epilogue): Likewise.
(v850_return_in_memory): When using the RH850 ABI return
aggregates in memory.
(v850_setup_incoming_varargs): Delete function.
(v850_option_override): New function.
(TARGET_DEBUG_UNWIND_INFO): Delete definition.
(TARGET_SETUP_INCOMING_VARARGS): Likewise.
(TARGET_STRICT_ARGUMENT_NAMING): Likewise.
(TARGET_OPTION_OVERRIDE): Define.
* config/v850/v850.h (ASM_SPEC): Pass 8byte-align and gcc-abi
options on to assembler.
(LINK_SPEC): Likewise.
(TARGET_CPU_CPP_BUILTINS): Define __V850_8BYTE_ALIGN__ and
__V850_GCC_ABI__.
(STACK_BOUNDARY): Set to BIGGEST_ALIGNMENT.
(FUNCTION_BOUNDARY): With the RH850 ABI always 32-bit alignment.
(BIGGEST_ALIGNMENT): With -8byte-align set to 64-bits.
(BIGGEST_FIELD_ALIGNMENT): Likewise.
(enum reg_class): Swap EVEN_REGS and GENERAL_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(struct cum_arg): Delete anonymous_args field.
(INIT_CUMULATIVE_ARGS): Update.
(PREFERRED_DEBUG): Set to DWARF2_DEBUG.
(DWARF2_FRAME_INFO): Define.
(DWARF2_UNWIND_INFO): Define.
(INCOMING_RETURN_ADDR_RTX): Define.
(DWARF_FRAME_RETURN_COLUMN): Define.
(TARGET_USE_FPU): Define.
* config/v850/v850.md: Replace TARGET_V850E2V3 in floating point
insns with TARGET_USE_FPU.
(fixuns_truncsfsi2): New pattern.
(fixuns_truncdfsi2): New pattern.
(fix_truncsfdi2): New pattern.
(fixuns_truncsfdi2): New pattern.
(fix_truncdfdi2): New pattern.
(fixuns_truncdfdi2): New pattern.
(unsfloatsisf2): New pattern.
(unsfloatsidf2): New pattern.
(floatdisf2): New pattern.
(unsfloatdisf2): New pattern.
(floatdidf2): New pattern.
(unsfloatdidf2): New pattern.
(fnmasf4): Fix RTl description.
(fnmssf4): Likewise.
* config/v850/v850.opt (mrelax): New option.
(mlong-jumps): Likewise.
(msoft-float): Likewise.
(mhard-float): Likewise.
(mrh850-abi): Likewise.
(mgcc-abi): Likewise.
(m8byte-align): Likewise.
* config/v850/t-v850 (MULTILIB_OPTIONS): Update multilib options.
(MULTILIB_DIRNAMES): Likewise.
2012-11-20 Nick Clifton <nickc@redhat.com>
* config/rx/rx.c (rx_function_arg_boundary): When using the RX ABI
align stack arguments to their natural alignment.
(rx_narrow_volatile_bitfield): New function. Allows narrow
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# 2011, 2012 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
......@@ -18,9 +18,8 @@
# <http://www.gnu.org/licenses/>.
# Create target-specific versions of the libraries
MULTILIB_OPTIONS = mv850/mv850e/mv850e2/mv850e2v3
MULTILIB_DIRNAMES = v850 v850e v850e2 v850e2v3
MULTILIB_MATCHES = mv850e=mv850e1
MULTILIB_OPTIONS = m8byte-align mgcc-abi msoft-float
MULTILIB_DIRNAMES = 8byte gcc-abi soft-float
TCFLAGS = -mno-app-regs -msmall-sld -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow
......
/* Definitions of target machine for GNU compiler. NEC V850 series
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
This file is part of GCC.
......@@ -89,7 +89,13 @@ extern GTY(()) rtx v850_compare_op1;
#define TARGET_V850E2_ALL (TARGET_V850E2 || TARGET_V850E2V3)
#define ASM_SPEC "%{mv850es:-mv850e1}%{!mv850es:%{mv*:-mv%*}}"
#define ASM_SPEC "%{m850es:-mv850e1}%{!mv850es:%{mv*:-mv%*}} \
%{mrelax:-mrelax} \
%{m8byte-align:-m8byte-align} \
%{mgcc-abi:-mgcc-abi}"
#define LINK_SPEC "%{mgcc-abi:-m v850}"
#define CPP_SPEC "\
%{mv850e2v3:-D__v850e2v3__} \
%{mv850e2:-D__v850e2__} \
......@@ -104,15 +110,32 @@ extern GTY(()) rtx v850_compare_op1;
{ "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \
{ "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }
/* Names to predefine in the preprocessor for this target machine. */
#define TARGET_CPU_CPP_BUILTINS() do { \
builtin_define( "__v851__" ); \
builtin_define( "__v850" ); \
builtin_assert( "machine=v850" ); \
builtin_assert( "cpu=v850" ); \
if (TARGET_EP) \
builtin_define ("__EP__"); \
} while(0)
/* Macro to decide when FPU instructions can be used. */
#define TARGET_USE_FPU (TARGET_V850E2V3 && ! TARGET_SOFT_FLOAT)
#define TARGET_CPU_CPP_BUILTINS() \
do \
{ \
builtin_define( "__v851__" ); \
builtin_define( "__v850" ); \
builtin_define( "__v850__" ); \
builtin_assert( "machine=v850" ); \
builtin_assert( "cpu=v850" ); \
if (TARGET_EP) \
builtin_define ("__EP__"); \
if (TARGET_GCC_ABI) \
builtin_define ("__V850_GCC_ABI__"); \
else \
builtin_define ("__V850_RH850_ABI__"); \
if (! TARGET_DISABLE_CALLT) \
builtin_define ("__V850_CALLT__"); \
if (TARGET_8BYTE_ALIGN) \
builtin_define ("__V850_8BYTE_ALIGN__");\
builtin_define (TARGET_USE_FPU ? \
"__FPU_OK__" : "__NO_FPU__");\
} \
while(0)
#define MASK_CPU (MASK_V850 | MASK_V850E | MASK_V850E1 | MASK_V850E2 | MASK_V850E2V3)
......@@ -153,20 +176,20 @@ extern GTY(()) rtx v850_compare_op1;
#define PARM_BOUNDARY 32
/* The stack goes in 32-bit lumps. */
#define STACK_BOUNDARY 32
#define STACK_BOUNDARY BIGGEST_ALIGNMENT
/* Allocation boundary (in *bits*) for the code of a function.
16 is the minimum boundary; 32 would give better performance. */
#define FUNCTION_BOUNDARY (optimize_size ? 16 : 32)
#define FUNCTION_BOUNDARY (((! TARGET_GCC_ABI) || optimize_size) ? 16 : 32)
/* No data type wants to be aligned rounder than this. */
#define BIGGEST_ALIGNMENT 32
#define BIGGEST_ALIGNMENT (TARGET_8BYTE_ALIGN ? 64 : 32)
/* Alignment of field after `int : 0' in a structure. */
#define EMPTY_FIELD_BOUNDARY 32
/* No structure field wants to be aligned rounder than this. */
#define BIGGEST_FIELD_ALIGNMENT 32
#define BIGGEST_FIELD_ALIGNMENT BIGGEST_ALIGNMENT
/* Define this if move instructions will actually fail to work
when given unaligned data. */
......@@ -291,7 +314,7 @@ extern GTY(()) rtx v850_compare_op1;
enum reg_class
{
NO_REGS, GENERAL_REGS, EVEN_REGS, ALL_REGS, LIM_REG_CLASSES
NO_REGS, EVEN_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES
};
#define N_REG_CLASSES (int) LIM_REG_CLASSES
......@@ -299,7 +322,7 @@ enum reg_class
/* Give names of register classes as strings for dump file. */
#define REG_CLASS_NAMES \
{ "NO_REGS", "GENERAL_REGS", "EVEN_REGS", "ALL_REGS", "LIM_REGS" }
{ "NO_REGS", "EVEN_REGS", "GENERAL_REGS", "ALL_REGS", "LIM_REGS" }
/* Define which registers fit in which classes.
This is an initializer for a vector of HARD_REG_SET
......@@ -308,8 +331,8 @@ enum reg_class
#define REG_CLASS_CONTENTS \
{ \
{ 0x00000000,0x0 }, /* NO_REGS */ \
{ 0xffffffff,0x0 }, /* GENERAL_REGS */ \
{ 0x55555554,0x0 }, /* EVEN_REGS */ \
{ 0xfffffffe,0x0 }, /* GENERAL_REGS */ \
{ 0xffffffff,0x0 }, /* ALL_REGS */ \
}
......@@ -485,14 +508,14 @@ enum reg_class
such as FUNCTION_ARG to determine where the next arg should go. */
#define CUMULATIVE_ARGS struct cum_arg
struct cum_arg { int nbytes; int anonymous_args; };
struct cum_arg { int nbytes; };
/* Initialize a variable CUM of type CUMULATIVE_ARGS
for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is 0. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
((CUM).nbytes = 0, (CUM).anonymous_args = 0)
do { (CUM).nbytes = 0; } while (0)
/* When a parameter is passed in a register, stack space is still
allocated for it. */
......@@ -785,10 +808,14 @@ typedef enum
/* We don't have to worry about dbx compatibility for the v850. */
#define DEFAULT_GDB_EXTENSIONS 1
/* Use stabs debugging info by default. */
/* Use dwarf2 debugging info by default. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#define DBX_DEBUGGING_INFO 1
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
#define DWARF2_FRAME_INFO 1
#define DWARF2_UNWIND_INFO 0
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, LINK_POINTER_REGNUM)
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LINK_POINTER_REGNUM)
#ifndef ASM_GENERATE_INTERNAL_LABEL
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
......
; Options for the NEC V850 port of the compiler.
; Copyright (C) 2005, 2007, 2010, 2011 Free Software Foundation, Inc.
; Copyright (C) 2005, 2007, 2010, 2011, 2012 Free Software Foundation, Inc.
;
; This file is part of GCC.
;
......@@ -38,15 +38,14 @@ Enable backend debugging
mdisable-callt
Target Report Mask(DISABLE_CALLT)
Do not use the callt instruction
Do not use the callt instruction (default)
mep
Target Report Mask(EP)
Reuse r30 on a per function basis
mghs
Target Report Mask(GHS)
Support Green Hills ABI
Target RejectNegative InverseMask(GCC_ABI) MaskExists
mlong-calls
Target Report Mask(LONG_CALLS)
......@@ -119,3 +118,31 @@ Set the max size of data eligible for the ZDA area
mzda-
Target RejectNegative Joined Undocumented Alias(mzda=)
mrelax
Target Report Mask(RELAX)
Enable relaxing in the assembler
mlong-jumps
Target Report Mask(BIG_SWITCH) MaskExists
Prohibit PC relative jumps
msoft-float
Target Report RejectNegative Mask(SOFT_FLOAT)
Inhibit the use of hardware floating point instructions
mhard-float
Target Report RejectNegative InverseMask(SOFT_FLOAT) MaskExists
Allow the use of hardware floating point instructions for V850E2V3 and up
mrh850-abi
Target RejectNegative Report InverseMask(GCC_ABI) MaskExists
Enable support for the RH850 ABI. This is the default
mgcc-abi
Target RejectNegative Report Mask(GCC_ABI)
Enable support for the old GCC ABI
m8byte-align
Target Report Mask(8BYTE_ALIGN)
Support alignments of up to 64-bits
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