On Wed, Jul 27, 2011 at 2:23 PM, Joseph S. Myers <jos...@codesourcery.com> wrote: > On Wed, 27 Jul 2011, H.J. Lu wrote: > >> ; Maximum number of mask bits in a variable. >> MaxMaskBits >> ix86_isa_flags = 64 >> >> It mark ix86_isa_flags as 64bit. Any comments? > > The patch won't work as is. set_option, for example, casts a pointer to > (int *), and stores a mask that came from option->var_value, which is an > int, so this won't work with option fields not of type int or values that > don't fit in int; you'd need to check all uses of CLVC_BIT_CLEAR and > CLVC_BIT_SET in the source tree to adapt things for the possibility of > wider mask fields, and track the type of each such field.
We will prepare a separate patch. > Independently, I approve of setting need_64bit_hwint for all x86 targets, > but your patch doesn't achieve the expected simplification. In > config.gcc, there are settings for various individual targets that should > be removed once it's set in one place for all x86 targets. In > libcpp/configure.ac, similarly the cases for i[34567]86-*-darwin* > i[34567]86-*-solaris2.1[0-9]* x86_64-*-solaris2.1[0-9]* > i[34567]86-w64-mingw* i[34567]86-*-linux* (the last only if > --enable-targets=all) should all be removed as obsolete once > i[34567]86-*-* is there along with x86_64-*-*. > Is this patch OK for trunk? Thanks. H.J. ---- gcc/ 2011-07-27 H.J. Lu <hongjiu...@intel.com> * config.gcc: Set need_64bit_hwint to yes for x86 targets. libcpp/ 2011-07-27 H.J. Lu <hongjiu...@intel.com> * configure.ac: Set need_64bit_hwint to yes for x86 targets. * configure: Regenerated.
gcc/ 2011-07-27 H.J. Lu <hongjiu...@intel.com> * config.gcc: Set need_64bit_hwint to yes for x86 targets. libcpp/ 2011-07-27 H.J. Lu <hongjiu...@intel.com> * configure.ac: Set need_64bit_hwint to yes for x86 targets. * configure: Regenerated. diff --git a/gcc/config.gcc b/gcc/config.gcc index d7cf895..02cc556 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -345,6 +345,7 @@ i[34567]86-*-*) cpu_type=i386 c_target_objs="i386-c.o" cxx_target_objs="i386-c.o" + need_64bit_hwint=yes extra_options="${extra_options} fused-madd.opt" extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h @@ -1211,7 +1212,6 @@ hppa[12]*-*-hpux11*) fi ;; i[34567]86-*-darwin*) - need_64bit_hwint=yes need_64bit_isa=yes # Baseline choice for a machine that allows m64 support. with_cpu=${with_cpu:-core2} @@ -1293,7 +1293,6 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i esac done TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` - need_64bit_hwint=yes need_64bit_isa=yes case X"${with_cpu}" in Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver2|Xbdver1|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) @@ -1415,7 +1414,6 @@ i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*) tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h" tm_defines="${tm_defines} TARGET_BI_ARCH=1" tmake_file="$tmake_file i386/t-sol2-64" - need_64bit_hwint=yes need_64bit_isa=yes case X"${with_cpu}" in Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver2|Xbdver1|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3) @@ -1478,7 +1476,6 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) xm_file=i386/xm-mingw32.h case ${target} in x86_64-*-* | *-w64-*) - need_64bit_hwint=yes need_64bit_isa=yes ;; *) diff --git a/libcpp/configure b/libcpp/configure index b453a7b..c400d23 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -7312,9 +7312,7 @@ case $target in x86_64-*-* | \ ia64-*-* | \ hppa*64*-*-* | \ - i[34567]86-*-darwin* | \ - i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]* | \ - i[34567]86-w64-mingw* | \ + i[34567]86-*-* | x86_64-*-solaris2.1[0-9]* | \ mips*-*-* | \ mmix-*-* | \ powerpc*-*-* | \ @@ -7324,13 +7322,6 @@ case $target in spu-*-* | \ sh[123456789lbe]*-*-* | sh-*-*) need_64bit_hwint=yes ;; - i[34567]86-*-linux*) - if test "x$enable_targets" = xall; then - need_64bit_hwint=yes - else - need_64bit_hwint=no - fi - ;; *) need_64bit_hwint=no ;; esac diff --git a/libcpp/configure.ac b/libcpp/configure.ac index 170932c..e1d8851 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -150,9 +150,7 @@ case $target in x86_64-*-* | \ ia64-*-* | \ hppa*64*-*-* | \ - i[34567]86-*-darwin* | \ - i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]* | \ - i[34567]86-w64-mingw* | \ + i[34567]86-*-* | x86_64-*-solaris2.1[0-9]* | \ mips*-*-* | \ mmix-*-* | \ powerpc*-*-* | \ @@ -162,13 +160,6 @@ case $target in spu-*-* | \ sh[123456789lbe]*-*-* | sh-*-*) need_64bit_hwint=yes ;; - i[34567]86-*-linux*) - if test "x$enable_targets" = xall; then - need_64bit_hwint=yes - else - need_64bit_hwint=no - fi - ;; *) need_64bit_hwint=no ;; esac