~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/9e/9ee4a7c141bd6110acda51245f5558575c8600db.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
GCC 4.8 Release Series -- Changes, New Features, and Fixes
 
2
==========================================================
 
3
 
 
4
 
 
5
Caveats
 
6
=======
 
7
 
 
8
GCC now uses C++ as its implementation language. This means that to build GCC
 
9
from sources, you will need a C++ compiler that understands C++ 2003. For more
 
10
details on the rationale and specific changes, please refer to the C++
 
11
conversion page.
 
12
 
 
13
To enable the Graphite framework for loop optimizations you now need CLooG
 
14
version 0.18.0 and ISL version 0.11.1. Both can be obtained from the GCC
 
15
infrastructure directory. The installation manual contains more information
 
16
about requirements to build GCC.
 
17
 
 
18
GCC now uses a more aggressive analysis to derive an upper bound for the
 
19
number of iterations of loops using constraints imposed by language standards.
 
20
This may cause non-conforming programs to no longer work as expected, such as
 
21
SPEC CPU 2006 464.h264ref and 416.gamess. A new option, -fno-aggressive-loop-
 
22
optimizations, was added to disable this aggressive analysis. In some loops
 
23
that have known constant number of iterations, but undefined behavior is known
 
24
to occur in the loop before reaching or during the last iteration, GCC will
 
25
warn about the undefined behavior in the loop instead of deriving lower upper
 
26
bound of the number of iterations for the loop. The warning can be disabled
 
27
with -Wno-aggressive-loop-optimizations.
 
28
 
 
29
On ARM, a bug has been fixed in GCC's implementation of the AAPCS rules for
 
30
the layout of vectors that could lead to wrong code being generated. Vectors
 
31
larger than 8 bytes in size are now by default aligned to an 8-byte boundary.
 
32
This is an ABI change: code that makes explicit use of vector types may be
 
33
incompatible with binary objects built with older versions of GCC. Auto-
 
34
vectorized code is not affected by this change.
 
35
 
 
36
On AVR, support has been removed for the command-line option -mshort-calls
 
37
deprecated in GCC 4.7.
 
38
 
 
39
On AVR, the configure option --with-avrlibc supported since GCC 4.7.2 is
 
40
turned on per default for all non-RTEMS configurations. This option arranges
 
41
for a better integration of AVR_Libc with avr-gcc. For technical details, see
 
42
PR54461. To turn off the option in non-RTEMS configurations, use --with-
 
43
avrlibc=no. If the compiler is configured for RTEMS, the option is always
 
44
turned off.
 
45
 
 
46
More information on porting to GCC 4.8 from previous versions of GCC can be
 
