diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7cb2aa6fd4..a6637ed3fa3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2002-06-10 Zack Weinberg + + * Makefile.in (MACHMODE_H): Add @extra_modes_file@. + * configure.in: If $srcdir/config/${cpu_type}/${cpu_type}-modes.def + exists, substitute its pathname as @extra_modes_file@, define + EXTRA_MODES_FILE to be an appropriate string to #include it + with, and define EXTRA_CC_MODES to 1. + + * machmode.def: Update comments. Include EXTRA_MODES_FILE if + it's defined. Get rid of redundancy in calling sequence for + CC; don't use it to define CCmode, to avoid a warning. + * libgcc2.c: Include symcat.h for the sake of machmode.def. + + * arc-modes.def, arm-modes.def, c4x-modes.def, i386-modes.def, + i960-modes.def, ia64-modes.def, m88k-modes.def, mmix-modes.def, + pa-modes.def, pdp11-modes.def, rs6000-modes.def, sparc-modes.def: + New files. + * arc.h, arm.h, c4x.h, i386.h, i960.h, ia64.h, m88k.h, mmix.h, + pa.h, pdp11.h, rs6000.h, sparc.h: Don't define EXTRA_CC_MODES. + + * doc/sourcebuild.texi, doc/tm.texi: Document new scheme for + defining extra CC modes. + 2002-06-10 Roger Sayle Andreas Jaeger diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 4e1385aa8a4..0dbb2d99769 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -548,7 +548,7 @@ LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H) TARGET_DEF_H = target-def.h $(HOOKS_H) TM_P_H = tm_p.h $(tm_p_file_list) tm-preds.h -MACHMODE_H = machmode.h machmode.def +MACHMODE_H = machmode.h machmode.def @extra_modes_file@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) RTL_H = $(RTL_BASE_H) genrtl.h PARAMS_H = params.h params.def diff --git a/gcc/config.in b/gcc/config.in index a23658e1c23..eeef49b0538 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1,4 +1,4 @@ -/* config.in. Generated automatically from configure.in by autoheader. */ +/* config.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if using alloca.c. */ #undef C_ALLOCA @@ -482,6 +482,14 @@ /* Define if host mkdir takes a single argument. */ #undef MKDIR_TAKES_ONE_ARG +/* Define if the target architecture needs extra machine modes to represent + the results of comparisons. */ +#undef EXTRA_CC_MODES + +/* Define to the name of a file containing a list of extra machine modes + for this architecture. */ +#undef EXTRA_MODES_FILE + /* Define if you have the iconv() function. */ #undef HAVE_ICONV diff --git a/gcc/config/arc/arc-modes.def b/gcc/config/arc/arc-modes.def new file mode 100644 index 00000000000..0c9d4f5bfc5 --- /dev/null +++ b/gcc/config/arc/arc-modes.def @@ -0,0 +1,25 @@ +/* Definitions of target machine for GNU compiler, Argonaut ARC cpu. + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Some insns set all condition code flags, some only set the ZNC flags, and + some only set the ZN flags. */ + +CC (CCZNC) +CC (CCZN) diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index ae0176fcdf4..1390d6bc2a1 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -990,15 +990,6 @@ do { \ goto LABEL; \ } -/* Condition code usage. */ - -/* Some insns set all condition code flags, some only set the ZNC flags, and - some only set the ZN flags. */ - -#define EXTRA_CC_MODES \ - CC(CCZNCmode, "CCZNC") \ - CC(CCZNmode, "CCZN") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. */ #define SELECT_CC_MODE(OP, X, Y) \ diff --git a/gcc/config/arm/arm-modes.def b/gcc/config/arm/arm-modes.def new file mode 100644 index 00000000000..48f9ddfb0bd --- /dev/null +++ b/gcc/config/arm/arm-modes.def @@ -0,0 +1,46 @@ +/* Definitions of target machine for GNU compiler, for ARM. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl) + and Martin Simmons (@harleqn.co.uk). + More major hacks by Richard Earnshaw (rearnsha@arm.com) + Minor hacks by Nick Clifton (nickc@cygnus.com) + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* CCFPEmode should be used with floating inequalities, + CCFPmode should be used with floating equalities. + CC_NOOVmode should be used with SImode integer equalities. + CC_Zmode should be used if only the Z flag is set correctly + CCmode should be used otherwise. */ + +CC (CC_NOOV) +CC (CC_Z) +CC (CC_SWP) +CC (CCFP) +CC (CCFPE) +CC (CC_DNE) +CC (CC_DEQ) +CC (CC_DLE) +CC (CC_DLT) +CC (CC_DGE) +CC (CC_DGT) +CC (CC_DLEU) +CC (CC_DLTU) +CC (CC_DGEU) +CC (CC_DGTU) +CC (CC_C) diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 1b1b7dbe77c..e74698a1737 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2417,30 +2417,7 @@ extern int making_const_table; /* Condition code information. */ /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, - return the mode to be used for the comparison. - CCFPEmode should be used with floating inequalities, - CCFPmode should be used with floating equalities. - CC_NOOVmode should be used with SImode integer equalities. - CC_Zmode should be used if only the Z flag is set correctly - CCmode should be used otherwise. */ - -#define EXTRA_CC_MODES \ - CC(CC_NOOVmode, "CC_NOOV") \ - CC(CC_Zmode, "CC_Z") \ - CC(CC_SWPmode, "CC_SWP") \ - CC(CCFPmode, "CCFP") \ - CC(CCFPEmode, "CCFPE") \ - CC(CC_DNEmode, "CC_DNE") \ - CC(CC_DEQmode, "CC_DEQ") \ - CC(CC_DLEmode, "CC_DLE") \ - CC(CC_DLTmode, "CC_DLT") \ - CC(CC_DGEmode, "CC_DGE") \ - CC(CC_DGTmode, "CC_DGT") \ - CC(CC_DLEUmode, "CC_DLEU") \ - CC(CC_DLTUmode, "CC_DLTU") \ - CC(CC_DGEUmode, "CC_DGEU") \ - CC(CC_DGTUmode, "CC_DGTU") \ - CC(CC_Cmode, "CC_C") + return the mode to be used for the comparison. */ #define SELECT_CC_MODE(OP, X, Y) arm_select_cc_mode (OP, X, Y) diff --git a/gcc/config/c4x/c4x-modes.def b/gcc/config/c4x/c4x-modes.def new file mode 100644 index 00000000000..c2cbf3099b8 --- /dev/null +++ b/gcc/config/c4x/c4x-modes.def @@ -0,0 +1,102 @@ +/* Definitions of target machine for GNU compiler. TMS320C[34]x + Copyright (C) 2002 Free Software Foundation, Inc. + + Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) + and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl). + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + + On the C4x, we have a "no-overflow" mode which is used when an ADD, + SUB, NEG, or MPY insn is used to set the condition code. This is + to prevent the combiner from optimising away a following CMP of the + result with zero when a signed conditional branch or load insn + follows. + + The problem is a subtle one and deals with the manner in which the + negative condition (N) flag is used on the C4x. This flag does not + reflect the status of the actual result but of the ideal result had + no overflow occurred (when considering signed operands). + + For example, 0x7fffffff + 1 => 0x80000000 Z=0 V=1 N=0 C=0. Here + the flags reflect the untruncated result, not the actual result. + While the actual result is less than zero, the N flag is not set + since the ideal result of the addition without truncation would + have been positive. + + Note that the while the N flag is handled differently to most other + architectures, the use of it is self consistent and is not the + cause of the problem. + + Logical operations set the N flag to the MSB of the result so if + the result is negative, N is 1. However, integer and floating + point operations set the N flag to be the MSB of the result + exclusive ored with the overflow (V) flag. Thus if an overflow + occurs and the result does not have the MSB set (i.e., the result + looks like a positive number), the N flag is set. Conversely, if + an overflow occurs and the MSB of the result is set, N is set to 0. + Thus the N flag represents the sign of the result if it could have + been stored without overflow but does not represent the apparent + sign of the result. Note that most architectures set the N flag to + be the MSB of the result. + + The C4x approach to setting the N flag simplifies signed + conditional branches and loads which only have to test the state of + the N flag, whereas most architectures have to look at both the N + and V flags. The disadvantage is that there is no flag giving the + status of the sign bit of the operation. However, there are no + conditional load or branch instructions that make use of this + feature (e.g., BMI---branch minus) instruction. Note that BN and + BLT are identical in the C4x. + + To handle the problem where the N flag is set differently whenever + there is an overflow we use a different CC mode, CC_NOOVmode which + says that the CC reflects the comparison of the result against zero + if no overflow occurred. + + For example, + + [(set (reg:CC_NOOV 21) + (compare:CC_NOOV (minus:QI (match_operand:QI 1 "src_operand" "") + (match_operand:QI 2 "src_operand" "")) + (const_int 0))) + (set (match_operand:QI 0 "ext_reg_operand" "") + (minus:QI (match_dup 1) + (match_dup 2)))] + + Note that there is no problem for insns that don't return a result + like CMP, since the CC reflects the effect of operation. + + An example of a potential problem is when GCC + converts (LTU (MINUS (0x80000000) (0x7fffffff) (0x80000000))) + to (LEU (MINUS (0x80000000) (0x7fffffff) (0x7fffffff))) + to (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) + + Now (MINUS (0x80000000) (0x7fffffff)) returns 0x00000001 but the + C4x sets the N flag since the result without overflow would have + been 0xffffffff when treating the operands as signed integers. + Thus (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) sets the N + flag but (GE (0x00000001)) does not set the N flag. + + The upshot is that we can not use signed branch and conditional + load instructions after an add, subtract, neg, abs or multiply. + We must emit a compare insn to check the result against 0. */ + +CC (CC_NOOV) + diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h index 9ccb2f98f1d..a18dbebcd74 100644 --- a/gcc/config/c4x/c4x.h +++ b/gcc/config/c4x/c4x.h @@ -1284,85 +1284,6 @@ CUMULATIVE_ARGS; #define TARGET_MEM_FUNCTIONS -/* Add any extra modes needed to represent the condition code. - - On the C4x, we have a "no-overflow" mode which is used when an ADD, - SUB, NEG, or MPY insn is used to set the condition code. This is - to prevent the combiner from optimising away a following CMP of the - result with zero when a signed conditional branch or load insn - follows. - - The problem is a subtle one and deals with the manner in which the - negative condition (N) flag is used on the C4x. This flag does not - reflect the status of the actual result but of the ideal result had - no overflow occurred (when considering signed operands). - - For example, 0x7fffffff + 1 => 0x80000000 Z=0 V=1 N=0 C=0. Here - the flags reflect the untruncated result, not the actual result. - While the actual result is less than zero, the N flag is not set - since the ideal result of the addition without truncation would - have been positive. - - Note that the while the N flag is handled differently to most other - architectures, the use of it is self consistent and is not the - cause of the problem. - - Logical operations set the N flag to the MSB of the result so if - the result is negative, N is 1. However, integer and floating - point operations set the N flag to be the MSB of the result - exclusive ored with the overflow (V) flag. Thus if an overflow - occurs and the result does not have the MSB set (i.e., the result - looks like a positive number), the N flag is set. Conversely, if - an overflow occurs and the MSB of the result is set, N is set to 0. - Thus the N flag represents the sign of the result if it could have - been stored without overflow but does not represent the apparent - sign of the result. Note that most architectures set the N flag to - be the MSB of the result. - - The C4x approach to setting the N flag simplifies signed - conditional branches and loads which only have to test the state of - the N flag, whereas most architectures have to look at both the N - and V flags. The disadvantage is that there is no flag giving the - status of the sign bit of the operation. However, there are no - conditional load or branch instructions that make use of this - feature (e.g., BMI---branch minus) instruction. Note that BN and - BLT are identical in the C4x. - - To handle the problem where the N flag is set differently whenever - there is an overflow we use a different CC mode, CC_NOOVmode which - says that the CC reflects the comparison of the result against zero - if no overflow occurred. - - For example, - - [(set (reg:CC_NOOV 21) - (compare:CC_NOOV (minus:QI (match_operand:QI 1 "src_operand" "") - (match_operand:QI 2 "src_operand" "")) - (const_int 0))) - (set (match_operand:QI 0 "ext_reg_operand" "") - (minus:QI (match_dup 1) - (match_dup 2)))] - - Note that there is no problem for insns that don't return a result - like CMP, since the CC reflects the effect of operation. - - An example of a potential problem is when GCC - converts (LTU (MINUS (0x80000000) (0x7fffffff) (0x80000000))) - to (LEU (MINUS (0x80000000) (0x7fffffff) (0x7fffffff))) - to (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) - - Now (MINUS (0x80000000) (0x7fffffff)) returns 0x00000001 but the - C4x sets the N flag since the result without overflow would have - been 0xffffffff when treating the operands as signed integers. - Thus (GE (MINUS (0x80000000) (0x7fffffff) (0x00000000))) sets the N - flag but (GE (0x00000001)) does not set the N flag. - - The upshot is that we can not use signed branch and conditional - load instructions after an add, subtract, neg, abs or multiply. - We must emit a compare insn to check the result against 0. */ - -#define EXTRA_CC_MODES CC(CC_NOOVmode, "CC_NOOV") - /* CC_NOOVmode should be used when the first operand is a PLUS, MINUS, NEG or MULT. CCmode should be used when no special processing is needed. */ diff --git a/gcc/config/i386/i386-modes.def b/gcc/config/i386/i386-modes.def new file mode 100644 index 00000000000..5ef800ffcf5 --- /dev/null +++ b/gcc/config/i386/i386-modes.def @@ -0,0 +1,46 @@ +/* Definitions of target machine for GNU compiler for IA-32. + Copyright (C) 2002 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + + For the i386, we need separate modes when floating-point + equality comparisons are being done. + + Add CCNO to indicate comparisons against zero that requires + Overflow flag to be unset. Sign bit test is used instead and + thus can be used to form "a&b>0" type of tests. + + Add CCGC to indicate comparisons agains zero that allows + unspecified garbage in the Carry flag. This mode is used + by inc/dec instructions. + + Add CCGOC to indicate comparisons agains zero that allows + unspecified garbage in the Carry and Overflow flag. This + mode is used to simulate comparisons of (a-b) and (a+b) + against zero using sub/cmp/add operations. + + Add CCZ to indicate that only the Zero flag is valid. */ + +CC (CCGC) +CC (CCGOC) +CC (CCNO) +CC (CCZ) +CC (CCFP) +CC (CCFPU) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 12e9bc24f28..958ef58aa04 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2834,34 +2834,6 @@ do { \ #define NO_RECURSIVE_FUNCTION_CSE -/* Add any extra modes needed to represent the condition code. - - For the i386, we need separate modes when floating-point - equality comparisons are being done. - - Add CCNO to indicate comparisons against zero that requires - Overflow flag to be unset. Sign bit test is used instead and - thus can be used to form "a&b>0" type of tests. - - Add CCGC to indicate comparisons agains zero that allows - unspecified garbage in the Carry flag. This mode is used - by inc/dec instructions. - - Add CCGOC to indicate comparisons agains zero that allows - unspecified garbage in the Carry and Overflow flag. This - mode is used to simulate comparisons of (a-b) and (a+b) - against zero using sub/cmp/add operations. - - Add CCZ to indicate that only the Zero flag is valid. */ - -#define EXTRA_CC_MODES \ - CC (CCGCmode, "CCGC") \ - CC (CCGOCmode, "CCGOC") \ - CC (CCNOmode, "CCNO") \ - CC (CCZmode, "CCZ") \ - CC (CCFPmode, "CCFP") \ - CC (CCFPUmode, "CCFPU") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. diff --git a/gcc/config/i960/i960-modes.def b/gcc/config/i960/i960-modes.def new file mode 100644 index 00000000000..05fd40dbb16 --- /dev/null +++ b/gcc/config/i960/i960-modes.def @@ -0,0 +1,30 @@ +/* Definitions of target machine for GNU compiler, for Intel 80960 + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Steven McGeady, Intel Corp. + Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson + Converted to GCC 2.0 by Jim Wilson and Michael Tiemann, Cygnus Support. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + + Also, signed and unsigned comparisons are distinguished, as + are operations which are compatible with chkbit insns. */ + +CC (CC_UNS) +CC (CC_CHK) diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h index 4209a68da50..54dc02f297f 100644 --- a/gcc/config/i960/i960.h +++ b/gcc/config/i960/i960.h @@ -1200,14 +1200,6 @@ struct cum_args { int ca_nregparms; int ca_nstackparms; }; extern struct rtx_def *i960_compare_op0, *i960_compare_op1; -/* Add any extra modes needed to represent the condition code. - - Also, signed and unsigned comparisons are distinguished, as - are operations which are compatible with chkbit insns. */ -#define EXTRA_CC_MODES \ - CC(CC_UNSmode, "CC_UNS") \ - CC(CC_CHKmode, "CC_CHK") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. CC_NOOVmode should be used when the first operand is a diff --git a/gcc/config/ia64/ia64-modes.def b/gcc/config/ia64/ia64-modes.def new file mode 100644 index 00000000000..0c3eb127674 --- /dev/null +++ b/gcc/config/ia64/ia64-modes.def @@ -0,0 +1,29 @@ +/* Definitions of target machine GNU compiler. IA-64 version. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by James E. Wilson and + David Mosberger . + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + + CCImode is used to mark a single predicate register instead + of a register pair. This is currently only used in reg_raw_mode + so that flow doesn't do something stupid. */ + +CC (CCI) diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index cfc44d43964..ab265ca7a06 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -595,14 +595,6 @@ while (0) #define LOCAL_REGNO(REGNO) \ (IN_REGNO_P (REGNO) || LOC_REGNO_P (REGNO)) -/* Add any extra modes needed to represent the condition code. - - CCImode is used to mark a single predicate register instead - of a register pair. This is currently only used in reg_raw_mode - so that flow doesn't do something stupid. */ - -#define EXTRA_CC_MODES CC(CCImode, "CCI") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. Must be defined if EXTRA_CC_MODES is defined. */ diff --git a/gcc/config/m88k/m88k-modes.def b/gcc/config/m88k/m88k-modes.def new file mode 100644 index 00000000000..b5edc6cb82e --- /dev/null +++ b/gcc/config/m88k/m88k-modes.def @@ -0,0 +1,27 @@ +/* Definitions of target machine for GNU compiler for Motorola m88100. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com). + Currently maintained by (gcc@dg-rtp.dg.com) + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Extra machine modes to represent the condition code. */ + +CC (CCEVEN) + + diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h index 38bc2e0a629..1678b6bcf7e 100644 --- a/gcc/config/m88k/m88k.h +++ b/gcc/config/m88k/m88k.h @@ -1162,8 +1162,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, /*** Addressing Modes ***/ -#define EXTRA_CC_MODES CC(CCEVENmode, "CCEVEN") - #define SELECT_CC_MODE(OP,X,Y) CCmode /* #define HAVE_POST_INCREMENT 0 */ diff --git a/gcc/config/mmix/mmix-modes.def b/gcc/config/mmix/mmix-modes.def new file mode 100644 index 00000000000..563931a9a75 --- /dev/null +++ b/gcc/config/mmix/mmix-modes.def @@ -0,0 +1,27 @@ +/* Definitions of target machine for GNU compiler, for MMIX. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Hans-Peter Nilsson (hp@bitrange.com) + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Extra machine modes to represent the condition code. */ + +CC (CC_UNS) +CC (CC_FP) +CC (CC_FPEQ) +CC (CC_FUN) diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h index 4ac2c2fa3a4..8ffef0b96e7 100644 --- a/gcc/config/mmix/mmix.h +++ b/gcc/config/mmix/mmix.h @@ -851,12 +851,6 @@ typedef struct { int regs; int lib; int now_varargs; } CUMULATIVE_ARGS; /* Node: Condition Code */ -#define EXTRA_CC_MODES \ - CC(CC_UNSmode, "CC_UNS") \ - CC(CC_FPmode, "CC_FP") \ - CC(CC_FPEQmode, "CC_FPEQ") \ - CC(CC_FUNmode, "CC_FUN") - #define SELECT_CC_MODE(OP, X, Y) \ mmix_select_cc_mode (OP, X, Y) diff --git a/gcc/config/pa/pa-modes.def b/gcc/config/pa/pa-modes.def new file mode 100644 index 00000000000..75fba097ee0 --- /dev/null +++ b/gcc/config/pa/pa-modes.def @@ -0,0 +1,30 @@ +/* Definitions of target machine for GNU compiler, for the HP Spectrum. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support + and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for + Software Science at the University of Utah. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + + HPPA floating comparisons produce condition codes. */ + +CC (CCFP) + + diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 336703e3446..d71328b563e 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -1515,11 +1515,6 @@ do { \ between pointers and any other objects of this machine mode. */ #define Pmode word_mode -/* Add any extra modes needed to represent the condition code. - - HPPA floating comparisons produce condition codes. */ -#define EXTRA_CC_MODES CC(CCFPmode, "CCFP") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. CC_NOOVmode should be used when the first operand is a diff --git a/gcc/config/pdp11/pdp11-modes.def b/gcc/config/pdp11/pdp11-modes.def new file mode 100644 index 00000000000..494d96ab0db --- /dev/null +++ b/gcc/config/pdp11/pdp11-modes.def @@ -0,0 +1,26 @@ +/* Definitions of target machine for GNU compiler, for the pdp-11 + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + CCFPmode is used for FPU, but should we use a separate reg? */ + +CC (CCFP) + diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 99bb7fe32d5..58562b5bf82 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -884,12 +884,6 @@ extern int may_call_alloca; is done just by pretending it is already truncated. */ #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 - -/* Add any extra modes needed to represent the condition code. - - CCFPmode is used for FPU, but should we use a separate reg? */ -#define EXTRA_CC_MODES CC(CCFPmode, "CCFP") - /* Give a comparison code (EQ, NE etc) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. */ diff --git a/gcc/config/rs6000/rs6000-modes.def b/gcc/config/rs6000/rs6000-modes.def new file mode 100644 index 00000000000..ac4112ca8ed --- /dev/null +++ b/gcc/config/rs6000/rs6000-modes.def @@ -0,0 +1,31 @@ +/* Definitions of target machine for GNU compiler, for IBM RS/6000. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + + For the RS/6000, we need separate modes when unsigned (logical) comparisons + are being done and we need a separate mode for floating-point. We also + use a mode for the case when we are comparing the results of two + comparisons, as then only the EQ bit is valid in the register. */ + +CC (CCUNS) +CC (CCFP) +CC (CCEQ) diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 61046415bfd..19b35908830 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -2379,18 +2379,6 @@ do { \ /* #define ADJUST_INSN_LENGTH(X,LENGTH) */ -/* Add any extra modes needed to represent the condition code. - - For the RS/6000, we need separate modes when unsigned (logical) comparisons - are being done and we need a separate mode for floating-point. We also - use a mode for the case when we are comparing the results of two - comparisons, as then only the EQ bit is valid in the register. */ - -#define EXTRA_CC_MODES \ - CC(CCUNSmode, "CCUNS") \ - CC(CCFPmode, "CCFP") \ - CC(CCEQmode, "CCEQ") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFPmode should be used. CCUNSmode should be used diff --git a/gcc/config/s390/s390-modes.def b/gcc/config/s390/s390-modes.def new file mode 100644 index 00000000000..d4729990a44 --- /dev/null +++ b/gcc/config/s390/s390-modes.def @@ -0,0 +1,29 @@ +/* Definitions of target machine for GNU compiler, for IBM S/390 + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Hartmut Penner (hpenner@de.ibm.com) and + Ulrich Weigand (uweigand@de.ibm.com). +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. */ + +CC (CCZ) +CC (CCA) +CC (CCL) +CC (CCU) +CC (CCS) +CC (CCT) diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 0c6eb5ef86c..0a047965d9a 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -1207,15 +1207,6 @@ CUMULATIVE_ARGS; #define BRANCH_COST 1 -/* Add any extra modes needed to represent the condition code. */ -#define EXTRA_CC_MODES \ - CC (CCZmode, "CCZ") \ - CC (CCAmode, "CCA") \ - CC (CCLmode, "CCL") \ - CC (CCUmode, "CCU") \ - CC (CCSmode, "CCS") \ - CC (CCTmode, "CCT") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. */ diff --git a/gcc/config/sparc/sparc-modes.def b/gcc/config/sparc/sparc-modes.def new file mode 100644 index 00000000000..e3017552112 --- /dev/null +++ b/gcc/config/sparc/sparc-modes.def @@ -0,0 +1,42 @@ +/* Definitions of target machine for GNU compiler, for Sun SPARC. + Copyright (C) 2002 Free Software Foundation, Inc. + Contributed by Michael Tiemann (tiemann@cygnus.com). + 64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, + at Cygnus Support. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Add any extra modes needed to represent the condition code. + + On the Sparc, we have a "no-overflow" mode which is used when an add or + subtract insn is used to set the condition code. Different branches are + used in this case for some operations. + + We also have two modes to indicate that the relevant condition code is + in the floating-point condition code register. One for comparisons which + will generate an exception if the result is unordered (CCFPEmode) and + one for comparisons which will never trap (CCFPmode). + + CCXmode and CCX_NOOVmode are only used by v9. */ + +CC (CCX) +CC (CC_NOOV) +CC (CCX_NOOV) +CC (CCFP) +CC (CCFPE) + diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 333a5d56f16..58f3b696a35 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -2484,26 +2484,6 @@ do { \ /* Generate calls to memcpy, memcmp and memset. */ #define TARGET_MEM_FUNCTIONS -/* Add any extra modes needed to represent the condition code. - - On the Sparc, we have a "no-overflow" mode which is used when an add or - subtract insn is used to set the condition code. Different branches are - used in this case for some operations. - - We also have two modes to indicate that the relevant condition code is - in the floating-point condition code register. One for comparisons which - will generate an exception if the result is unordered (CCFPEmode) and - one for comparisons which will never trap (CCFPmode). - - CCXmode and CCX_NOOVmode are only used by v9. */ - -#define EXTRA_CC_MODES \ - CC(CCXmode, "CCX") \ - CC(CC_NOOVmode, "CC_NOOV") \ - CC(CCX_NOOVmode, "CCX_NOOV") \ - CC(CCFPmode, "CCFP") \ - CC(CCFPEmode, "CCFPE") - /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, return the mode to be used for the comparison. For floating-point, CCFP[E]mode is used. CC_NOOVmode should be used when the first operand diff --git a/gcc/configure b/gcc/configure index 2d18e737ac2..f3fb447f408 100755 --- a/gcc/configure +++ b/gcc/configure @@ -2242,7 +2242,7 @@ EOF fi # Find some useful tools -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -5077,6 +5077,20 @@ if test x$thread_file = x; then fi fi +# Look for a file containing extra machine modes. +if test -f $srcdir/config/${cpu_type}/${cpu_type}-modes.def; then + extra_modes_file='$(srcdir)/config/'${cpu_type}/${cpu_type}-modes.def + + cat >> confdefs.h <> confdefs.h <<\EOF +#define EXTRA_CC_MODES 1 +EOF + +fi + # auto-host.h is the file containing items generated by autoconf and is # the first file included by config.h. # If host=build, it is correct to have hconfig include auto-host.h @@ -5175,14 +5189,14 @@ fi echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 -echo "configure:5179: checking for library containing strerror" >&5 +echo "configure:5193: checking for library containing strerror" >&5 if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_strerror="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_strerror="none required" else @@ -5204,7 +5218,7 @@ rm -f conftest* test "$ac_cv_search_strerror" = "no" && for i in cposix; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_strerror="-l$i" break @@ -5238,12 +5252,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5242: checking for working const" >&5 +echo "configure:5256: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5313,12 +5327,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5317: checking for off_t" >&5 +echo "configure:5331: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5346,12 +5360,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5350: checking for size_t" >&5 +echo "configure:5364: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5381,19 +5395,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:5385: checking for working alloca.h" >&5 +echo "configure:5399: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -5414,12 +5428,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5418: checking for alloca" >&5 +echo "configure:5432: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -5479,12 +5493,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5483: checking whether alloca needs Cray hooks" >&5 +echo "configure:5497: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5513: checking for $ac_func" >&5 +echo "configure:5527: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5564,7 +5578,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5568: checking stack direction for C alloca" >&5 +echo "configure:5582: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5572,7 +5586,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -5614,12 +5628,12 @@ fi echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 -echo "configure:5618: checking whether we are using the GNU C Library 2.1 or newer" >&5 +echo "configure:5632: checking whether we are using the GNU C Library 2.1 or newer" >&5 if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5655,17 +5669,17 @@ stdlib.h string.h unistd.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5659: checking for $ac_hdr" >&5 +echo "configure:5673: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5696,12 +5710,12 @@ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ strdup strtoul tsearch __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5700: checking for $ac_func" >&5 +echo "configure:5714: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5765,7 +5779,7 @@ fi echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:5769: checking for iconv" >&5 +echo "configure:5783: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5773,7 +5787,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include @@ -5783,7 +5797,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else @@ -5795,7 +5809,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" cat > conftest.$ac_ext < #include @@ -5805,7 +5819,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:5809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes @@ -5826,13 +5840,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6 EOF echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 -echo "configure:5830: checking for iconv declaration" >&5 +echo "configure:5844: checking for iconv declaration" >&5 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5851,7 +5865,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_proto_iconv_arg1="" else @@ -5880,19 +5894,19 @@ EOF echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 -echo "configure:5884: checking for nl_langinfo and CODESET" >&5 +echo "configure:5898: checking for nl_langinfo and CODESET" >&5 if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char* cs = nl_langinfo(CODESET); ; return 0; } EOF -if { (eval echo configure:5896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_langinfo_codeset=yes else @@ -5915,19 +5929,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:5919: checking for LC_MESSAGES" >&5 +echo "configure:5933: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:5931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -5948,7 +5962,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:5952: checking whether NLS is requested" >&5 +echo "configure:5966: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -5971,7 +5985,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:5975: checking whether included gettext is requested" >&5 +echo "configure:5989: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -5991,17 +6005,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:5995: checking for libintl.h" >&5 +echo "configure:6009: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6022,12 +6036,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then EOF echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 -echo "configure:6026: checking for GNU gettext in libc" >&5 +echo "configure:6040: checking for GNU gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; @@ -6036,7 +6050,7 @@ bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:6040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libc=yes else @@ -6052,14 +6066,14 @@ echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 if test "$gt_cv_func_gnugettext1_libc" != "yes"; then echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 -echo "configure:6056: checking for GNU gettext in libintl" >&5 +echo "configure:6070: checking for GNU gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -lintl $LIBICONV" cat > conftest.$ac_ext < extern int _nl_msg_cat_cntr; @@ -6068,7 +6082,7 @@ bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gnugettext1_libintl=yes else @@ -6101,12 +6115,12 @@ EOF for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6105: checking for $ac_func" >&5 +echo "configure:6119: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6158,7 +6172,7 @@ done # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6162: checking for $ac_word" >&5 +echo "configure:6176: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6192,7 +6206,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6196: checking for $ac_word" >&5 +echo "configure:6210: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6229,7 +6243,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6233: checking for $ac_word" >&5 +echo "configure:6247: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6279,7 +6293,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6283: checking for $ac_word" >&5 +echo "configure:6297: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6313,7 +6327,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6317: checking for $ac_word" >&5 +echo "configure:6331: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6349,7 +6363,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6353: checking for $ac_word" >&5 +echo "configure:6367: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6421,7 +6435,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6425: checking for $ac_word" >&5 +echo "configure:6439: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6454,7 +6468,7 @@ done ac_verc_fail=yes else echo $ac_n "checking version of bison""... $ac_c" 1>&6 -echo "configure:6458: checking version of bison" >&5 +echo "configure:6472: checking version of bison" >&5 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -6499,7 +6513,7 @@ EOF if test "x$CATOBJEXT" != x; then echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:6503: checking for catalogs to be installed" >&5 +echo "configure:6517: checking for catalogs to be installed" >&5 # Look for .po and .gmo files in the source directory. CATALOGS= XLINGUAS= @@ -6557,7 +6571,7 @@ fi case $host_os in win32 | pe | cygwin* | mingw32* | uwin*) echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 -echo "configure:6561: checking whether windows registry support is requested" >&5 +echo "configure:6575: checking whether windows registry support is requested" >&5 if test "x$enable_win32_registry" != xno; then cat >> confdefs.h <<\EOF #define ENABLE_WIN32_REGISTRY 1 @@ -6566,14 +6580,14 @@ EOF echo "$ac_t""yes" 1>&6 echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 -echo "configure:6570: checking for library containing RegOpenKeyExA" >&5 +echo "configure:6584: checking for library containing RegOpenKeyExA" >&5 if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_RegOpenKeyExA="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_RegOpenKeyExA="none required" else @@ -6595,7 +6609,7 @@ rm -f conftest* test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_RegOpenKeyExA="-l$i" break @@ -6648,7 +6662,7 @@ esac if test "x$enable_win32_registry" != xno; then echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 -echo "configure:6652: checking registry key on windows hosts" >&5 +echo "configure:6666: checking registry key on windows hosts" >&5 cat >> confdefs.h <&6 -echo "configure:6866: checking what assembler to use" >&5 +echo "configure:6880: checking what assembler to use" >&5 gcc_cv_as= gcc_cv_gas_major_version= gcc_cv_gas_minor_version= @@ -6956,7 +6970,7 @@ fi # Figure out what linker we will be using. echo $ac_n "checking what linker to use""... $ac_c" 1>&6 -echo "configure:6960: checking what linker to use" >&5 +echo "configure:6974: checking what linker to use" >&5 gcc_cv_ld= gcc_cv_gld_major_version= gcc_cv_gld_minor_version= @@ -7049,7 +7063,7 @@ fi # Figure out what nm we will be using. echo $ac_n "checking what nm to use""... $ac_c" 1>&6 -echo "configure:7053: checking what nm to use" >&5 +echo "configure:7067: checking what nm to use" >&5 if test -x nm$host_exeext; then gcc_cv_nm=./nm$host_exeext elif test "x$program_prefix" != xNONE; then @@ -7061,7 +7075,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6 # Figure out what objdump we will be using. echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 -echo "configure:7065: checking what objdump to use" >&5 +echo "configure:7079: checking what objdump to use" >&5 if test -x objdump$host_exeext; then gcc_cv_objdump=./objdump$host_exeext elif test "x$program_prefix" != xNONE; then @@ -7073,7 +7087,7 @@ echo "$ac_t""$gcc_cv_objdump" 1>&6 # Figure out what assembler alignment features are present. echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 -echo "configure:7077: checking assembler alignment features" >&5 +echo "configure:7091: checking assembler alignment features" >&5 gcc_cv_as_alignment_features=none if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then # Gas version 2.6 and later support for .balign and .p2align. @@ -7121,7 +7135,7 @@ fi echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 -echo "configure:7125: checking assembler subsection support" >&5 +echo "configure:7139: checking assembler subsection support" >&5 gcc_cv_as_subsections=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then @@ -7161,7 +7175,7 @@ fi echo "$ac_t""$gcc_cv_as_subsections" 1>&6 echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 -echo "configure:7165: checking assembler weak support" >&5 +echo "configure:7179: checking assembler weak support" >&5 gcc_cv_as_weak=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then @@ -7184,7 +7198,7 @@ fi echo "$ac_t""$gcc_cv_as_weak" 1>&6 echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 -echo "configure:7188: checking assembler hidden support" >&5 +echo "configure:7202: checking assembler hidden support" >&5 gcc_cv_as_hidden=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 \ @@ -7247,7 +7261,7 @@ libgcc_visibility=$gcc_cv_as_hidden echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 -echo "configure:7251: checking assembler leb128 support" >&5 +echo "configure:7265: checking assembler leb128 support" >&5 gcc_cv_as_leb128=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then @@ -7292,7 +7306,7 @@ fi echo "$ac_t""$gcc_cv_as_leb128" 1>&6 echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 -echo "configure:7296: checking assembler eh_frame optimization" >&5 +echo "configure:7310: checking assembler eh_frame optimization" >&5 gcc_cv_as_eh_frame=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then @@ -7373,7 +7387,7 @@ fi echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 -echo "configure:7377: checking assembler section merging support" >&5 +echo "configure:7391: checking assembler section merging support" >&5 gcc_cv_as_shf_merge=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then @@ -7396,7 +7410,7 @@ fi echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 -echo "configure:7400: checking assembler thread-local storage support" >&5 +echo "configure:7414: checking assembler thread-local storage support" >&5 gcc_cv_as_tls=no conftest_s= tls_first_major= @@ -7488,7 +7502,7 @@ case "$target" in # All TARGET_ABI_OSF targets. alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 -echo "configure:7492: checking assembler supports explicit relocations" >&5 +echo "configure:7506: checking assembler supports explicit relocations" >&5 if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7538,7 +7552,7 @@ EOF ;; sparc*-*-*) echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 -echo "configure:7542: checking assembler .register pseudo-op support" >&5 +echo "configure:7556: checking assembler .register pseudo-op support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7566,7 +7580,7 @@ EOF fi echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 -echo "configure:7570: checking assembler supports -relax" >&5 +echo "configure:7584: checking assembler supports -relax" >&5 if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7594,7 +7608,7 @@ EOF fi echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 -echo "configure:7598: checking assembler and linker support unaligned pc related relocs" >&5 +echo "configure:7612: checking assembler and linker support unaligned pc related relocs" >&5 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7621,7 +7635,7 @@ EOF fi echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 -echo "configure:7625: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 +echo "configure:7639: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7662,7 +7676,7 @@ EOF if test "x$gcc_cv_as_flags64" != xno; then echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 -echo "configure:7666: checking for assembler offsetable %lo() support" >&5 +echo "configure:7680: checking for assembler offsetable %lo() support" >&5 if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7702,7 +7716,7 @@ EOF i[34567]86-*-* | x86_64-*-*) echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 -echo "configure:7706: checking assembler instructions" >&5 +echo "configure:7720: checking assembler instructions" >&5 gcc_cv_as_instructions= if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then @@ -7729,7 +7743,7 @@ EOF echo "$ac_t""$gcc_cv_as_instructions" 1>&6 echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 -echo "configure:7733: checking assembler GOTOFF in data directives" >&5 +echo "configure:7747: checking assembler GOTOFF in data directives" >&5 gcc_cv_as_gotoff_in_data=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x then @@ -7759,7 +7773,7 @@ EOF esac echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 -echo "configure:7763: checking assembler dwarf2 debug_line support" >&5 +echo "configure:7777: checking assembler dwarf2 debug_line support" >&5 gcc_cv_as_dwarf2_debug_line=no # ??? Not all targets support dwarf2 debug_line, even within a version # of gas. Moreover, we need to emit a valid instruction to trigger any @@ -7815,7 +7829,7 @@ fi echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 -echo "configure:7819: checking assembler --gdwarf2 support" >&5 +echo "configure:7833: checking assembler --gdwarf2 support" >&5 gcc_cv_as_gdwarf2_flag=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then @@ -7844,7 +7858,7 @@ fi echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 -echo "configure:7848: checking assembler --gstabs support" >&5 +echo "configure:7862: checking assembler --gstabs support" >&5 gcc_cv_as_gstabs_flag=no if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then @@ -7872,7 +7886,7 @@ fi echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 -echo "configure:7876: checking linker PT_GNU_EH_FRAME support" >&5 +echo "configure:7890: checking linker PT_GNU_EH_FRAME support" >&5 gcc_cv_ld_eh_frame_hdr=no if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then @@ -8044,7 +8058,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:8048: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:8062: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -8555,6 +8569,7 @@ s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g s%@LIBICONV@%$LIBICONV%g s%@manext@%$manext%g s%@objext@%$objext%g +s%@extra_modes_file@%$extra_modes_file%g s%@FORBUILD@%$FORBUILD%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g diff --git a/gcc/configure.in b/gcc/configure.in index c75b39e394e..418fba771cb 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -869,6 +869,19 @@ if test x$thread_file = x; then fi fi +# Look for a file containing extra machine modes. +if test -f $srcdir/config/${cpu_type}/${cpu_type}-modes.def; then + extra_modes_file='$(srcdir)/config/'${cpu_type}/${cpu_type}-modes.def + AC_SUBST(extra_modes_file) + AC_DEFINE_UNQUOTED(EXTRA_MODES_FILE, + "${cpu_type}/${cpu_type}-modes.def", + [Define to the name of a file containing a list of extra machine modes + for this architecture.]) + AC_DEFINE(EXTRA_CC_MODES, 1, + [Define if the target architecture needs extra machine modes to represent + the results of comparisons.]) +fi + # auto-host.h is the file containing items generated by autoconf and is # the first file included by config.h. # If host=build, it is correct to have hconfig include auto-host.h diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 26fd5e4c0cd..24ed26be88d 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -674,6 +674,10 @@ possibly a target Makefile fragment @file{t-@var{machine}} some other files. The names of these files may be changed from the defaults given by explicit specifications in @file{config.gcc}. @item +If necessary, a file @file{@var{machine}-modes.def} in the +@file{@var{machine}} directory, containing additional machine modes to +represent condition codes. @xref{Condition Code}, for further details. +@item Entries in @file{config.gcc} (@pxref{System Config, , The @file{config.gcc} File}) for the systems with this target architecture. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 45a65ce25d7..fe712dc7d81 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -4985,24 +4985,29 @@ two places, the @file{md} file and in @code{NOTICE_UPDATE_CC}. @findex EXTRA_CC_MODES @item EXTRA_CC_MODES -A list of additional modes for condition code values in registers -(@pxref{Jump Patterns}). This macro should expand to a sequence of -calls of the macro @code{CC} separated by white space. @code{CC} takes -two arguments. The first is the enumeration name of the mode, which -should begin with @samp{CC} and end with @samp{mode}. The second is a C -string giving the printable name of the mode; it should be the same as -the first argument, but with the trailing @samp{mode} removed. +Condition codes are represented in registers by machine modes of class +@code{MODE_CC}. By default, there is just one mode, @code{CCmode}, with +this class. If you need more such modes, create a file named +@file{@var{machine}-modes.def} in your @file{config/@var{machine}} +directory (@pxref{Back End, , Anatomy of a Target Back End}), containing +a list of these modes. Each entry in the list should be a call to the +macro @code{CC}. This macro takes one argument, which is the name of +the mode: it should begin with @samp{CC}. Do not put quotation marks +around the name, or include the trailing @samp{mode}; these are +automatically added. There should not be anything else in the file +except comments. -You should only define this macro if additional modes are required. +A sample @file{@var{machine}-modes.def} file might look like this: -A sample definition of @code{EXTRA_CC_MODES} is: @smallexample -#define EXTRA_CC_MODES \ - CC(CC_NOOVmode, "CC_NOOV") \ - CC(CCFPmode, "CCFP") \ - CC(CCFPEmode, "CCFPE") +CC (CC_NOOV) /* @r{Comparison only valid if there was no overflow.} */ +CC (CCFP) /* @r{Floating point comparison that cannot trap.} */ +CC (CCFPE) /* @r{Floating point comparison that may trap.} */ @end smallexample +When you create this file, the macro @code{EXTRA_CC_MODES} is +automatically defined by @command{configure}, with value @samp{1}. + @findex SELECT_CC_MODE @item SELECT_CC_MODE (@var{op}, @var{x}, @var{y}) Returns a mode from class @code{MODE_CC} to be used when comparison diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 5895c9c9fb4..13da298fd26 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -36,6 +36,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "tconfig.h" #include "tsystem.h" +#include "symcat.h" #include "machmode.h" /* Don't use `fancy_abort' here even if config.h says to use it. */ diff --git a/gcc/machmode.def b/gcc/machmode.def index 621233490bc..fe4b96eca20 100644 --- a/gcc/machmode.def +++ b/gcc/machmode.def @@ -151,18 +151,20 @@ DEF_MACHMODE (BLKmode, "BLK", MODE_RANDOM, 0, 0, 0, VOIDmode, VOIDmode) /* The modes for representing the condition codes come last. CCmode is always defined. Additional modes for the condition code can be - specified in the EXTRA_CC_MODES macro. All MODE_CC modes are the + specified in the EXTRA_CC_MODES header. All MODE_CC modes are the same width as SImode and have VOIDmode as their next wider mode. */ -#define CC(E, M) DEF_MACHMODE (E, M, MODE_CC, BITS_PER_UNIT*4, 4, 4, VOIDmode, VOIDmode) - -CC (CCmode, "CC") - -#ifdef EXTRA_CC_MODES -EXTRA_CC_MODES -#endif +/* We do not use CC() for CCmode to avoid a warning about use of + function-like macros with no arguments. */ +DEF_MACHMODE (CCmode, "CC", MODE_CC, BITS_PER_UNIT*4, 4, 4, VOIDmode, VOIDmode) +#ifdef EXTRA_MODES_FILE +#define CC(N) \ + DEF_MACHMODE (CONCAT2 (N,mode), STRINGX (N), \ + MODE_CC, BITS_PER_UNIT*4, 4, 4, VOIDmode, VOIDmode) +#include EXTRA_MODES_FILE #undef CC +#endif /* The symbol Pmode stands for one of the above machine modes (usually SImode). The tm file specifies which one. It is not a distinct mode. */