This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Calling conventions for vector types on SPARC

This patch implements calling conventions for vector types on SPARC, both for 
the V8 (32-bit) ABI and the V9 (64-bit) ABI, and in the process removes some 
duplicated code in the area.

The calling conventions for integral vector types match those implemented in 
the Sun VIS SDK for both ABIs.  The calling conventions for floating-point 
vector types match those of complex floating-point types as implemented by 
the Sun compiler, that GCC will conform to starting with the 3.4 release.

Thanks to David S. Miller for his very useful remarks.

Bootstrapped, regtested, compat-regtested against GCC 3.4pre and Sun CC 5.5, 
applied to mainline.

Btw, one the vector modes used by VIS on SPARC is V4QI ("pixels").  Would 
anyone object to adding to the C family of front-ends a builtin type for 
this mode?  Currently the compiler issues:
t.c:1: error: no data type for mode `V4QI'

2004-02-19  Eric Botcazou  <>

	PR target/12916
	* config/sparc/sparc.h (NPARM_REGS): Delete.
	* config/sparc/sparc.c (sparc_strict_argument_naming): Test
	(function_arg_slotno): Dispatch based on the mode class.
	Handle vector modes like floating-point modes.
	(function_arg_record_value_1): Handle vector types like
	floating-point types.
	(function_arg_record_value_2): Likewise.
	Calculate regno after mode transformation.
	(function_arg): Handle vector modes like floating-point modes.
	(function_arg_partial_nregs): Replace NPARM_REGS by SPARC_INT_ARG_MAX.
	If ARCH64, do not recheck alignment.
	(function_arg_pass_by_reference): Reorder the conditions.
	(sparc_return_in_memory): Move after function_arg_padding.
	Implement calling conventions for vector modes.
	(sparc_struct_value_rtx): Move after sparc_return_in_memory.
	(function_value): Move scope of 'regbase'.
	Implement calling conventions for vector modes.
	(sparc_builtin_saveregs): Replace NPARM_REGS by SPARC_INT_ARG_MAX
	(sparc_va_arg): Use function_arg_pass_by_reference to test whether
	the argument is passed by reference.
	(sparc_type_code): Handle vector types.

Eric Botcazou

Attachment: sparc_vector.diff.gz
Description: GNU Zip compressed data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]