47
found in the porting guide (http://gcc.gnu.org/gcc-4.8/porting_to.html) for
 
48
this release.
 
49
 
 
50
General Optimizer Improvements (and Changes)
 
51
============================================
 
52
 
 
53
 - DWARF4 is now the default when generating DWARF debug information. When -g
 
54
   is used on a platform that uses DWARF debugging information, GCC will now
 
55
   default to -gdwarf-4 -fno-debug-types-section.
 
56
   GDB 7.5, Valgrind 3.8.0 and elfutils 0.154 debug information consumers
 
57
   support DWARF4 by default. Before GCC 4.8 the default version used was
 
58
   DWARF2. To make GCC 4.8 generate an older DWARF version use -g together with
 
59
   -gdwarf-2 or -gdwarf-3. The default for Darwin and VxWorks is still
 
60
   -gdwarf-2 -gstrict-dwarf.
 
61
 
 
62
 - A new general optimization level, -Og, has been introduced. It addresses the
 
63
   need for fast compilation and a superior debugging experience while
 
64
   providing a reasonable level of runtime performance. Overall experience for
 
65
   development should be better than the default optimization level -O0.
 
66
 
 
67
 - A new option -ftree-partial-pre was added to control the partial redundancy
 
68
   elimination (PRE) optimization. This option is enabled by default at the -O3
 
69
   optimization level, and it makes PRE more aggressive.
 
70
 
 
71
 - The option -fconserve-space has been removed; it was no longer useful on
 
72
   most targets since GCC supports putting variables into BSS without making
 
73
   them common.
 
74
 
 
75
 - The struct reorg and matrix reorg optimizations (command-line-options
 
76
   -fipa-struct-reorg and -fipa-matrix-reorg) have been -removed. They did not
 
77
   always work correctly, nor did they work -with link-time optimization (LTO),
 
78
   hence were only applicable to -programs consisting of a single translation
 
79
   unit.
 
80
 
 
81
 - Several scalability bottle-necks have been removed from GCC's optimization
 
82
   passes. Compilation of extremely large functions, e.g. due to the use of the
 
83
   flatten attribute in the "Eigen" C++ linear algebra templates library, is
 
84
   significantly faster than previous releases of GCC.
 
85
 
 
86
 - Link-time optimization (LTO) improvements:
 
87
 
 
88
   - LTO partitioning has been rewritten for better reliability and
 
89
     maintanibility. Several important bugs leading to link failures have been
 
90
     fixed.
 
91
 
 
92
 - Interprocedural optimization improvements:
 
93
 
 
94
   - A new symbol table has been implemented. It builds on existing callgraph
 
95
     and varpool modules and provide a new API. Unusual symbol visibilities and
 
96
     aliases are handled more consistently leading to, for example, more
 
97
     aggressive unreachable code removal with LTO.
 
98
 
 
99
   - The inline heuristic can now bypass limits on the size of of inlined
 
100
     functions when the inlining is particularly profitable. This happens, for
 
101
     example, when loop bounds or array strides get propagated.
 
102
 
 
103
   - Values passed through aggregates (either by value or reference) are now
 
104
     propagated at the inter-procedural level leading to better inlining
 
105
     decisions (for example in the case of Fortran array descriptors) and
 
106
     devirtualization.
 
107
 
 
108
 - AddressSanitizer, a fast memory error detector, has been added and can be
 
109
   enabled via -fsanitize=address. Memory access instructions will be
 
110
   instrumented to detect heap-, stack-, and global-buffer overflow as well as
 
111
   use-after-free bugs. To get nicer stacktraces, use -fno-omit-frame-pointer.
 
112
   The AddressSanitizer is available on IA-32/x86-64/x32/PowerPC/PowerPC64 GNU/
 
113
   Linux and on x86-64 Darwin.
 
114
 
 
115
 - ThreadSanitizer has been added and can be enabled via -fsanitize=thread.
 
116
   Instructions will be instrumented to detect data races. The ThreadSanitizer
 
117
   is available on x86-64 GNU/Linux.
 
118
 
 
119
 
 
120
New Languages and Language specific improvements
 
121
================================================
 
122
 
 
123
 
 
124
C family
 
125
--------
 
126
 
 
127
 - Each diagnostic emitted now includes the original source line and a caret
 
128
   '^' indicating the column. The option -fno-diagnostics-show-caret suppresses
 
129
   this information.
 
130
 
 
131
 - The option -ftrack-macro-expansion=2 is now enabled by default. This allows
 
132
   the compiler to display the macro expansion stack in diagnostics. Combined
 
133
   with the caret information, an example diagnostic showing these two features
 
134
   is:
 
135
 
 
136
     t.c:1:94: error: invalid operands to binary < (have ‘struct mystruct’ and ‘float’)
 
137
     #define MYMAX(A,B)    __extension__ ({ __typeof__(A) __a = (A);
 
138
                                            __typeof__(B) __b = (B);
 
139
                                             __a < __b ? __b : __a; })
 
140
                                                 ^
 
141
     t.c:7:7: note: in expansion of macro 'MYMAX'
 
142
        X = MYMAX(P, F);
 
143
            ^
 
144
 
 
145
 - A new -Wsizeof-pointer-memaccess warning has been added (also enabled by
 
146
   -Wall) to warn about suspicious length parameters to certain string and
 
147
   memory built-in functions if the argument uses sizeof. This warning warns
 
148
   e.g. about memset (ptr, 0, sizeof (ptr)); if ptr is not an array, but a
 
149
   pointer, and suggests a possible fix, or about
 
150
   memcpy (&foo, ptr, sizeof (&foo));.
 
151
 
 
152
 - The new option -Wpedantic is an alias for -pedantic, which is now
 
153
   deprecated. The forms -Wno-pedantic, -Werror=pedantic, and -Wno-
 
154
   error=pedantic work in the same way as for any other -W option. One caveat
 
155
   is that -Werror=pedantic is not equivalent to -pedantic-errors, since the
 
156
   latter makes into errors some warnings that are not controlled by
 
157
   -Wpedantic, and the former only affects diagnostics that are disabled when
 
158
   using -Wno-pedantic.
 
159
 
 
160
 - The option -Wshadow no longer warns if a declaration shadows a function
 
161
   declaration, unless the former declares a function or pointer to function,
 
162
   because this is a_common_and_valid_case_in_real-world_code.
 
