Commit ad919812 by Jan Hubicka Committed by Jan Hubicka

i386-protos.h (ix86_setup_incoming_varargs, [...]): Declare.

	* i386-protos.h (ix86_setup_incoming_varargs, ix86_va_arg,
	ix86_va_start, ix86_build_va_list): Declare.
	* i386.c (ix86_setup_incoming_varargs, ix86_va_arg,
	ix86_va_start, ix86_build_va_list): New global functions.
	* i386.md (sse_prologue_save_insn): New insn.
	(sse_prologue_save): New expander.
	* i386.h (EXPAND_BUILTIN_VA_ARG, EXPAND_BUILTIN_VA_START,
	BUILD_VA_LIST_TYPE, SETUP_INCOMING_VARARGS): New macros.

From-SVN: r45862
parent 576fb787
Fri Sep 28 19:18:40 CEST 2001 Jan Hubicka <jh@suse.cz>
* i386-protos.h (ix86_setup_incoming_varargs, ix86_va_arg,
ix86_va_start, ix86_build_va_list): Declare.
* i386.c (ix86_setup_incoming_varargs, ix86_va_arg,
ix86_va_start, ix86_build_va_list): New global functions.
* i386.md (sse_prologue_save_insn): New insn.
(sse_prologue_save): New expander.
* i386.h (EXPAND_BUILTIN_VA_ARG, EXPAND_BUILTIN_VA_START,
BUILD_VA_LIST_TYPE, SETUP_INCOMING_VARARGS): New macros.
2001-09-28 Neil Booth <neil@daikokuya.demon.co.uk>
* cpplex.c (new_buff, _cpp_get_buff, _cpp_extend_buff):
......
......@@ -140,6 +140,11 @@ extern bool ix86_function_value_regno_p PARAMS ((int));
extern bool ix86_function_arg_regno_p PARAMS ((int));
extern int ix86_function_arg_boundary PARAMS ((enum machine_mode, tree));
extern int ix86_return_in_memory PARAMS ((tree));
extern void ix86_va_start PARAMS ((int, tree, rtx));
extern rtx ix86_va_arg PARAMS ((tree, tree));
extern void ix86_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode,
tree, int *, int));
extern rtx ix86_force_to_memory PARAMS ((enum machine_mode, rtx));
extern void ix86_free_from_memory PARAMS ((enum machine_mode));
......@@ -175,6 +180,7 @@ extern rtx ix86_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int))
#ifdef TREE_CODE
extern int ix86_return_pops_args PARAMS ((tree, tree, int));
extern tree ix86_build_va_list PARAMS ((void));
extern int ix86_data_alignment PARAMS ((tree, int));
extern int ix86_local_alignment PARAMS ((tree, int));
......
......@@ -1604,6 +1604,35 @@ typedef struct ix86_args {
|| ! FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (DECL)))) \
|| FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (cfun->decl))))))
/* Perform any needed actions needed for a function that is receiving a
variable number of arguments.
CUM is as above.
MODE and TYPE are the mode and type of the current parameter.
PRETEND_SIZE is a variable that should be set to the amount of stack
that must be pushed by the prolog to pretend that our caller pushed
it.
Normally, this macro will push all remaining incoming registers on the
stack and set PRETEND_SIZE to the length of the registers pushed. */
#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
ix86_setup_incoming_varargs (&CUM, MODE, TYPE, &PRETEND_SIZE, NO_RTL)
/* Define the `__builtin_va_list' type for the ABI. */
#define BUILD_VA_LIST_TYPE(VALIST) \
(VALIST) = ix86_build_va_list ()
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
ix86_va_start (stdarg, valist, nextarg)
/* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \
ix86_va_arg (valist, type)
/* This macro is invoked at the end of compilation. It is used here to
output code for -fpic that will load the return address into %ebx. */
......@@ -2775,6 +2804,7 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
#define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) : INVALID_REGNUM)
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 2)
/* Select a format to encode pointers in exception handling data. CODE
is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
true if the symbol may be affected by dynamic relocations.
......
......@@ -19066,3 +19066,63 @@
}
[(set_attr "type" "sse")])
(define_expand "sse_prologue_save"
[(parallel [(set (match_operand:BLK 0 "" "")
(unspec:BLK [(reg:DI 21)
(reg:DI 22)
(reg:DI 23)
(reg:DI 24)
(reg:DI 25)
(reg:DI 26)
(reg:DI 27)
(reg:DI 28)] 13))
(use (match_operand:DI 1 "register_operand" ""))
(use (match_operand:DI 2 "immediate_operand" ""))
(use (label_ref:DI (match_operand 3 "" "")))])]
"TARGET_64BIT"
"")
(define_insn "*sse_prologue_save_insn"
[(set (mem:BLK (plus:DI (match_operand:DI 0 "register_operand" "R")
(match_operand:DI 4 "const_int_operand" "n")))
(unspec:BLK [(reg:DI 21)
(reg:DI 22)
(reg:DI 23)
(reg:DI 24)
(reg:DI 25)
(reg:DI 26)
(reg:DI 27)
(reg:DI 28)] 13))
(use (match_operand:DI 1 "register_operand" "r"))
(use (match_operand:DI 2 "const_int_operand" "i"))
(use (label_ref:DI (match_operand 3 "" "X")))]
"TARGET_64BIT
&& INTVAL (operands[4]) + SSE_REGPARM_MAX * 16 - 16 < 128
&& INTVAL (operands[4]) + INTVAL (operands[2]) * 16 >= -128"
"*
{
int i;
operands[0] = gen_rtx_MEM (Pmode,
gen_rtx_PLUS (Pmode, operands[0], operands[4]));
output_asm_insn (\"jmp\\t%A1\", operands);
for (i = SSE_REGPARM_MAX - 1; i >= INTVAL (operands[2]); i--)
{
operands[4] = adjust_address (operands[0], DImode, i*16);
operands[5] = gen_rtx_REG (TImode, SSE_REGNO (i));
PUT_MODE (operands[4], TImode);
if (GET_CODE (XEXP (operands[0], 0)) != PLUS)
output_asm_insn (\"rex\", operands);
output_asm_insn (\"movaps\\t{%5, %4|%4, %5}\", operands);
}
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
CODE_LABEL_NUMBER (operands[3]));
RET;
}
"
[(set_attr "type" "other")
(set_attr "length_immediate" "0")
(set_attr "length_address" "0")
(set_attr "length" "135")
(set_attr "memory" "store")
(set_attr "modrm" "0")
(set_attr "mode" "DI")])
......@@ -274,7 +274,7 @@ in the following sections.
-fschedule-insns -fschedule-insns2 @gol
-fsingle-precision-constant -fssa -fssa-ccp -fssa-dce @gol
-fstrength-reduce -fstrict-aliasing -fthread-jumps -ftrapv @gol
-funroll-all-loops -funroll-loops @gol
-funroll-all-loops -funroll-loops -fmessy-debugging @gol
--param @var{name}=@var{value}
-O -O0 -O1 -O2 -O3 -Os}
......@@ -3415,6 +3415,18 @@ Not all of the optimizations performed by GCC have @option{-f} options
to control them.
@table @gcctabopt
@item -fmessy-debugging
@opindex fmessy-debugging
Some optimizations can be stronger if compiler give up ability to generate
at least approximately usefull debug information for optimized programs.
These transformation are not done when @option{-g} switch is not specified,
as politics is to get the code with @option{-g} and without equivalent,
except for debugging section.
This optimization enables such transformations. It is still compatible with
@option{-g}, but debugging resulting programs will be even higher challenge.
@table @gcctabopt
@item -fstrength-reduce
@opindex fstrength-reduce
Perform the optimizations of loop strength reduction and
......
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