Module Name: src Committed By: rin Date: Sat Oct 7 11:58:54 UTC 2023
Modified Files: src/external/gpl3/gcc.old/dist/gcc: dse.c Log Message: gcc.old: PR port-vax/57646 patch provided by Kalvis Duckmanton [5/21] Shift right by positive values that are less than HOST_BITS_PER_WIDE_INT to avoid illegal instruction exceptions on VAX. XXXRO: Hidden within ``#ifdef NB_FIX_VAX_BACKEND'' and enabled only for vax at the moment. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc.old/dist/gcc/dse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc.old/dist/gcc/dse.c diff -u src/external/gpl3/gcc.old/dist/gcc/dse.c:1.13 src/external/gpl3/gcc.old/dist/gcc/dse.c:1.14 --- src/external/gpl3/gcc.old/dist/gcc/dse.c:1.13 Mon Feb 20 02:11:05 2023 +++ src/external/gpl3/gcc.old/dist/gcc/dse.c Sat Oct 7 11:58:54 2023 @@ -301,7 +301,12 @@ static unsigned HOST_WIDE_INT lowpart_bitmask (int n) { unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U; -#if 1 // XXXMRG +#ifdef NB_FIX_VAX_BACKEND + if (n < 1) + return 0; + if (n >= HOST_BITS_PER_WIDE_INT) + return mask; +#else // XXXMRG gcc_assert(n >= 0 && n <= HOST_BITS_PER_WIDE_INT); if (n == 0) return 0; @@ -1340,6 +1345,10 @@ all_positions_needed_p (store_info *s_in return false; return true; } +#ifdef NB_FIX_VAX_BACKEND + if (const_start >= HOST_BITS_PER_WIDE_INT || const_start < 0) + return true; +#endif else { unsigned HOST_WIDE_INT mask