163
 
 
164
 
 
165
C++
 
166
---
 
167
 
 
168
 - G++ now implements the C++11 thread_local keyword; this differs from the GNU
 
169
   __thread keyword primarily in that it allows dynamic initialization and
 
170
   destruction semantics. Unfortunately, this support requires a run-time
 
171
   penalty for references to non-function-local thread_local variables defined
 
172
   in a different translation unit even if they don't need dynamic
 
173
   initialization, so users may want to continue to use __thread for TLS
 
174
   variables with static initialization semantics.
 
175
 
 
176
   If the programmer can be sure that no use of the variable in a non-defining
 
177
   TU needs to trigger dynamic initialization (either because the variable is
 
178
   statically initialized, or a use of the variable in the defining TU will be
 
179
   executed before any uses in another TU), they can avoid this overhead with
 
180
   the -fno-extern-tls-init option.
 
181
 
 
182
   OpenMP threadprivate variables now also support dynamic initialization and
 
183
   destruction by the same mechanism.
 
184
 
 
185
 - G++ now implements the C++11 attribute syntax, e.g.
 
186
 
 
187
     [[noreturn]] void f();
 
188
 
 
189
   and also the alignment specifier, e.g.
 
190
 
 
191
     alignas(double) int i;
 
192
 
 
193
 - G++ now implements C++11 inheriting constructors, e.g.
 
194
 
 
195
     struct A { A(int); };
 
196
     struct B: A { using A::A; }; // defines B::B(int)
 
197
     B b(42); // OK
 
198
 
 
199
 - As of GCC 4.8.1, G++ implements the change to decltype semantics from N3276.
 
200
 
 
201
     struct A f();
 
202
     decltype(f()) g();    // OK, return type of f() is not required
 
203
     to be complete.
 
204
 
 
205
 - G++ now supports a -std=c++1y option for experimentation with features
 
206
   proposed for the next revision of the standard, expected around 2017.
 
207
   Currently the only difference from -std=c++11 is support for return type
 
208
   deduction in normal functions, as proposed in N3386.
 
209
 
 
210
 - The G++ namespace association extension, __attribute ((strong)), has been
 
211
   deprecated. Inline namespaces should be used instead.
 
212
 
 
213
 - G++ now supports a -fext-numeric-literal option to control whether GNU
 
214
   numeric literal suffixes are accepted as extensions or processed as C++11
 
215
   user-defined numeric literal suffixes. The flag is on (use suffixes for GNU
 
216
   literals) by default for -std=gnu++*, and -std=c++98. The flag is off (use
 
217
   suffixes for user-defined literals) by default for -std=c++11 and later.
 
218
 
 
219
 
 
220
Runtime Library (libstdc++)
 
221
---------------------------
 
222
 
 
223
 - Improved_experimental_support_for_the_new_ISO_C++_standard,_C++11,
 
224
   including:
 
225
 
 
226
   - forward_list meets the allocator-aware container requirements;
 
227
 
 
228
   - this_thread::sleep_for(), this_thread::sleep_until() and this_thread::
 
229
     yield() are defined without requiring the configure option
 
230
     --enable-libstdcxx-time;
 
231
 
 
232
 - Improvements to <random>:
 
233
 
 
234
   - SSE optimized normal_distribution.
 
235
 
 
236
   - Use of hardware RNG instruction for random_device on new x86 processors
 
237
     (requires the assembler to support the instruction.)
 
238
 
 
239
   and <ext/random>:
 
240
 
 
241
   - New random number engine simd_fast_mersenne_twister_engine with an
 
242
     optimized SSE implementation.
 
243
 
 
244
   - New random number distributions beta_distribution, normal_mv_distribution,
 
245
     rice_distribution, nakagami_distribution, pareto_distribution,
 
246
     k_distribution, arcsine_distribution, hoyt_distribution.
 
247
 
 
248
 - Added --disable-libstdcxx-verbose configure option to disable diagnostic
 
249
   messages issued when a process terminates abnormally. This may be useful for
 
250
   embedded systems to reduce the size of executables that link statically to
 
251
   the library.
 
252
 
 
253
 
 
254
Fortran
 
255
-------
 
256
 
 
257
 - Compatibility notice:
 
258
 
 
259
   - Module files: The version of module files (.mod) has been incremented.
 
260
     Fortran MODULEs compiled by earlier GCC versions have to be recompiled,
 
261
     when they are USEd by files compiled with GCC 4.8. GCC 4.8 is not able to
 
