diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-07-31 11:52:47 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2011-07-31 11:52:47 +0000 |
commit | e0ffd4494f188bf0ed600906c71b378d81cefdcc (patch) | |
tree | 0aac4a1b0affb942a465e451215ddfd3c4a560c6 | |
parent | fdbe84a67e4b595c4fb307703d9e10bb72e70a57 (diff) |
svn merge -r176491:176964 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_4-branch@176974 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/DATESTAMP | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 4 | ||||
-rw-r--r-- | gcc/expr.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 21 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/aes-avx-check.h | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx-check.h | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx-os-support.h | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pclmul-avx-check.h | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/namelist_72.f | 33 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 30 | ||||
-rw-r--r-- | libgfortran/ChangeLog | 9 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 1 |
13 files changed, 130 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d0a9e07e1b..bb4e5c4a3e8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-07-28 Uros Bizjak <ubizjak@gmail.com> + + PR target/47364 + * config/i386/i386.md (strlensi): Enable for !TARGET_64BIT only. + (strlendi): Enable for TARGET_64BIT only. + +2011-07-21 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/48973 + * expr.c (expand_expr_real_1) <case TRUTH_ANDIF_EXPR>: If + the comparison has a single bit signed type, use + constm1_rtx instead of const1_rtx for true value. + 2011-04-29 Alan Modra <amodra@gmail.com> * config/rs6000/rs6000.c (rs6000_delegitimize_address): Handle diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index a288945f0c4..b67c4ebe625 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20110720 +20110731 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index bbe56b85769..7280f4fadad 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -20367,7 +20367,7 @@ (unspec:SI [(match_operand:BLK 1 "general_operand" "") (match_operand:QI 2 "immediate_operand" "") (match_operand 3 "immediate_operand" "")] UNSPEC_SCAS))] - "" + "!TARGET_64BIT" { if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3])) DONE; @@ -20380,7 +20380,7 @@ (unspec:DI [(match_operand:BLK 1 "general_operand" "") (match_operand:QI 2 "immediate_operand" "") (match_operand 3 "immediate_operand" "")] UNSPEC_SCAS))] - "" + "TARGET_64BIT" { if (ix86_expand_strlen (operands[0], operands[1], operands[2], operands[3])) DONE; diff --git a/gcc/expr.c b/gcc/expr.c index bc75a4bb531..5ef00cf78cb 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9171,7 +9171,9 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, jumpifnot (exp, op1, -1); if (target) - emit_move_insn (target, const1_rtx); + emit_move_insn (target, + TYPE_PRECISION (type) == 1 && !TYPE_UNSIGNED (type) + ? constm1_rtx : const1_rtx); emit_label (op1); return ignore ? const0_rtx : target; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 17f6c59b64b..dfe6abb0ba2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,24 @@ +2011-07-28 Tobias Burnus <burnus@net-b.de> + + Backported from mainline + 2011-07-23 Tobias Burnus <burnus@net-b.de> + + PR fortran/49791 + * gfortran.dg/namelist_72.f: New. + +2011-07-27 Uros Bizjak <ubizjak@gmail.com> + + * gcc.target/i386/avx-os-support.h: New. + * gcc.target/i386/avx-check.h: Include avx-os-support.h + (main): Check avx_os_support before the test is run. + * gcc.target/i386/aes-avx-check.h: Ditto. + * gcc.target/i386/pclmul-avx-check.h: Ditto. + +2011-07-22 Uros Bizjak <ubizjak@gmail.com> + + * lib/target-supports.exp (check_avx_os_support_available): New. + (check_effective_target_avx_runtime): Use it. + 2010-12-28 H.J. Lu <hongjiu.lu@intel.com> * gcc.target/i386/rdrand-1.c: Updated. diff --git a/gcc/testsuite/gcc.target/i386/aes-avx-check.h b/gcc/testsuite/gcc.target/i386/aes-avx-check.h index e73e36eab25..96305fbb3ef 100644 --- a/gcc/testsuite/gcc.target/i386/aes-avx-check.h +++ b/gcc/testsuite/gcc.target/i386/aes-avx-check.h @@ -3,6 +3,7 @@ #endif #include <stdlib.h> #include "cpuid.h" +#include "avx-os-support.h" static void aes_avx_test (void); @@ -15,7 +16,9 @@ main () return 0; /* Run AES + AVX test only if host has AES + AVX support. */ - if ((ecx & (bit_AVX | bit_AES)) == (bit_AVX | bit_AES)) + if (((ecx & (bit_AVX | bit_OSXSAVE | bit_AES)) + == (bit_AVX | bit_OSXSAVE | bit_AES)) + && avx_os_support ()) { aes_avx_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx-check.h b/gcc/testsuite/gcc.target/i386/avx-check.h index 491da8b4c4f..c094eddfb99 100644 --- a/gcc/testsuite/gcc.target/i386/avx-check.h +++ b/gcc/testsuite/gcc.target/i386/avx-check.h @@ -1,6 +1,7 @@ #include <stdlib.h> #include "cpuid.h" #include "m256-check.h" +#include "avx-os-support.h" static void avx_test (void); @@ -13,7 +14,8 @@ main () return 0; /* Run AVX test only if host has AVX support. */ - if ((ecx & (bit_AVX | bit_OSXSAVE)) == (bit_AVX | bit_OSXSAVE)) + if (((ecx & (bit_AVX | bit_OSXSAVE)) == (bit_AVX | bit_OSXSAVE)) + && avx_os_support ()) { avx_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gcc.target/i386/avx-os-support.h b/gcc/testsuite/gcc.target/i386/avx-os-support.h new file mode 100644 index 00000000000..21d332f7d3d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx-os-support.h @@ -0,0 +1,10 @@ +/* Check if the OS supports executing AVX instructions. */ + +static int +avx_os_support (void) +{ + unsigned int eax, edx; + + __asm__ ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0)); + return (eax & 6) == 6; +} diff --git a/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h b/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h index de633336157..3eb84b86ddf 100644 --- a/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h +++ b/gcc/testsuite/gcc.target/i386/pclmul-avx-check.h @@ -3,6 +3,7 @@ #endif #include <stdlib.h> #include "cpuid.h" +#include "avx-os-support.h" static void pclmul_avx_test (void); @@ -15,7 +16,9 @@ main () return 0; /* Run PCLMUL + AVX test only if host has PCLMUL + AVX support. */ - if ((ecx & (bit_AVX | bit_PCLMUL)) == (bit_AVX | bit_PCLMUL)) + if (((ecx & (bit_AVX | bit_OSXSAVE | bit_PCLMUL)) + == (bit_AVX | bit_OSXSAVE | bit_PCLMUL)) + && avx_os_support ()) { pclmul_avx_test (); #ifdef DEBUG diff --git a/gcc/testsuite/gfortran.dg/namelist_72.f b/gcc/testsuite/gfortran.dg/namelist_72.f new file mode 100644 index 00000000000..22c08807616 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/namelist_72.f @@ -0,0 +1,33 @@ +! { dg-do run } +! +! PR fortran/49791 +! +! Contributed by Elliott Sales de Andrade +! + program namelist_test + + dimension xpos(5000), ypos(5000) + namelist /geometry/ xpos, ypos + + xpos = -huge(xpos) + ypos = -huge(ypos) + + open(unit=4,file='geometry.in') + write(4,'(a)') '$geometry' + write(4,'(a)') ' xpos(1)= 0.00, 0.10, 0.20, 0.30, 0.40,' + write(4,'(a)') ' ypos(1)= 0.50, 0.60, 0.70, 0.80, 0.90,' + write(4,'(a)') '$end' + + close(4) + + open (unit=4,file='geometry.in',status='old',form='formatted') + read (4,geometry) + close(4, status='delete') + + !print *, 'xpos', xpos(1:10), 'ypos', ypos(1:10) + + if (any (xpos(1:5) /= [0.00, 0.10, 0.20, 0.30, 0.40]))call abort() + if (any (ypos(1:5) /= [0.50, 0.60, 0.70, 0.80, 0.90]))call abort() + if (any (xpos(6:) /= -huge(xpos))) call abort () + if (any (ypos(6:) /= -huge(ypos))) call abort () + end diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 85bfefd53ef..5a9fb91fd10 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -870,8 +870,8 @@ proc check_sse_os_support_available { } { check_runtime_nocache sse_os_support_available { int main () { - __asm__ volatile ("movss %xmm2,%xmm1"); - return 0; + asm volatile ("movss %xmm2,%xmm1"); + return 0; } } "-msse" } else { @@ -880,6 +880,29 @@ proc check_sse_os_support_available { } { }] } +# Return 1 if the target OS supports running AVX executables, 0 +# otherwise. Cache the result. + +proc check_avx_os_support_available { } { + return [check_cached_effective_target avx_os_support_available { + # If this is not the right target then we can skip the test. + if { !([istarget x86_64-*-*] || [istarget i?86-*-*]) } { + expr 0 + } else { + # Check that OS has AVX and SSE saving enabled. + check_runtime_nocache avx_os_support_available { + int main () + { + unsigned int eax, edx; + + asm ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0)); + return (eax & 6) != 6; + } + } "" + } + }] +} + # Return 1 if the target supports executing SSE instructions, 0 # otherwise. Cache the result. @@ -1000,7 +1023,8 @@ proc check_effective_target_sse2_runtime { } { proc check_effective_target_avx_runtime { } { if { [check_effective_target_avx] - && [check_avx_hw_available] } { + && [check_avx_hw_available] + && [check_avx_os_support_available] } { return 1 } return 0 diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index bfcea76be56..15cfdd33169 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,12 @@ +2011-07-28 Tobias Burnus <burnus@net-b.de> + + Backport from mainline + 2011-07-23 Tobias Burnus <burnus@net-b.de> + + PR fortran/49791 + * io/list_read.c (nml_parse_qualifier): Remove check to + enabled extended read for another case. + 2011-04-16 Release Manager * GCC 4.4.6 released. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index e560f1209b9..d33eaa6fbea 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -2079,7 +2079,6 @@ nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad, do not allow excess data to be processed. */ if (is_array_section == 1 || !(compile_options.allow_std & GFC_STD_GNU) - || !dtp->u.p.ionml->touched || dtp->u.p.ionml->type == GFC_DTYPE_DERIVED) ls[dim].end = ls[dim].start; else |