Pull up following revision(s) (requested by maya in ticket #137): external/gpl3/gcc/dist/gcc/dse.c: revision 1.10 external/gpl3/gcc/dist/gcc/reload.c: revision 1.8 Don't keep our local modifications as ifdef __NetBSD__. When we build netbsd on another OS, we produce a cross compiler without these definitions. Fixes some compiler crashes when building netbsd/vax on linux.diff -r1.9 -r1.9.2.1 src/external/gpl3/gcc/dist/gcc/dse.c
(martin)
--- src/external/gpl3/gcc/dist/gcc/dse.c 2019/01/19 12:10:04 1.9
+++ src/external/gpl3/gcc/dist/gcc/dse.c 2019/09/01 13:10:27 1.9.2.1
@@ -280,27 +280,27 @@ struct store_info | @@ -280,27 +280,27 @@ struct store_info | |||
280 | 280 | |||
281 | /* Set if this store stores the same constant value as REDUNDANT_REASON | 281 | /* Set if this store stores the same constant value as REDUNDANT_REASON | |
282 | insn stored. These aren't eliminated early, because doing that | 282 | insn stored. These aren't eliminated early, because doing that | |
283 | might prevent the earlier larger store to be eliminated. */ | 283 | might prevent the earlier larger store to be eliminated. */ | |
284 | struct insn_info_type *redundant_reason; | 284 | struct insn_info_type *redundant_reason; | |
285 | }; | 285 | }; | |
286 | 286 | |||
287 | /* Return a bitmask with the first N low bits set. */ | 287 | /* Return a bitmask with the first N low bits set. */ | |
288 | 288 | |||
289 | static unsigned HOST_WIDE_INT | 289 | static unsigned HOST_WIDE_INT | |
290 | lowpart_bitmask (int n) | 290 | lowpart_bitmask (int n) | |
291 | { | 291 | { | |
292 | unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U; | 292 | unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U; | |
293 | #ifdef __NetBSD__ // XXXMRG | 293 | #if 1 // XXXMRG | |
294 | gcc_assert(n >= 0 && n <= HOST_BITS_PER_WIDE_INT); | 294 | gcc_assert(n >= 0 && n <= HOST_BITS_PER_WIDE_INT); | |
295 | if (n == 0) | 295 | if (n == 0) | |
296 | return 0; | 296 | return 0; | |
297 | #endif | 297 | #endif | |
298 | return mask >> (HOST_BITS_PER_WIDE_INT - n); | 298 | return mask >> (HOST_BITS_PER_WIDE_INT - n); | |
299 | } | 299 | } | |
300 | 300 | |||
301 | static object_allocator<store_info> cse_store_info_pool ("cse_store_info_pool"); | 301 | static object_allocator<store_info> cse_store_info_pool ("cse_store_info_pool"); | |
302 | 302 | |||
303 | static object_allocator<store_info> rtx_store_info_pool ("rtx_store_info_pool"); | 303 | static object_allocator<store_info> rtx_store_info_pool ("rtx_store_info_pool"); | |
304 | 304 | |||
305 | /* This structure holds information about a load. These are only | 305 | /* This structure holds information about a load. These are only | |
306 | built for rtx bases. */ | 306 | built for rtx bases. */ |
--- src/external/gpl3/gcc/dist/gcc/reload.c 2019/01/19 12:10:04 1.7
+++ src/external/gpl3/gcc/dist/gcc/reload.c 2019/09/01 13:10:27 1.7.2.1
@@ -1138,27 +1138,27 @@ push_reload (rtx in, rtx out, rtx *inloc | @@ -1138,27 +1138,27 @@ push_reload (rtx in, rtx out, rtx *inloc | |||
1138 | However, we must reload the inner reg *as well as* the subreg in | 1138 | However, we must reload the inner reg *as well as* the subreg in | |
1139 | that case. */ | 1139 | that case. */ | |
1140 | 1140 | |||
1141 | if (in != 0 && reload_inner_reg_of_subreg (in, inmode, false)) | 1141 | if (in != 0 && reload_inner_reg_of_subreg (in, inmode, false)) | |
1142 | { | 1142 | { | |
1143 | if (REG_P (SUBREG_REG (in)) && HARD_REGISTER_P (SUBREG_REG (in))) | 1143 | if (REG_P (SUBREG_REG (in)) && HARD_REGISTER_P (SUBREG_REG (in))) | |
1144 | subreg_in_class | 1144 | subreg_in_class | |
1145 | = find_valid_class (inmode, GET_MODE (SUBREG_REG (in)), | 1145 | = find_valid_class (inmode, GET_MODE (SUBREG_REG (in)), | |
1146 | subreg_regno_offset (REGNO (SUBREG_REG (in)), | 1146 | subreg_regno_offset (REGNO (SUBREG_REG (in)), | |
1147 | GET_MODE (SUBREG_REG (in)), | 1147 | GET_MODE (SUBREG_REG (in)), | |
1148 | SUBREG_BYTE (in), | 1148 | SUBREG_BYTE (in), | |
1149 | GET_MODE (in)), | 1149 | GET_MODE (in)), | |
1150 | REGNO (SUBREG_REG (in))); | 1150 | REGNO (SUBREG_REG (in))); | |
1151 | #ifdef __NetBSD__ // XXXMRG | 1151 | #if 1 // XXXMRG | |
1152 | else if (REG_P (SUBREG_REG (in)) | 1152 | else if (REG_P (SUBREG_REG (in)) | |
1153 | || GET_CODE (SUBREG_REG (in)) == SYMBOL_REF) | 1153 | || GET_CODE (SUBREG_REG (in)) == SYMBOL_REF) | |
1154 | #else | 1154 | #else | |
1155 | else if (CONSTANT_P (SUBREG_REG (in)) | 1155 | else if (CONSTANT_P (SUBREG_REG (in)) | |
1156 | || GET_CODE (SUBREG_REG (in)) == PLUS) | 1156 | || GET_CODE (SUBREG_REG (in)) == PLUS) | |
1157 | #endif | 1157 | #endif | |
1158 | subreg_in_class = find_valid_class_1 (inmode, | 1158 | subreg_in_class = find_valid_class_1 (inmode, | |
1159 | GET_MODE (SUBREG_REG (in)), | 1159 | GET_MODE (SUBREG_REG (in)), | |
1160 | rclass); | 1160 | rclass); | |
1161 | 1161 | |||
1162 | /* This relies on the fact that emit_reload_insns outputs the | 1162 | /* This relies on the fact that emit_reload_insns outputs the | |
1163 | instructions for input reloads of type RELOAD_OTHER in the same | 1163 | instructions for input reloads of type RELOAD_OTHER in the same | |
1164 | order as the reloads. Thus if the outer reload is also of type | 1164 | order as the reloads. Thus if the outer reload is also of type |