262
     read .mod files created by earlier versions; attempting to do so gives an
 
263
     error message.
 
264
     Note: The ABI of the produced assembler data itself has not changed;
 
265
     object files and libraries are fully compatible with older versions except
 
266
     as noted below.
 
267
 
 
268
   - ABI: Some internal names (used in the assembler/object file) have changed
 
269
     for symbols declared in the specification part of a module. If an affected
 
270
     module - or a file using it via use association - is recompiled, the
 
271
     module and all files which directly use such symbols have to be recompiled
 
272
     as well. This change only affects the following kind of module symbols:
 
273
 
 
274
     - Procedure pointers. Note: C-interoperable function pointers (type
 
275
       (c_funptr)) are not affected nor are procedure-pointer components.
 
276
     - Deferred-length character strings.
 
277
 
 
278
 - The BACKTRACE intrinsic subroutine has been added. It shows a backtrace at
 
279
   an arbitrary place in user code; program execution continues normally
 
280
   afterwards.
 
281
 
 
282
 - The -Wc-binding-type warning option has been added (disabled by default). It
 
283
   warns if the a variable might not be C interoperable; in particular, if the
 
284
   variable has been declared using an intrinsic type with default kind instead
 
285
   of using a kind parameter defined for C interoperability in the intrinsic
 
286
   ISO_C_Binding module. Before, this warning was always printed. The
 
287
   -Wc-binding-type option is enabled by -Wall.
 
288
 
 
289
 - The -Wrealloc-lhs and -Wrealloc-lhs-all warning command-line options have
 
290
   been added, which diagnose when code to is inserted for automatic
 
291
   (re)allocation of a variable during assignment. This option can be used to
 
292
   decide whether it is safe to use -fno-realloc-lhs. Additionally, it can be
 
293
   used to find automatic (re)allocation in hot loops. (For arrays, replacing
 
294
   var= by var(:)= disables the automatic reallocation.)
 
295
 
 
296
 - The -Wcompare-reals command-line option has been added. When this is set,
 
297
   warnings are issued when comparing REAL or COMPLEX types for equality and
 
298
   inequality; consider replacing a == b by abs(a-b) < eps with a suitable eps.
 
299
   -Wcompare-reals is enabled by -Wextra.
 
300
 
 
301
 - The -Wtarget-lifetime command-line option has been added (enabled with
 
302
   -Wall), which warns if the pointer in a pointer assignment might outlive its
 
303
   target.
 
304
 
 
305
 - Reading floating point numbers which use q for the exponential (such as
 
306
   4.0q0) is now supported as vendor extension for better compatibility with
 
307
   old data files. It is strongly recommended to use for I/O the equivalent but
 
308
   standard conforming e (such as 4.0e0).
 
309
   (For Fortran source code, consider replacing the q in floating-point
 
310
   literals by a kind parameter (e.g. 4.0e0_qp with a suitable qp). Note that -
 
311
   in Fortran source code - replacing q by a simple e is not equivalent.)
 
312
 
 
313
 - The GFORTRAN_TMPDIR environment variable for specifying a non-default
 
314
   directory for files opened with STATUS="SCRATCH", is not used anymore.
 
315
   Instead gfortran checks the POSIX/GNU standard TMPDIR environment variable.
 
316
   If TMPDIR is not defined, gfortran falls back to other methods to determine
 
317
   the directory for temporary files as documented in the user_manual.
 
318
 
 
319
 - Fortran_2003:
 
320
 
 
321
   - Support for unlimited polymorphic variables (CLASS(*)) has been added.
 
322
     Nonconstant character lengths are not yet supported.
 
323
 
 
324
 - TS_29113:
 
325
 
 
326
   - Assumed types (TYPE(*)) are now supported.
 
327
 
 
328
   - Experimental support for assumed-rank arrays (dimension(..)) has been
 
329
     added. Note that currently gfortran's own array descriptor is used, which
 
330
     is different from the one defined in TS29113, see gfortran's_header_file
 
331
     or use the Chasm_Language_Interoperability_Tools.
 
332
 
 
333
 
 
334
Go
 
335
--
 
336
 
 
337
 - GCC 4.8.0 implements a preliminary version of the upcoming Go 1.1 release.
 
338
   The library support is not quite complete, due to release timing.
 
339
 
 
340
 - Go has been tested on GNU/Linux and Solaris platforms for various processors
 
341
   including x86, x86_64, PowerPC, SPARC, and Alpha. It may work on other
 
342
   platforms as well.
 
