From 979c67a51051015451cf264cd7e1b19d780ca569 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 15 Feb 2008 09:12:02 +0100 Subject: [PATCH] i386.h (CLEAR_RATIO): Use MIN macro. * config/i386/i386.h (CLEAR_RATIO): Use MIN macro. (WIDEST_HARDWARE_FP_SIZE): Use LONG_DOUBLE_TYPE_SIZE define. * config/i386/darwin.h (PREFERRED_STACK_BOUNDARY): Use MAX macro and STACK_BOUNDARY define. From-SVN: r132333 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/darwin.h | 5 ++--- gcc/config/i386/i386.c | 2 +- gcc/config/i386/i386.h | 15 +++++++-------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab1a89bd8d2..5e03e4998eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-02-15 Uros Bizjak + + * config/i386/i386.h (CLEAR_RATIO): Use MIN macro. + (WIDEST_HARDWARE_FP_SIZE): Use LONG_DOUBLE_TYPE_SIZE define. + * config/i386/darwin.h (PREFERRED_STACK_BOUNDARY): Use MAX macro + and STACK_BOUNDARY define. + 2008-02-14 Danny Smith PR preprocessor/35061 diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index dfaa666a8bf..6001f64b42a 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -81,9 +81,8 @@ along with GCC; see the file COPYING3. If not see than 128 bits for Darwin, but it's easier to up the alignment if it's below the minimum. */ #undef PREFERRED_STACK_BOUNDARY -#define PREFERRED_STACK_BOUNDARY (ix86_preferred_stack_boundary > 128 \ - ? ix86_preferred_stack_boundary \ - : 128) +#define PREFERRED_STACK_BOUNDARY \ + MAX (STACK_BOUNDARY, ix86_preferred_stack_boundary) /* We want -fPIC by default, unless we're using -static to compile for the kernel or some such. */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1311f8b12a1..78d6f10ca9b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -21969,7 +21969,7 @@ ix86_register_move_cost (enum machine_mode mode, enum reg_class class1, where integer modes in MMX/SSE registers are not tieable because of missing QImode and HImode moves to, from or between MMX/SSE registers. */ - return MAX (ix86_cost->mmxsse_to_integer, 8); + return MAX (8, ix86_cost->mmxsse_to_integer); if (MAYBE_FLOAT_CLASS_P (class1)) return ix86_cost->fp_move; diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 61e49f45f99..fedac5643a4 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -745,11 +745,6 @@ enum target_cpu_default { "cc1_cpu", CC1_CPU_SPEC }, \ SUBTARGET_EXTRA_SPECS -/* target machine storage layout */ - -#define LONG_DOUBLE_TYPE_SIZE 80 - -#define WIDEST_HARDWARE_FP_SIZE 80 /* Set the value of FLT_EVAL_METHOD in float.h. When using only the FPU, assume that the fpcw is set to extended precision; when using @@ -759,12 +754,17 @@ enum target_cpu_default #define TARGET_FLT_EVAL_METHOD \ (TARGET_MIX_SSE_I387 ? -1 : TARGET_SSE_MATH ? 0 : 2) +/* target machine storage layout */ + #define SHORT_TYPE_SIZE 16 #define INT_TYPE_SIZE 32 #define FLOAT_TYPE_SIZE 32 #define LONG_TYPE_SIZE BITS_PER_WORD #define DOUBLE_TYPE_SIZE 64 #define LONG_LONG_TYPE_SIZE 64 +#define LONG_DOUBLE_TYPE_SIZE 80 + +#define WIDEST_HARDWARE_FP_SIZE LONG_DOUBLE_TYPE_SIZE #if defined (TARGET_BI_ARCH) || TARGET_64BIT_DEFAULT #define MAX_BITS_PER_WORD 64 @@ -1782,7 +1782,7 @@ typedef struct ix86_args { All other eliminations are valid. */ #define CAN_ELIMINATE(FROM, TO) \ - ((TO) == STACK_POINTER_REGNUM ? ! frame_pointer_needed : 1) + ((TO) == STACK_POINTER_REGNUM ? !frame_pointer_needed : 1) /* Define the offset between two registers, one to be eliminated, and the other its replacement, at the start of a routine. */ @@ -1985,8 +1985,7 @@ do { \ /* If a clear memory operation would take CLEAR_RATIO or more simple move-instruction sequences, we will do a clrmem or libcall instead. */ -#define CLEAR_RATIO (optimize_size ? 2 \ - : ix86_cost->move_ratio > 6 ? 6 : ix86_cost->move_ratio) +#define CLEAR_RATIO (optimize_size ? 2 : MIN (6, ix86_cost->move_ratio)) /* Define if shifts truncate the shift count which implies one can omit a sign-extension or zero-extension -- 2.30.2