Add GCC 6.3.0 (#2745)
[unleashed-userland.git] / components / developer / gcc-6 / patches / 001-illumos-gcc.patch
blob9073521d7ecd90f625198e2eac406cd978b83e94
1 diff -ru --ignore-all-space gcc-6.3.0/contrib/compare_tests gcc-6.3.0-il/contrib/compare_tests
2 --- gcc-6.3.0/contrib/compare_tests 2013-05-13 19:52:42.000000000 +0200
3 +++ gcc-6.3.0-il/contrib/compare_tests 2017-01-31 01:07:31.354756677 +0100
4 @@ -107,8 +107,15 @@
5 usage "Must specify either two directories or two files"
6 fi
8 -sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$1" | awk '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' | cut -c1-2000 >$tmp1
9 -sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$2" | awk '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' | cut -c1-2000 >$tmp2
10 +osrev=`uname -sr`
11 +if [ `expr "$osrev" : "SunOS 5."` -eq "8" ]; then
12 + AWK=/usr/bin/nawk
13 +else
14 + AWK=awk
15 +fi
17 +sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$1" | $AWK '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' | cut -c1-2000 >$tmp1
18 +sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$2" | $AWK '/^Running target / {target = $3} { if (target != "unix") { sub(/: /, "&"target": " ); }; print $0; }' | cut -c1-2000 >$tmp2
20 before=$tmp1
21 now=$tmp2
22 diff -ru --ignore-all-space gcc-6.3.0/gcc/common.opt gcc-6.3.0-il/gcc/common.opt
23 --- gcc-6.3.0/gcc/common.opt 2016-03-17 16:11:35.000000000 +0100
24 +++ gcc-6.3.0-il/gcc/common.opt 2017-01-31 01:07:35.418911240 +0100
25 @@ -1029,6 +1029,11 @@
26 Common Var(flag_checking) Init(CHECKING_P)
27 Perform internal consistency checkings.
29 +fclone-functions
30 +Common Report Var(flag_clone_functions) Init(1)
31 +Allow the compiler to clone functions to facilitate certain optimizations.
32 +Enabled by default.
34 fcombine-stack-adjustments
35 Common Report Var(flag_combine_stack_adjustments) Optimization
36 Looks for opportunities to reduce stack adjustments and stack references.
37 @@ -2231,6 +2236,10 @@
38 Common Report Var(flag_strict_aliasing) Optimization
39 Assume strict aliasing rules apply.
41 +fstrict-calling-conventions
42 +Common Report Var(flag_strict_calling_conventions) Init(1)
43 +Use strict ABI calling conventions even for static functions
45 fstrict-overflow
46 Common Report Var(flag_strict_overflow) Optimization
47 Treat signed overflow as undefined.
48 diff -ru --ignore-all-space gcc-6.3.0/gcc/config/i386/i386.c gcc-6.3.0-il/gcc/config/i386/i386.c
49 --- gcc-6.3.0/gcc/config/i386/i386.c 2016-12-14 16:44:07.000000000 +0100
50 +++ gcc-6.3.0-il/gcc/config/i386/i386.c 2017-01-31 01:07:31.550765552 +0100
51 @@ -2445,6 +2445,10 @@
53 saved frame pointer if frame_pointer_needed
54 <- HARD_FRAME_POINTER
55 + [-msave-args] <- arg_save_offset
57 + [saveargs padding]
59 [saved regs]
60 <- regs_save_offset
61 [padding0]
62 @@ -2462,6 +2466,7 @@
64 struct ix86_frame
66 + int nmsave_args;
67 int nsseregs;
68 int nregs;
69 int va_arg_size;
70 @@ -2473,6 +2478,7 @@
71 HOST_WIDE_INT hard_frame_pointer_offset;
72 HOST_WIDE_INT stack_pointer_offset;
73 HOST_WIDE_INT hfp_save_offset;
74 + HOST_WIDE_INT arg_save_offset;
75 HOST_WIDE_INT reg_save_offset;
76 HOST_WIDE_INT sse_reg_save_offset;
78 @@ -2608,6 +2614,8 @@
80 static enum calling_abi ix86_function_abi (const_tree);
82 +static int ix86_nsaved_args (void);
83 +static void pro_epilogue_adjust_stack (rtx, rtx, rtx, int, bool);
85 #ifndef SUBTARGET32_DEFAULT_CPU
86 #define SUBTARGET32_DEFAULT_CPU "i386"
87 @@ -5196,6 +5204,9 @@
88 opts->x_ix86_isa_flags
89 |= OPTION_MASK_ISA_LZCNT & ~opts->x_ix86_isa_flags_explicit;
91 + if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && TARGET_SAVE_ARGS)
92 + error ("-msave-args makes no sense in the 32-bit mode");
94 /* Validate -mpreferred-stack-boundary= value or default it to
95 PREFERRED_STACK_BOUNDARY_DEFAULT. */
96 ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;
97 @@ -7088,6 +7099,7 @@
98 and callee not, or vice versa. Instead look at whether the callee
99 is optimized or not. */
100 if (target && opt_for_fn (target->decl, optimize)
101 + && !flag_strict_calling_conventions
102 && !(profile_flag && !flag_fentry))
104 cgraph_local_info *i = &target->local;
105 @@ -7179,6 +7191,7 @@
106 /* TARGET_SSE_MATH */
107 && (target_opts_for_fn (target->decl)->x_ix86_fpmath & FPMATH_SSE)
108 && opt_for_fn (target->decl, optimize)
109 + && !flag_strict_calling_conventions
110 && !(profile_flag && !flag_fentry))
112 cgraph_local_info *i = &target->local;
113 @@ -10939,7 +10952,7 @@
115 ix86_compute_frame_layout (&frame);
116 return (frame.stack_pointer_offset == UNITS_PER_WORD
117 - && (frame.nregs + frame.nsseregs) == 0);
118 + && (frame.nmsave_args + frame.nregs + frame.nsseregs) == 0);
121 /* Value should be nonzero if functions must have frame pointers.
122 @@ -10963,6 +10976,9 @@
123 if (TARGET_32BIT_MS_ABI && cfun->calls_setjmp)
124 return true;
126 + if (TARGET_SAVE_ARGS)
127 + return true;
129 /* Win64 SEH, very large frames need a frame-pointer as maximum stack
130 allocation is 4GB. */
131 if (TARGET_64BIT_MS_ABI && get_frame_size () > SEH_MAX_FRAME_SIZE)
132 @@ -11398,6 +11414,7 @@
134 frame->nregs = ix86_nsaved_regs ();
135 frame->nsseregs = ix86_nsaved_sseregs ();
136 + frame->nmsave_args = ix86_nsaved_args ();
138 /* 64-bit MS ABI seem to require stack alignment to be always 16,
139 except for function prologues, leaf functions and when the defult
140 @@ -11460,7 +11477,8 @@
143 frame->save_regs_using_mov
144 - = (TARGET_PROLOGUE_USING_MOVE && cfun->machine->use_fast_prologue_epilogue
145 + = ((TARGET_FORCE_SAVE_REGS_USING_MOV ||
146 + (TARGET_PROLOGUE_USING_MOVE && cfun->machine->use_fast_prologue_epilogue))
147 /* If static stack checking is enabled and done with probes,
148 the registers need to be saved before allocating the frame. */
149 && flag_stack_check != STATIC_BUILTIN_STACK_CHECK);
150 @@ -11480,6 +11498,13 @@
151 /* The traditional frame pointer location is at the top of the frame. */
152 frame->hard_frame_pointer_offset = offset;
154 + if (TARGET_SAVE_ARGS)
156 + offset += frame->nmsave_args * UNITS_PER_WORD;
157 + offset += (frame->nmsave_args % 2) * UNITS_PER_WORD;
159 + frame->arg_save_offset = offset;
161 /* Register save area */
162 offset += frame->nregs * UNITS_PER_WORD;
163 frame->reg_save_offset = offset;
164 @@ -11557,8 +11582,9 @@
165 /* Size prologue needs to allocate. */
166 to_allocate = offset - frame->sse_reg_save_offset;
168 - if ((!to_allocate && frame->nregs <= 1)
169 - || (TARGET_64BIT && to_allocate >= (HOST_WIDE_INT) 0x80000000))
170 + if (!TARGET_SAVE_ARGS &&
171 + ((!to_allocate && frame->nregs <= 1)
172 + || (TARGET_64BIT && to_allocate >= (HOST_WIDE_INT) 0x80000000)))
173 frame->save_regs_using_mov = false;
175 if (ix86_using_red_zone ()
176 @@ -11569,7 +11595,11 @@
178 frame->red_zone_size = to_allocate;
179 if (frame->save_regs_using_mov)
181 frame->red_zone_size += frame->nregs * UNITS_PER_WORD;
182 + frame->red_zone_size += frame->nmsave_args * UNITS_PER_WORD;
183 + frame->red_zone_size += (frame->nmsave_args % 2) * UNITS_PER_WORD;
185 if (frame->red_zone_size > RED_ZONE_SIZE - RED_ZONE_RESERVE)
186 frame->red_zone_size = RED_ZONE_SIZE - RED_ZONE_RESERVE;
188 @@ -11600,6 +11630,23 @@
189 frame->hard_frame_pointer_offset = frame->stack_pointer_offset - 128;
194 + if (getenv("DEBUG_FRAME_STUFF") != NULL)
196 + printf("nmsave_args: %d\n", frame->nmsave_args);
197 + printf("nsseregs: %d\n", frame->nsseregs);
198 + printf("nregs: %d\n", frame->nregs);
200 + printf("frame_pointer_offset: %llx\n", frame->frame_pointer_offset);
201 + printf("hard_frame_pointer_offset: %llx\n", frame->hard_frame_pointer_offset);
202 + printf("stack_pointer_offset: %llx\n", frame->stack_pointer_offset);
203 + printf("hfp_save_offset: %llx\n", frame->hfp_save_offset);
204 + printf("arg_save_offset: %llx\n", frame->arg_save_offset);
205 + printf("reg_save_offset: %llx\n", frame->reg_save_offset);
206 + printf("sse_reg_save_offset: %llx\n", frame->sse_reg_save_offset);
211 /* This is semi-inlined memory_address_length, but simplified
212 @@ -11708,6 +11755,24 @@
213 unsigned int regno;
214 rtx_insn *insn;
216 + if (TARGET_SAVE_ARGS)
218 + int i;
219 + int nsaved = ix86_nsaved_args ();
220 + int start = cfun->returns_struct;
222 + for (i = start; i < start + nsaved; i++)
224 + regno = x86_64_int_parameter_registers[i];
225 + insn = emit_insn (gen_push (gen_rtx_REG (word_mode, regno)));
226 + RTX_FRAME_RELATED_P (insn) = 1;
228 + if (nsaved % 2 != 0)
229 + pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx,
230 + GEN_INT (-UNITS_PER_WORD), -1, false);
234 for (regno = FIRST_PSEUDO_REGISTER - 1; regno-- > 0; )
235 if (GENERAL_REGNO_P (regno) && ix86_save_reg (regno, true))
237 @@ -11795,9 +11860,30 @@
238 /* Emit code to save registers using MOV insns.
239 First register is stored at CFA - CFA_OFFSET. */
240 static void
241 -ix86_emit_save_regs_using_mov (HOST_WIDE_INT cfa_offset)
242 +ix86_emit_save_regs_using_mov (struct ix86_frame *frame)
244 unsigned int regno;
245 + HOST_WIDE_INT cfa_offset = frame->arg_save_offset;
247 + if (TARGET_SAVE_ARGS)
249 + int i;
250 + int nsaved = ix86_nsaved_args ();
251 + int start = cfun->returns_struct;
253 + /* We deal with this twice? */
254 + if (nsaved % 2 != 0)
255 + cfa_offset -= UNITS_PER_WORD;
257 + for (i = start + nsaved - 1; i >= start; i--)
259 + regno = x86_64_int_parameter_registers[i];
260 + ix86_emit_save_reg_using_mov(word_mode, regno, cfa_offset);
261 + cfa_offset -= UNITS_PER_WORD;
265 + cfa_offset = frame->reg_save_offset;
267 for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
268 if (GENERAL_REGNO_P (regno) && ix86_save_reg (regno, true))
269 @@ -12839,7 +12925,7 @@
273 - int_registers_saved = (frame.nregs == 0);
274 + int_registers_saved = (frame.nregs == 0 && frame.nmsave_args == 0);
275 sse_registers_saved = (frame.nsseregs == 0);
277 if (frame_pointer_needed && !m->fs.fp_valid)
278 @@ -12879,6 +12965,7 @@
280 ix86_emit_save_regs ();
281 int_registers_saved = true;
283 gcc_assert (m->fs.sp_offset == frame.reg_save_offset);
286 @@ -12890,7 +12977,7 @@
287 && (! TARGET_STACK_PROBE
288 || frame.stack_pointer_offset < CHECK_STACK_LIMIT))
290 - ix86_emit_save_regs_using_mov (frame.reg_save_offset);
291 + ix86_emit_save_regs_using_mov (&frame);
292 int_registers_saved = true;
295 @@ -13133,7 +13220,7 @@
298 if (!int_registers_saved)
299 - ix86_emit_save_regs_using_mov (frame.reg_save_offset);
300 + ix86_emit_save_regs_using_mov (&frame);
301 if (!sse_registers_saved)
302 ix86_emit_save_sse_regs_using_mov (frame.sse_reg_save_offset);
304 @@ -13166,6 +13253,7 @@
305 relative to the value of the stack pointer at the end of the function
306 prologue, and moving instructions that access redzone area via frame
307 pointer inside push sequence violates this assumption. */
308 + /* XXX: We may wish to do this when SAVE_ARGS in general */
309 if (frame_pointer_needed && frame.red_zone_size)
310 emit_insn (gen_memory_blockage ());
312 @@ -13393,6 +13481,7 @@
314 /* See the comment about red zone and frame
315 pointer usage in ix86_expand_prologue. */
316 + /* XXX: We may want to do this when SAVE_ARGS in general */
317 if (frame_pointer_needed && frame.red_zone_size)
318 emit_insn (gen_memory_blockage ());
320 @@ -13586,6 +13675,36 @@
321 ix86_emit_restore_regs_using_pop ();
324 + if (TARGET_SAVE_ARGS) {
325 + /*
326 + * For each saved argument, emit a restore note, to make sure it happens
327 + * correctly within the shrink wrapping (I think).
329 + * Note that 'restore' in this case merely means the rule is the same as
330 + * it was on function entry, not that we have actually done a register
331 + * restore (which of course, we haven't).
333 + * If we do not do this, the DWARF code will emit sufficient restores to
334 + * provide balance on its own initiative, which in the presence of
335 + * -fshrink-wrap may actually _introduce_ unbalance (whereby we only
336 + * .cfi_offset a register sometimes, but will always .cfi_restore it.
337 + * This will trip an assert.)
338 + */
339 + int start = cfun->returns_struct;
340 + int nsaved = ix86_nsaved_args();
341 + int i;
343 + for (i = start + nsaved - 1; i >= start; i--)
344 + queued_cfa_restores
345 + = alloc_reg_note (REG_CFA_RESTORE,
346 + gen_rtx_REG(Pmode,
347 + x86_64_int_parameter_registers[i]),
348 + queued_cfa_restores);
350 + gcc_assert(m->fs.fp_valid);
354 /* If we used a stack pointer and haven't already got rid of it,
355 then do so now. */
356 if (m->fs.fp_valid)
357 @@ -14547,6 +14666,19 @@
358 return !ix86_legitimate_constant_p (mode, x);
361 +/* Return number of arguments to be saved on the stack with
362 + -msave-args. */
364 +static int
365 +ix86_nsaved_args (void)
367 + if (TARGET_SAVE_ARGS)
368 + return crtl->args.info.regno - cfun->returns_struct;
369 + else
370 + return 0;
374 /* Nonzero if the symbol is marked as dllimport, or as stub-variable,
375 otherwise zero. */
377 diff -ru --ignore-all-space gcc-6.3.0/gcc/config/i386/i386.opt gcc-6.3.0-il/gcc/config/i386/i386.opt
378 --- gcc-6.3.0/gcc/config/i386/i386.opt 2016-10-13 23:15:45.000000000 +0200
379 +++ gcc-6.3.0-il/gcc/config/i386/i386.opt 2017-01-31 01:07:31.550854008 +0100
380 @@ -499,6 +499,16 @@
381 Target Report Mask(TLS_DIRECT_SEG_REFS)
382 Use direct references against %gs when accessing tls data.
384 +msave-args
385 +Target Report Var(TARGET_SAVE_ARGS)
386 +Save integer arguments on the stack at function entry
388 +mforce-save-regs-using-mov
389 +Target Report Var(TARGET_FORCE_SAVE_REGS_USING_MOV)
390 +Save registers using push in function prologues. This is intentionally
391 +undocumented and used for msave-args testing.
394 mtune=
395 Target RejectNegative Joined Var(ix86_tune_string)
396 Schedule code for given CPU.
397 diff -ru --ignore-all-space gcc-6.3.0/gcc/config/sol2.h gcc-6.3.0-il/gcc/config/sol2.h
398 --- gcc-6.3.0/gcc/config/sol2.h 2016-01-04 15:30:50.000000000 +0100
399 +++ gcc-6.3.0-il/gcc/config/sol2.h 2017-01-31 01:07:31.613504607 +0100
400 @@ -155,15 +155,22 @@
401 #define SUPPORTS_INIT_PRIORITY HAVE_INITFINI_ARRAY_SUPPORT
403 #undef STARTFILE_ARCH_SPEC
404 -#define STARTFILE_ARCH_SPEC "%{ansi:values-Xc.o%s} \
405 - %{!ansi:values-Xa.o%s}"
406 +#define STARTFILE_ARCH_SPEC "%{std=c1x|std=gnu1x:values-Xc.o%s values-xpg6.o%s; \
407 + std=c11|std=gnu11:values-Xc.o%s values-xpg6.o%s; \
408 + std=c99|std=gnu99:values-Xc.o%s values-xpg6.o%s; \
409 + std=c9x|std=gnu9x:values-Xc.o%s values-xpg6.o%s; \
410 + std=c++0x|std=gnu++0x:values-Xc.o%s; \
411 + std=c++11|std=gnu++11:values-Xc.o%s; \
412 + std=c++03|std=gnu++03:values-Xc.o%s; \
413 + :values-Xa.o%s}"
416 #if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
417 #define STARTFILE_CRTBEGIN_SPEC "%{shared:crtbeginS.o%s} \
418 %{" PIE_SPEC ":crtbeginS.o%s} \
419 %{" NO_PIE_SPEC ":crtbegin.o%s}"
420 #else
421 -#define STARTFILE_CRTBEGIN_SPEC "crtbegin.o%s"
422 +#define STARTFILE_CRTBEGIN_SPEC "%{shared:crtbeginS.o%s;:crtbegin.o%s}"
423 #endif
425 #if SUPPORTS_INIT_PRIORITY
426 @@ -208,7 +215,7 @@
427 %{" PIE_SPEC ":crtendS.o%s} \
428 %{" NO_PIE_SPEC ":crtend.o%s}}"
429 #else
430 -#define ENDFILE_CRTEND_SPEC "crtend.o%s"
431 +#define ENDFILE_CRTEND_SPEC "%{shared:crtendS.o%s;:crtend.o%s}"
432 #endif
434 #undef ENDFILE_SPEC
435 diff -ru --ignore-all-space gcc-6.3.0/gcc/configure gcc-6.3.0-il/gcc/configure
436 --- gcc-6.3.0/gcc/configure 2016-12-11 17:23:04.000000000 +0100
437 +++ gcc-6.3.0-il/gcc/configure 2017-01-31 01:07:35.420151795 +0100
438 @@ -22798,6 +22798,7 @@
439 -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
440 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
441 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
442 + ld_vers_isillumos=`echo "$ld_ver" | grep '(illumos)'`
445 esac
446 @@ -27775,6 +27776,8 @@
447 # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251.
448 if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then
449 gcc_cv_ld_eh_frame_hdr=yes
450 + elif test "$ld_vers_minor" -ge 1735 && test -n "$ld_vers_isillumos"; then
451 + gcc_cv_ld_eh_frame_hdr=yes
454 esac
455 diff -ru --ignore-all-space gcc-6.3.0/gcc/configure.ac gcc-6.3.0-il/gcc/configure.ac
456 --- gcc-6.3.0/gcc/configure.ac 2016-12-11 17:23:04.000000000 +0100
457 +++ gcc-6.3.0-il/gcc/configure.ac 2017-01-31 01:07:35.420576310 +0100
458 @@ -2592,6 +2592,7 @@
459 -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
460 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
461 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
462 + ld_vers_isillumos=`echo "$ld_ver" | grep '(illumos)'`
465 esac
466 @@ -4852,6 +4853,8 @@
467 # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251.
468 if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then
469 gcc_cv_ld_eh_frame_hdr=yes
470 + elif test "$ld_vers_minor" -ge 1735 && test -n "$ld_vers_isillumos"; then
471 + gcc_cv_ld_eh_frame_hdr=yes
474 esac
475 diff -ru --ignore-all-space gcc-6.3.0/gcc/doc/invoke.texi gcc-6.3.0-il/gcc/doc/invoke.texi
476 --- gcc-6.3.0/gcc/doc/invoke.texi 2016-07-08 16:51:44.000000000 +0200
477 +++ gcc-6.3.0-il/gcc/doc/invoke.texi 2017-01-31 01:07:35.356443734 +0100
478 @@ -339,7 +339,7 @@
479 -fauto-inc-dec -fbranch-probabilities @gol
480 -fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol
481 -fbtr-bb-exclusive -fcaller-saves @gol
482 --fcombine-stack-adjustments -fconserve-stack @gol
483 +-fclone-functions -fcombine-stack-adjustments -fconserve-stack @gol
484 -fcompare-elim -fcprop-registers -fcrossjumping @gol
485 -fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules @gol
486 -fcx-limited-range @gol
487 @@ -7766,6 +7766,12 @@
488 The @option{-fstrict-aliasing} option is enabled at levels
489 @option{-O2}, @option{-O3}, @option{-Os}.
491 +@item -fstrict-calling-conventions
492 +@opindex fstrict-calling-conventions
493 +Use strict ABI calling conventions even with local functions.
494 +This disable certain optimizations that may cause GCC to call local
495 +functions in a manner other than that described by the ABI.
497 @item -fstrict-overflow
498 @opindex fstrict-overflow
499 Allow the compiler to assume strict signed overflow rules, depending
500 @@ -8184,6 +8190,15 @@
501 The default is @option{-fno-fat-lto-objects} on targets with linker plugin
502 support.
504 +@item -fno-clone-functions
505 +@opindex fno-clone-functions
506 +Forbid the implicit cloning of functions implicit in certain
507 +optimizations. This also effectively will disable any optimization
508 +which wishes to clone functions, equivalent to each function having
509 +the ``noclone'' attribute. This allows the prevention of the
510 +dissociation of a piece of text from an intelligible and expected
511 +symbol name, which may hamper debugging and tracing.
513 @item -fcompare-elim
514 @opindex fcompare-elim
515 After register allocation and post-register allocation instruction splitting,
516 @@ -12871,6 +12886,10 @@
517 addresses and sizes of sections. Pointers are 64 bits. Programs can be
518 statically linked only.
520 +@item -msave-args
521 +@opindex msave-args
522 +Save integer-sized arguments on the stack on function entry.
524 @item -mstrict-align
525 @opindex mstrict-align
526 Do not assume that unaligned memory references are handled by the system.
527 diff -ru --ignore-all-space gcc-6.3.0/gcc/dwarf2out.c gcc-6.3.0-il/gcc/dwarf2out.c
528 --- gcc-6.3.0/gcc/dwarf2out.c 2016-09-01 13:43:15.000000000 +0200
529 +++ gcc-6.3.0-il/gcc/dwarf2out.c 2017-01-31 01:07:35.421861016 +0100
530 @@ -20842,6 +20842,11 @@
531 /* Add the calling convention attribute if requested. */
532 add_calling_convention_attribute (subr_die, decl);
534 +#ifdef TARGET_SAVE_ARGS
535 + if (TARGET_SAVE_ARGS)
536 + add_AT_flag (subr_die, DW_AT_SUN_amd64_parmdump, 1);
537 +#endif
539 /* Output Dwarf info for all of the stuff within the body of the function
540 (if it has one - it may be just a declaration).
542 diff -ru --ignore-all-space gcc-6.3.0/gcc/intl.c gcc-6.3.0-il/gcc/intl.c
543 --- gcc-6.3.0/gcc/intl.c 2016-01-04 15:30:50.000000000 +0100
544 +++ gcc-6.3.0-il/gcc/intl.c 2017-01-31 01:07:35.421930308 +0100
545 @@ -74,17 +74,11 @@
547 if (!strcmp (open_quote, "`") && !strcmp (close_quote, "'"))
549 - /* Untranslated quotes that it may be possible to replace with
550 - U+2018 and U+2019; but otherwise use "'" instead of "`" as
551 - opening quote. */
552 + /*
553 + * open_quote is ` purely for ease of translation. If they aren't
554 + * translated, use ' for both
555 + */
556 open_quote = "'";
557 -#if defined HAVE_LANGINFO_CODESET
558 - if (locale_utf8)
560 - open_quote = "\xe2\x80\x98";
561 - close_quote = "\xe2\x80\x99";
563 -#endif
567 @@ -145,6 +139,3 @@
568 spaces[len] = '\0';
569 return spaces;
574 diff -ru --ignore-all-space gcc-6.3.0/gcc/symtab.c gcc-6.3.0-il/gcc/symtab.c
575 --- gcc-6.3.0/gcc/symtab.c 2016-04-04 11:26:29.000000000 +0200
576 +++ gcc-6.3.0-il/gcc/symtab.c 2017-01-31 01:07:35.422076751 +0100
577 @@ -1728,6 +1728,10 @@
578 tree new_decl;
579 symtab_node *new_node = NULL;
581 + /* Do not allow a clone to be created if function-cloning is disabled */
582 + if (!flag_clone_functions)
583 + return NULL;
585 /* First try to look up existing alias or base object
586 (if that is already non-overwritable). */
587 symtab_node *node = ultimate_alias_target ();
588 diff -ru --ignore-all-space gcc-6.3.0/gcc/testsuite/gcc.target/i386/local.c gcc-6.3.0-il/gcc/testsuite/gcc.target/i386/local.c
589 --- gcc-6.3.0/gcc/testsuite/gcc.target/i386/local.c 2015-12-29 11:32:21.000000000 +0100
590 +++ gcc-6.3.0-il/gcc/testsuite/gcc.target/i386/local.c 2017-01-31 01:07:32.695587218 +0100
591 @@ -1,5 +1,6 @@
592 /* { dg-do compile } */
593 -/* { dg-options "-O2 -funit-at-a-time" } */
594 +/* { dg-options "-O2 -funit-at-a-time -fno-strict-calling-conventions" { target ia32 } } */
595 +/* { dg-options "-O2 -funit-at-a-time" { target lp64 } } */
596 /* { dg-final { scan-assembler "magic\[^\\n\]*eax" { target ia32 } } } */
597 /* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! ia32 } } } } */
599 diff -ru --ignore-all-space gcc-6.3.0/gcc/tree-inline.c gcc-6.3.0-il/gcc/tree-inline.c
600 --- gcc-6.3.0/gcc/tree-inline.c 2016-12-07 23:32:34.000000000 +0100
601 +++ gcc-6.3.0-il/gcc/tree-inline.c 2017-01-31 01:07:35.422488542 +0100
602 @@ -5534,7 +5534,8 @@
603 tree_versionable_function_p (tree fndecl)
605 return (!lookup_attribute ("noclone", DECL_ATTRIBUTES (fndecl))
606 - && copy_forbidden (DECL_STRUCT_FUNCTION (fndecl)) == NULL);
607 + && (copy_forbidden (DECL_STRUCT_FUNCTION (fndecl)) == NULL)
608 + && flag_clone_functions);
611 /* Delete all unreachable basic blocks and update callgraph.
612 diff -ru --ignore-all-space gcc-6.3.0/include/dwarf2.def gcc-6.3.0-il/include/dwarf2.def
613 --- gcc-6.3.0/include/dwarf2.def 2015-08-14 11:48:13.000000000 +0200
614 +++ gcc-6.3.0-il/include/dwarf2.def 2017-01-31 01:07:31.389764268 +0100
615 @@ -399,6 +399,8 @@
616 DW_AT (DW_AT_GNU_discriminator, 0x2136)
617 /* VMS extensions. */
618 DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201)
619 +/* Sun extension. */
620 +DW_AT (DW_AT_SUN_amd64_parmdump, 0x2224)
621 /* GNAT extensions. */
622 /* GNAT descriptive type.
623 See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type . */
624 diff -ru --ignore-all-space gcc-6.3.0/libgcc/config.host gcc-6.3.0-il/libgcc/config.host
625 --- gcc-6.3.0/libgcc/config.host 2016-11-19 04:03:55.000000000 +0100
626 +++ gcc-6.3.0-il/libgcc/config.host 2017-01-31 01:07:30.277906831 +0100
627 @@ -267,7 +267,7 @@
628 *-*-solaris2*)
629 # Unless linker support and dl_iterate_phdr are present,
630 # unwind-dw2-fde-dip.c automatically falls back to unwind-dw2-fde.c.
631 - tmake_file="$tmake_file sol2/t-sol2 t-eh-dw2-dip t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-elf-ver"
632 + tmake_file="$tmake_file sol2/t-sol2 t-eh-dw2-dip t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-elf-ver t-crtstuff-pic"
633 if test $with_gnu_ld = yes; then
634 tmake_file="$tmake_file t-slibgcc-gld"
635 else
636 @@ -287,6 +287,7 @@
637 i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
638 # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
639 # part of the base system.
640 + extra_parts="$extra_parts crtbeginS.o crtendS.o"
642 sparc*-*-solaris2.1[0-9]*)
643 # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.