343
 
 
344
 
 
345
New Targets and Target Specific Improvements
 
346
============================================
 
347
 
 
348
 
 
349
AArch64
 
350
-------
 
351
 
 
352
 - A new port has been added to support AArch64, the new 64-bit architecture
 
353
   from ARM. Note that this is a separate port from the existing 32-bit ARM
 
354
   port.
 
355
 - The port provides initial support for the Cortex-A53 and the Cortex-A57
 
356
   processors with the command line options -mcpu=cortex-a53 and
 
357
   -mcpu=cortex-a57.
 
358
 
 
359
 
 
360
ARM
 
361
---
 
362
 
 
363
 - Initial support has been added for the AArch32 extensions defined in the
 
364
   ARMv8 architecture.
 
365
 
 
366
 - Code generation improvements for the Cortex-A7 and Cortex-A15 CPUs.
 
367
 
 
368
 - A new option, -mcpu=marvell-pj4, has been added to generate code for the
 
369
   Marvell PJ4 processor.
 
370
 
 
371
 - The compiler can now automatically generate the VFMA, VFMS, REVSH and REV16
 
372
   instructions.
 
373
 
 
374
 - A new vectorizer cost model for Advanced SIMD configurations to improve the
 
375
   auto-vectorization strategies used.
 
376
 
 
377
 - The scheduler now takes into account the number of live registers to reduce
 
378
   the amount of spilling that can occur. This should improve code performance
 
379
   in large functions. The limit can be removed by using the option -fno-sched-
 
380
   pressure.
 
381
 
 
382
 - Improvements have been made to the Marvell iWMMX code generation and support
 
383
   for the iWMMX2 SIMD unit has been added. The option -mcpu=iwmmxt2 can be
 
384
   used to enable code generation for the latter.
 
385
 
 
386
 - A number of code generation improvements for Thumb2 to reduce code size when
 
387
   compiling for the M-profile processors.
 
388
 
 
389
 - The RTEMS (arm-rtems) port has been updated to use the EABI.
 
390
 
 
391
 - Code generation support for the old FPA and Maverick floating-point
 
392
   architectures has been removed. Ports that previously relied on these
 
393
   features have also been removed. This includes the targets:
 
394
 
 
395
   - arm*-*-linux-gnu (use arm*-*-linux-gnueabi)
 
396
   - arm*-*-elf (use arm*-*-eabi)
 
397
   - arm*-*-uclinux* (use arm*-*-uclinux*eabi)
 
398
   - arm*-*-ecos-elf (no alternative)
 
399
   - arm*-*-freebsd (no alternative)
 
400
   - arm*-wince-pe* (no alternative).
 
401
 
 
402
 
 
403
AVR
 
404
---
 
405
 
 
406
 - Support for the "Embedded C" fixed-point has been added. For details, see
 
407
   the GCC_wiki and the user_manual. The support is not complete.
 
408
 - A new print modifier %r for register operands in inline assembler is
 
409
   supported. It will print the raw register number without the register prefix
 
410
   'r':
 
411
 
 
412
     /* Return the most significant byte of 'val', a 64-bit value.  */
 
413
 
 
414
     unsigned char msb (long long val)
 
415
       {
 
416
         unsigned char c;
 
417
         __asm__ ("mov %0, %r1+7" : "=r" (c) : "r" (val));
 
418
         return c;
 
419
       }
 
420
 
 
421
   The inline assembler in this example will generate code like
 
422
 
 
423
     mov r24, 8+7
 
424
 
 
425
   provided c is allocated to R24 and val is allocated to R8...R15. This works
 
426
   because the GNU assembler accepts plain register numbers without register
 
427
   prefix.
 
428
 
 
429
 - Static initializers with 3-byte symbols are supported now:
 
430
 
 
431
     extern const __memx char foo;
 
432
     const __memx void *pfoo = &foo;
 
433
 
 
434
   This requires at least Binutils 2.23.
 
435
 
 
436
 
 
437
IA-32/x86-64
 
438
------------
 
439
 
 
440
 - Allow -mpreferred-stack-boundary=3 for the x86-64 architecture with SSE
 
441
   extensions disabled. Since the x86-64 ABI requires 16 byte stack alignment,
 
442
   this is ABI incompatible and intended to be used in controlled environments
 
443
   where stack space is an important limitation. This option will lead to wrong
 
444
   code when functions compiled with 16 byte stack alignment (such as functions
 
445
   from a standard library) are called with misaligned stack. In this case, SSE
 
446
   instructions may lead to misaligned memory access traps. In addition,
 
447
   variable arguments will be handled incorrectly for 16 byte aligned objects
 
448
   (including x87 long double and __int128), leading to wrong results. You must
 
449
   build all modules with -mpreferred-stack-boundary=3, including any
 
450
   libraries. This includes the system libraries and startup modules.
 
451
 
 
452
 - Support for the new Intel processor codename Broadwell with RDSEED, ADCX,
 
453
   ADOX, PREFETCHW is available through -madx, -mprfchw, -mrdseed command-line
 
454
   options.
 
455
 
 
456
 - Support for the Intel RTM and HLE intrinsics, built-in functions and code
 
457
   generation is available via -mrtm and -mhle.
 
458
 
 
459
 - Support for the Intel FXSR, XSAVE and XSAVEOPT instruction sets. Intrinsics
 
460
   and built-in functions are available via -mfxsr, -mxsave and -mxsaveopt
 
461
   respectively.
 
462
 
 
463
 - New -maddress-mode=[short|long] options for x32. -maddress-mode=short
 
464
   overrides default 64-bit addresses to 32-bit by emitting the 0x67 address-
 
465
   size override prefix. This is the default address mode for x32.
 
466
 
 
467
 - New built-in functions to detect run-time CPU type and ISA:
 
468
 
 
469
   - A built-in function __builtin_cpu_is has been added to detect if the run-
 
470
     time CPU is of a particular type. It returns a positive integer on a match
 
471
     and zero otherwise. It accepts one string literal argument, the CPU name.
 
472
     For example, __builtin_cpu_is("westmere") returns a positive integer if
 
473
     the run-time CPU is an Intel Core i7 Westmere processor. Please refer to
 
474
     the user_manual for the list of valid CPU names recognized.
 
475
 
 
476
   - A built-in function __builtin_cpu_supports has been added to detect if the
 
477
     run-time CPU supports a particular ISA feature. It returns a positive
 
478
     integer on a match and zero otherwise. It accepts one string literal
 
479
     argument, the ISA feature. For example, __builtin_cpu_supports("ssse3")
 
480
     returns a positive integer if the run-time CPU supports SSSE3
 
481
     instructions. Please refer to the user_manual for the list of valid ISA
 
482
     names recognized.
 
483
 
 
484
   Caveat: If these built-in functions are called before any static
 
485
   constructors are invoked, like during IFUNC initialization, then the CPU
 
486
   detection initialization must be explicitly run using this newly provided
 
487
   built-in function, __builtin_cpu_init. The initialization needs to be done
 
488
   only once. For example, this is how the invocation would look like inside an
 
489
   IFUNC initializer:
 
490
 
 
491
        static void (*some_ifunc_resolver(void))(void)
 
492
        {
 
493
          __builtin_cpu_init();
 
494
          if (__builtin_cpu_is("amdfam10h") ...
 
495
          if (__builtin_cpu_supports("popcnt") ...
 
496
        }
 
497
 
 
498
 - Function Multiversioning Support with G++:
 
499
   It is now possible to create multiple function versions each targeting a
 
500
   specific processor and/or ISA. Function versions have the same signature but
 
501
   different target attributes. For example, here is a program with function
 
502
   versions:
 
503
 
 
504
     __attribute__ ((target ("default")))
 
505
     int foo(void)
 
506
       {
 
507
         return 1;
 
508
       }
 
509
 
 
510
     __attribute__ ((target ("sse4.2")))
 
511
     int foo(void)
 
512
       {
 
513
         return 2;
 
514
       }
 
515
 
 
516
     int main (void)
 
517
     {
 
518
       int (*p) = &foo;
 
519
       assert ((*p)() == foo());
 
520
       return 0;
 
521
     }
 
522
 
 
523
   Please refer to this wiki for more information.
 
524
 
 
525
 - The x86 backend has been improved to allow option -fschedule-insns to work
 
526
   reliably. This option can be used to schedule instructions better and leads
 
527
   to improved performace in certain cases.
 
528
 
 
529
 - Windows MinGW-w64 targets (*-w64-mingw*) require at least r5437 from the
 
530
   Mingw-w64 trunk.
 
531
 
 
532
 - Support for new AMD family 15h processors (Steamroller core) is now
 
533
   available through the -march=bdver3 and -mtune=bdver3 options.
 
534
 
 
535
 - Support for new AMD family 16h processors (Jaguar core) is now available
 
536
   through the -march=btver2 and -mtune=btver2 options.
 
537
 
 
538
 
 
539
FRV
 
540
---
 
541
 
 
542
 - This target now supports the -fstack-usage command-line option.
 
543
 
 
544
 
 
545
MIPS
 
546
----
 
547
 
 
548
 - GCC can now generate code specifically for the R4700, Broadcom XLP and MIPS
 
549
   34kn processors. The associated -march options are -march=r4700, -march=xlp
 
550
   and -march=34kn respectively.
 
551
 
 
552
 - GCC now generates better DSP code for MIPS 74k cores thanks to further
 
553
   scheduling optimizations.
 
554
 
 
555
 - The MIPS port now supports the -fstack-check option.
 
556
 
 
557
 - GCC now passes the -mmcu and -mno-mcu options to the assembler.
 
558
 
 
559
 - Previous versions of GCC would silently accept -fpic and -fPIC for
 
560
   -mno-abicalls targets like mips*-elf. This combination was not intended or
 
561
   supported, and did not generate position-independent code. GCC 4.8 now
 
562
   reports an error when this combination is used.
 
563
 
 
564
 
 
565
PowerPC / PowerPC64 / RS6000
 
566
----------------------------
 
567
 
 
568
 - SVR4 configurations (GNU/Linux, FreeBSD, NetBSD) no longer save, restore or
 
569
   update the VRSAVE register by default. The respective operating systems
 
570
   manage the VRSAVE register directly.
 
571
 
 
572
 - Large TOC support has been added for AIX through the command line option
 
573
   -mcmodel=large.
 
574
 
 
575
 - Native Thread-Local Storage support has been added for AIX.
 
576
 
 
577
 - VMX (Altivec) and VSX instruction sets now are enabled implicitly when
 
578
   targetting processors that support those hardware features on AIX 6.1 and
 
579
   above.
 
580
 
 
581
 
 
582
RX
 
583
--
 
584
 
 
585
 - This target will now issue a warning message whenever multiple fast
 
586
   interrupt handlers are found in the same cpmpilation unit. This feature can
 
587
   be turned off by the new -mno-warn-multiple-fast-interrupts command-line
 
588
   option.
 
589
 
 
590
 
 
591
S/390, System z
 
592
---------------
 
593
 
 
594
 - Support for the IBM zEnterprise zEC12 processor has been added. When using
 
595
   the -march=zEC12 option, the compiler will generate code making use of the
 
596
   following new instructions:
 
597
 
 
598
   - load and trap instructions
 
599
   - 2 new compare and trap instructions
 
600
   - rotate and insert selected bits - without CC clobber
 
601
 
 
602
   The -mtune=zEC12 option enables zEC12 specific instruction scheduling
 
603
   without making use of new instructions.
 
604
 
 
605
 - Register pressure sensitive instruction scheduling is enabled by default.
 
606
 
 
607
 - The ifunc function attribute is enabled by default.
 
608
 
 
609
 - memcpy and memcmp invokations on big memory chunks or with run time lengths
 
610
   are not generated inline anymore when tuning for z10 or higher. The purpose
 
611
   is to make use of the IFUNC optimized versions in Glibc.
 
612
 
 
613
 
 
614
SH
 
615
--
 
616
 
 
617
 - The default alignment settings have been reduced to be less aggressive. This
 
618
   results in more compact code for optimization levels other than -Os.
 
619
 
 
620
 - Improved support for the __atomic built-in functions:
 
621
 
 
622
   - A new option -matomic-model=model selects the model for the generated
 
623
     atomic sequences. The following models are supported:
 
624
 
 
625
     soft-gusa
 
626
         Software gUSA sequences (SH3* and SH4* only). On SH4A targets this
 
627
         will now also partially utilize the movco.l and movli.l
 
628
         instructions. This is the default when the target is sh3*-*-linux*
 
629
         or sh4*-*-linux*.
 
630
     hard-llcs
 
631
         Hardware movco.l / movli.l sequences (SH4A only).
 
632
     soft-tcb
 
633
         Software thread control block sequences.
 
634
     soft-imask
 
635
         Software interrupt flipping sequences (privileged mode only). This
 
636
         is the default when the target is sh1*-*-linux* or sh2*-*-linux*.
 
637
     none
 
638
         Generates function calls to the respective __atomic built-in
 
639
         functions. This is the default for SH64 targets or when the target
 
640
         is not sh*-*-linux*.
 
641
 
 
642
   - The option -msoft-atomic has been deprecated. It is now an alias for
 
643
     -matomic-model=soft-gusa.
 
644
 
 
645
   - A new option -mtas makes the compiler generate the tas.b instruction for
 
646
     the __atomic_test_and_set built-in function regardless of the selected
 
647
     atomic model.
 
648
 
 
649
   - The __sync functions in libgcc now reflect the selected atomic model when
 
650
     building the toolchain.
 
651
 
 
652
 - Added support for the mov.b and mov.w instructions with displacement
 
653
   addressing.
 
654
 
 
655
 - Added support for the SH2A instructions movu.b and movu.w.
 
656
 
 
657
 - Various improvements to code generated for integer arithmetic.
 
658
 
 
659
 - Improvements to conditional branches and code that involves the T bit. A new
 
660
   option -mzdcbranch tells the compiler to favor zero-displacement branches.
 
661
   This is enabled by default for SH4* targets.
 
662
 
 
663
 - The pref instruction will now be emitted by the __builtin_prefetch built-in
 
664
   function for SH3* targets.
 
665
 
 
666
 - The fmac instruction will now be emitted by the fmaf standard function and
 
667
   the __builtin_fmaf built-in function.
 
668
 
 
669
 - The -mfused-madd option has been deprecated in favor of the machine-
 
670
   independent -ffp-contract option. Notice that the fmac instruction will now
 
671
   be generated by default for expressions like a * b + c. This is due to the
 
672
   compiler default setting -ffp-contract=fast.
 
673
 
 
674
 - Added new options -mfsrra and -mfsca to allow the compiler using the fsrra
 
675
   and fsca instructions on targets other than SH4A (where they are already
 
676
   enabled by default).
 
677
 
 
678
 - Added support for the __builtin_bswap32 built-in function. It is now
 
679
   expanded as a sequence of swap.b and swap.w instructions instead of a
 
680
   library function call.
 
681
 
 
682
 - The behavior of the -mieee option has been fixed and the negative form
 
683
   -mno-ieee has been added to control the IEEE conformance of floating point
 
684
   comparisons. By default -mieee is now enabled and the option -ffinite-math-
 
685
   only implicitly sets -mno-ieee.
 
686
 
 
687
 - Added support for the built-in functions __builtin_thread_pointer and
 
688
   __builtin_set_thread_pointer. This assumes that GBR is used to hold the
 
689
   thread pointer of the current thread. Memory loads and stores relative to
 
690
   the address returned by __builtin_thread_pointer will now also utilize GBR
 
691
   based displacement address modes.
 
692
 
 
693
 
 
694
SPARC
 
695
-----
 
696
 
 
697
 - Added optimized instruction scheduling for Niagara4.
 
698
 
 
699
 
 
700
TILE-Gx
 
701
-------
 
702
 
 
703
 - Added support for the -mcmodel=MODEL command-line option. The models
 
704
   supported are small and large.
 
705
 
 
706
 
 
707
V850
 
708
----
 
709
 
 
710
 - This target now supports the E3V5 architecture via the use of the new
 
711
   -mv850e3v5 command-line option. It also has experimental support for the e3v5
 
712
   LOOP instruction which can be enabled via the new -mloop command-line
 
713
   option.
 
714
 
 
715
 
 
716
XStormy16
 
717
---------
 
718
 
 
719
 - This target now supports the -fstack-usage command-line option.
 
720
 
 
721
 
 
722
Operating Systems
 
723
=================
 
724
 
 
725
 
 
726
Windows (Cygwin)
 
727
----------------
 
728
 
 
729
 - Executables are now linked against shared libgcc by default. The previous
 
730
   default was to link statically, which can still be done by explicitly
 
731
   specifying -static or -static-libgcc on the command line. However it is
 
732
   strongly advised against, as it will cause problems for any application that
 
733
   makes use of DLLs compiled by GCC. It should be alright for a monolithic
 
734
   stand-alone application that only links against the Windows OS DLLs, but
 
735
   offers little or no benefit.
 
736
 
 
737
 
 
738
For questions related to the use of GCC, please consult these web
 
739
pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org
 
740
mailing list might help.  Please send comments on these web pages and
 
741
the development of GCC to our developer list at gcc@gcc.gnu.org.  All
 
742
of our lists have public archives.
 
743
 
 
744
Copyright (C) Free Software Foundation, Inc.
 
745
 
 
746
Verbatim copying and distribution of this entire article is
 
747
permitted in any medium, provided this notice is preserved.
 
748
 
 
749
These pages are maintained by the GCC team.
 
750
 
 
751
Last modified 2013-03-23.