gcc/gcc
Oleg Endo 91ba65f2f0 re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
PR target/51244
	* config/sh/sh.md (*mov_t_msb_neg): New insn and two accompanying
	unnamed split patterns.

	PR target/51244
	* gcc.target/sh/pr51244-12.c: New.

From-SVN: r192052
2012-10-03 21:39:18 +00:00
..
ada [multiple changes] 2012-10-03 10:11:48 +02:00
c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
c-family cp-tree.h (DECL_PRETTY_FUNCTION_P): Just look at the name. 2012-10-01 19:56:57 -04:00
common re PR other/53316 (Introduce -Og) 2012-09-19 09:31:49 +00:00
config re PR target/51244 ([SH] Inefficient conditional branch and code around T bit) 2012-10-03 21:39:18 +00:00
cp re PR c++/54777 ([C++11] Comma operator in constexpr environment can cause ICE) 2012-10-03 16:21:20 +02:00
doc rx.c (struct decl_chain): New local structure. 2012-10-03 16:12:22 +00:00
fortran re PR fortran/54778 ([OOP] an ICE on invalid OO code) 2012-10-02 23:02:16 +02:00
ginclude
go compiler: Fix a, b, c := b, a, 1 when a and b already exist. 2012-10-03 05:03:24 +00:00
java Finish conversion of uses of double_int to the new API. 2012-09-24 18:22:31 +00:00
lto function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
objc Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
objcp
po * sv.po: Update. 2012-09-26 22:47:28 +01:00
testsuite re PR target/51244 ([SH] Inefficient conditional branch and code around T bit) 2012-10-03 21:39:18 +00:00
ABOUT-GCC-NLS
acinclude.m4
aclocal.m4
addresses.h
alias.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
alias.h
alloc-pool.c alloc-pool.c (pool_alloc): Fix valgrind annotation. 2012-08-21 11:26:16 +00:00
alloc-pool.h
attribs.c
auto-inc-dec.c
BASE-VER
basic-block.h basic-block.h (RDIV): Define. 2012-09-28 21:14:23 +00:00
bb-reorder.c re PR middle-end/54364 (Tail call jumps not threaded) 2012-09-19 07:40:15 +00:00
bb-reorder.h
bitmap.c bitmap.c (bitmap_last_set_bit): Rewrite to return the correct bit. 2012-09-07 10:23:06 +00:00
bitmap.h
bt-load.c
builtin-attrs.def builtins.def (ATTR_MATHFN_FPROUNDING): Do not use no-vops with -frounding-math. 2012-10-01 14:15:00 +00:00
builtin-types.def builtin-types.def (BT_FN_CONST_STRING): Add. 2012-09-14 08:50:01 +00:00
builtins.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
builtins.def builtins.def (ATTR_MATHFN_FPROUNDING): Do not use no-vops with -frounding-math. 2012-10-01 14:15:00 +00:00
builtins.h
caller-save.c
calls.c calls.c (expand_call): Use emit_group_move for PARALLEL->PARALLEL moves. 2012-09-16 19:58:15 +00:00
cfg-flags.def
cfg.c * cfg.c (dump_bb_info): Print a newline if there were no edges to dump. 2012-08-29 20:40:53 +00:00
cfganal.c
cfgbuild.c
cfgcleanup.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
cfgexpand.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
cfghooks.c ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
cfghooks.h ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
cfgloop.c cfgloop.c (scale_loop_profile): Move to... 2012-09-30 15:30:22 +00:00
cfgloop.h basic-block.h (RDIV): Define. 2012-09-28 21:14:23 +00:00
cfgloopanal.c
cfgloopmanip.c cfgloop.c (scale_loop_profile): Move to... 2012-09-30 15:30:22 +00:00
cfgrtl.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
cgraph.c replaceo 2012-10-01 19:57:12 -04:00
cgraph.h cgraph.h (symtab_node_base): Re-order and pack fields. 2012-09-28 09:03:00 +00:00
cgraphbuild.c
cgraphclones.c
cgraphunit.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
ChangeLog re PR target/51244 ([SH] Inefficient conditional branch and code around T bit) 2012-10-03 21:39:18 +00:00
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog.dataflow
ChangeLog.graphite
ChangeLog.lib
ChangeLog.ptr
ChangeLog.tree-ssa
ChangeLog.tuples
cif-code.def
collect2-aix.c
collect2-aix.h
collect2.c
collect2.h
combine-stack-adj.c
combine.c re PR middle-end/54635 (Add addr_space_t argument to TARGET_MODE_DEPENDENT_ADDRESS_P) 2012-09-26 13:46:29 +00:00
common.opt invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
compare-elim.c
conditions.h
config.build
config.gcc config.gcc (*-*-openbsd4.[3-9]|*-*-openbsd[5-9]*): Set default_use_cxa_atexit to yes. 2012-10-03 15:44:06 +00:00
config.host config.host (x86_64-*-openbsd*): New target. 2012-09-02 14:13:21 +00:00
config.in This fixes PR gcov-profile/54487 where the gcda files were not locked by the profile-use read... 2012-09-13 04:59:14 +00:00
configure re PR other/54692 (gcc doesn't build with "-Og -g") 2012-09-25 14:27:47 +02:00
configure.ac re PR other/54692 (gcc doesn't build with "-Og -g") 2012-09-25 14:27:47 +02:00
convert.c
convert.h
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
coretypes.h
coverage.c Enhances the gcov program summary by adding a histogram of arc counter entries. 2012-09-04 21:16:18 +00:00
coverage.h
cppbuiltin.c
cppbuiltin.h
cppdefault.c
cppdefault.h
cprop.c
cse.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
cselib.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
cselib.h
cstamp-h.in
data-streamer-in.c
data-streamer-out.c
data-streamer.c
data-streamer.h
DATESTAMP Daily bump. 2012-10-03 00:17:56 +00:00
dbgcnt.c
dbgcnt.def dbgcnt.def (sched_breakdep): New counter. 2012-09-19 19:37:31 +00:00
dbgcnt.h
dbxout.c
dbxout.h
dce.c re PR debug/54551 (DF resets some DEBUG_INSNs unnecessarily) 2012-10-02 20:06:08 +00:00
dce.h
ddg.c
ddg.h
debug.c
debug.h
defaults.h
DEV-PHASE
df-core.c
df-problems.c re PR debug/54551 (DF resets some DEBUG_INSNs unnecessarily) 2012-10-02 20:06:08 +00:00
df-scan.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
df.h
dfp.c
dfp.h
diagnostic-core.h
diagnostic.c * diagnostic.c (bt_callback): Cast pc when calling fprintf. 2012-09-26 17:49:38 +00:00
diagnostic.def
diagnostic.h
dojump.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
dominance.c
domwalk.c
domwalk.h
double-int.c Finish conversion of uses of double_int to the new API. 2012-09-24 18:22:31 +00:00
double-int.h Finish conversion of uses of double_int to the new API. 2012-09-24 18:22:31 +00:00
dse.c re PR rtl-optimization/44194 (struct returned by value generates useless stores) 2012-09-14 13:28:44 +00:00
dumpfile.c dumpfile.c: New file with parts moved from tree-dump.c. 2012-10-01 06:10:29 +00:00
dumpfile.h invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
dwarf2asm.c
dwarf2asm.h
dwarf2cfi.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
dwarf2out.c re PR debug/53135 (Duplicates cause size explosion (vta/dwarf)) 2012-10-02 20:05:24 +00:00
dwarf2out.h dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset. 2012-08-20 20:27:46 +00:00
ebitmap.c
ebitmap.h
emit-rtl.c Finish conversion of uses of double_int to the new API. 2012-09-24 18:22:31 +00:00
emit-rtl.h
errors.c
errors.h
et-forest.c
et-forest.h
except.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
except.h
exec-tool.in
explow.c Finish conversion of uses of double_int to the new API. 2012-09-24 18:22:31 +00:00
expmed.c Finish conversion of uses of double_int to the new API. 2012-09-24 18:22:31 +00:00
expmed.h
expr.c re PR tree-optimization/54713 (error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c) 2012-10-02 15:43:09 +02:00
expr.h re PR rtl-optimization/44194 (struct returned by value generates useless stores) 2012-09-14 13:28:44 +00:00
final.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
fixed-value.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
fixed-value.h
flag-types.h invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
flags.h
fold-const.c re PR tree-optimization/54713 (error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c) 2012-09-28 14:18:57 +02:00
fp-test.c
FSFChangeLog
FSFChangeLog.10
FSFChangeLog.11
function.c * function.c (dup_block_and_redirect): Update profile. 2012-09-29 12:31:49 +00:00
function.h ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
fwprop.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
gcc-ar.c gcc-ar.c (main): Handle the returning of the sub-process error code correctly. 2012-09-27 16:05:38 +00:00
gcc-plugin.h
gcc.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
gcc.h
gcov-dump.c Enhances the gcov program summary by adding a histogram of arc counter entries. 2012-09-04 21:16:18 +00:00
gcov-io.c Enhances the gcov program summary by adding a histogram of arc counter entries. 2012-09-04 21:16:18 +00:00
gcov-io.h Enhances the gcov program summary by adding a histogram of arc counter entries. 2012-09-04 21:16:18 +00:00
gcov-iov.c
gcov.c
gcse.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
gcse.h
gdbinit.in * gdbinit.in: Fix syntax of skip command. 2012-08-27 16:35:05 +00:00
genattr-common.c
genattr.c
genattrtab.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
genautomata.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
gencheck.c
genchecksum.c
gencodes.c
genconditions.c
genconfig.c
genconstants.c
genemit.c
genenums.c
genextract.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
genflags.c
gengenrtl.c
gengtype-lex.l
gengtype-parse.c
gengtype-state.c
gengtype.c
gengtype.h
genhooks.c
genmddeps.c
genmodes.c
genmultilib
genopinit.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
genoutput.c re PR bootstrap/54326 (GCC does not build with G++ version 3.4.0) 2012-08-20 07:49:41 +00:00
genpeep.c
genpreds.c
genrecog.c
gensupport.c
gensupport.h
ggc-common.c
ggc-internal.h
ggc-none.c
ggc-page.c
ggc-zone.c
ggc.h
gimple-fold.c tree.c (truth_type_for): New function. 2012-09-29 08:23:23 +00:00
gimple-fold.h
gimple-iterator.c predict.c (maybe_hot_frequency_p): New parameter fun. 2012-08-24 14:57:24 +02:00
gimple-low.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
gimple-pretty-print.c dumpfile.c: New file with parts moved from tree-dump.c. 2012-10-01 06:10:29 +00:00
gimple-pretty-print.h dumpfile.c: New file with parts moved from tree-dump.c. 2012-10-01 06:10:29 +00:00
gimple-ssa-strength-reduction.c re PR tree-optimization/54674 (ICE in build2_stat, at tree.c:3835) 2012-09-26 16:49:32 +00:00
gimple-streamer-in.c
gimple-streamer-out.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
gimple-streamer.h
gimple.c re PR middle-end/52173 (internal compiler error: verify_ssa failed possibly caused by itm) 2012-09-24 08:57:08 +00:00
gimple.def
gimple.h tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
gimplify.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
glimits.h
godump.c
graph.c
graph.h
graphds.c
graphds.h
graphite-blocking.c
graphite-clast-to-gimple.c
graphite-clast-to-gimple.h
graphite-dependences.c
graphite-interchange.c
graphite-optimize-isl.c
graphite-poly.c
graphite-poly.h
graphite-scop-detection.c graphite-scop-detection.c (move_sd_regions): Adjust for VEC changes. 2012-09-11 09:35:18 +00:00
graphite-scop-detection.h
graphite-sese-to-poly.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
graphite-sese-to-poly.h
graphite.c bitmap.c (bitmap_last_set_bit): Rewrite to return the correct bit. 2012-09-07 10:23:06 +00:00
gsstruct.def
gstab.h
gsyms.h
gsyslimits.h
gtm-builtins.def
haifa-sched.c re PR bootstrap/54643 (Build hangs compiling unwind-arm.c) 2012-09-20 22:01:47 +00:00
hard-reg-set.h
hash-table.c
hash-table.h
highlev-plugin-common.h
hooks.c re PR rtl-optimization/38449 (delay branch scheduling follows REG_CROSSING_JUMP jumps indiscriminately) 2012-09-30 20:25:49 +01:00
hooks.h re PR rtl-optimization/38449 (delay branch scheduling follows REG_CROSSING_JUMP jumps indiscriminately) 2012-09-30 20:25:49 +01:00
host-default.c
hosthooks-def.h
hosthooks.h
hw-doloop.c
hw-doloop.h
hwint.c
hwint.h
ifcvt.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
incpath.c
incpath.h
init-regs.c
input.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
input.h tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
insn-addr.h
insn-notes.def
internal-fn.c
internal-fn.def
internal-fn.h
intl.c
intl.h
ipa-cp.c
ipa-inline-analysis.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
ipa-inline-transform.c
ipa-inline.c re PR fortran/48636 (Enable more inlining with -O2 and higher) 2012-09-12 21:51:14 +00:00
ipa-inline.h re PR fortran/48636 (Enable more inlining with -O2 and higher) 2012-09-12 21:51:14 +00:00
ipa-prop.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
ipa-prop.h
ipa-pure-const.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
ipa-ref-inline.h
ipa-ref.c
ipa-ref.h
ipa-reference.c ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
ipa-reference.h
ipa-split.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
ipa-utils.c ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
ipa-utils.h ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
ipa.c
ira-build.c ira.h (target_ira): Add x_ira_class_singleton. 2012-10-02 19:34:38 +00:00
ira-color.c ira-int.h (target_ira_int): Add x_ira_useful_class_mode_regs. 2012-10-02 19:34:49 +00:00
ira-conflicts.c
ira-costs.c
ira-emit.c
ira-int.h ira-int.h (target_ira_int): Add x_ira_useful_class_mode_regs. 2012-10-02 19:34:49 +00:00
ira-lives.c ira.h (target_ira): Add x_ira_class_singleton. 2012-10-02 19:34:38 +00:00
ira.c ira-int.h (target_ira_int): Add x_ira_useful_class_mode_regs. 2012-10-02 19:34:49 +00:00
ira.h ira.h (target_ira): Add x_ira_class_singleton. 2012-10-02 19:34:38 +00:00
jump.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
langhooks-def.h
langhooks.c
langhooks.h
LANGUAGES
lcm.c
libfuncs.h
limitx.h
limity.h
lists.c
loop-doloop.c
loop-init.c
loop-invariant.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
loop-iv.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
loop-unroll.c
loop-unswitch.c
lower-subreg.c lower-subreg.c (enum classify_move_insn): Rename SIMPLE_PSEUDO_REG_MOVE to DECOMPOSABLE_SIMPLE_MOVE. 2012-09-27 11:10:08 +00:00
lower-subreg.h
lto-cgraph.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
lto-compress.c
lto-compress.h
lto-opts.c
lto-section-in.c
lto-section-out.c
lto-streamer-in.c re PR lto/47799 (LTO debug info for early inlined functions missing) 2012-09-28 11:07:17 +00:00
lto-streamer-out.c re PR lto/47799 (LTO debug info for early inlined functions missing) 2012-09-28 11:07:17 +00:00
lto-streamer.c gimple.h (gimple_register_type): Remove. 2012-09-11 11:39:27 +00:00
lto-streamer.h symtab.c (insert_to_assembler_name_hash): Do not insert register vars. 2012-09-19 10:01:56 +00:00
lto-symtab.c re PR lto/54709 (r191713 breaks Firefox build) 2012-09-27 09:11:18 +00:00
lto-wrapper.c
machmode.def
machmode.h
main.c
Makefile.in re PR debug/54551 (DF resets some DEBUG_INSNs unnecessarily) 2012-10-02 20:06:08 +00:00
mcf.c
mkconfig.sh
mode-classes.def
mode-switching.c
modulo-sched.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
omega.c
omega.h
omp-builtins.def
omp-low.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
ONEWS
opt-functions.awk dwarf2out.c (gen_producer_string): Omit command line switch if CL_NO_DWARF_RECORD flag set. 2012-08-24 14:58:06 +00:00
opt-gather.awk
opt-include.awk
opt-read.awk
optabs.c re PR target/54087 (__atomic_fetch_add does not use xadd instruction) 2012-10-01 15:50:09 +00:00
optabs.def
optabs.h
optc-gen.awk
optc-save-gen.awk
opth-gen.awk
opts-common.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
opts-diagnostic.h
opts-global.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
opts.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
opts.h dwarf2out.c (gen_producer_string): Omit command line switch if CL_NO_DWARF_RECORD flag set. 2012-08-24 14:58:06 +00:00
output.h hooks.c (hook_int_rtx_mode_as_bool_0): New function. 2012-09-05 17:31:17 +00:00
params.c
params.def re PR middle-end/55492 (__atomic_load doesn't match ACQUIRE memory model) 2012-09-11 12:23:25 +00:00
params.h
passes.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
plugin.c
plugin.def
plugin.h
pointer-set.c
pointer-set.h
postreload-gcse.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
postreload.c
predict.c predict.c (maybe_hot_frequency_p): New parameter fun. 2012-08-24 14:57:24 +02:00
predict.def
predict.h
prefix.c
prefix.h
pretty-print.c
pretty-print.h
print-rtl.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
print-tree.c print-tree.c (print_node): Don't check TREE_LANG_FLAG_* on TREE_VEC or SSA_NAME. 2012-08-24 22:29:00 -04:00
profile.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
profile.h
read-md.c
read-md.h
read-rtl.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
README.Portability
real.c
real.h
realmpfr.c
realmpfr.h
recog.c re PR middle-end/54635 (Add addr_space_t argument to TARGET_MODE_DEPENDENT_ADDRESS_P) 2012-09-26 13:46:29 +00:00
recog.h re PR middle-end/54635 (Add addr_space_t argument to TARGET_MODE_DEPENDENT_ADDRESS_P) 2012-09-26 13:46:29 +00:00
ree.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
reg-notes.def
reg-stack.c i386.h (FP_REG_P): Remove macro. 2012-08-25 19:16:05 +02:00
regcprop.c
reginfo.c reginfo.c (max_regno_since_last_resize): New. 2012-10-03 19:13:01 +00:00
regmove.c
regrename.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
regrename.h
regs.h
regset.h
regstat.c
reload1.c re PR rtl-optimization/54290 (wrong code at -O2 with large offset) 2012-09-21 11:06:51 +00:00
reload.c re PR target/54516 (ICE in reload_cse_simplify_operands, at postreload.c:403 with -O1 -march=armv7-a -mthumb) 2012-09-14 17:10:45 +00:00
reload.h
reorg.c re PR rtl-optimization/38449 (delay branch scheduling follows REG_CROSSING_JUMP jumps indiscriminately) 2012-09-30 20:25:49 +01:00
resource.c alias.c (rtx_equal_for_memref_p): Convert constant cases. 2012-08-23 18:46:18 +00:00
resource.h
rtl-error.c
rtl-error.h
rtl.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
rtl.def
rtl.h tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
rtlanal.c * rtlanal.c (dead_or_set_regno_p): Fix COND_EXEC handling. 2012-09-20 21:17:34 +01:00
rtlhooks-def.h
rtlhooks.c
sbitmap.c
sbitmap.h
sched-deps.c re PR rtl-optimization/54792 (-fcompare-debug failures introduced by r191493) 2012-10-03 16:28:28 +02:00
sched-ebb.c
sched-int.h dbgcnt.def (sched_breakdep): New counter. 2012-09-19 19:37:31 +00:00
sched-rgn.c dbgcnt.def (sched_breakdep): New counter. 2012-09-19 19:37:31 +00:00
sched-vis.c
sdbout.c
sdbout.h
sel-sched-dump.c
sel-sched-dump.h
sel-sched-ir.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
sel-sched-ir.h
sel-sched.c
sel-sched.h
sese.c
sese.h
simplify-rtx.c simplify-rtx.c (simplify_unary_operation_1 <case TRUNCATE>): Don't optimize a truncate of a mem if it is a vector mode. 2012-10-02 14:03:37 -07:00
sparseset.c
sparseset.h
sreal.c
sreal.h
ssaexpand.h
stab.def
stack-ptr-mod.c
statistics.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
statistics.h statistics.h (CXX_MEM_STAT_INFO): New define. 2012-09-18 09:17:27 +00:00
stmt.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
stor-layout.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
store-motion.c
streamer-hooks.c
streamer-hooks.h
stringpool.c
symtab.c symtab.c (insert_to_assembler_name_hash): Do not insert register vars. 2012-09-19 10:01:56 +00:00
sync-builtins.def
system.h Fix Solaris 9/x86 bootstrap 2012-09-12 12:34:21 +00:00
target-def.h
target-globals.c
target-globals.h
target-hooks-macros.h
target.def re PR rtl-optimization/38449 (delay branch scheduling follows REG_CROSSING_JUMP jumps indiscriminately) 2012-09-30 20:25:49 +01:00
target.h
targhooks.c re PR middle-end/54635 (Add addr_space_t argument to TARGET_MODE_DEPENDENT_ADDRESS_P) 2012-09-26 13:46:29 +00:00
targhooks.h re PR middle-end/54635 (Add addr_space_t argument to TARGET_MODE_DEPENDENT_ADDRESS_P) 2012-09-26 13:46:29 +00:00
timevar.c
timevar.def common.opt (flto-partition): Add "max". 2012-09-12 17:55:13 +00:00
timevar.h
tlink.c
toplev.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
toplev.h
tracer.c tracer.c (mark_bb_seen): Use SBITMAP_SIZE. 2012-08-22 21:38:03 +00:00
trans-mem.c re PR middle-end/53850 (ICE: in expand_call_tm, at trans-mem.c:2289 with -fgnu-tm -O3) 2012-09-25 18:47:35 +00:00
trans-mem.h
tree-affine.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-affine.h
tree-browser.c
tree-browser.def
tree-call-cdce.c * tree-call-cdce.c (shrink_wrap_one_built_in_call): Update profile. 2012-09-29 12:33:19 +00:00
tree-cfg.c re PR middle-end/54782 (ICE: in change_scope, at final.c:1543 with -O -ffast-math -ftree-parallelize-loops=2 -g) 2012-10-03 20:34:26 +00:00
tree-cfgcleanup.c * tree-cfgcleanup. (cleanup_control_expr_graph) <GIMPLE_COND>: Remove 2012-09-17 14:50:13 +00:00
tree-chrec.c Finish conversion of uses of double_int to the new API. 2012-09-24 18:22:31 +00:00
tree-chrec.h
tree-complex.c
tree-data-ref.c re PR tree-optimization/54634 (miscompilation with -O3 -ftree-loop-distribution) 2012-09-20 14:46:32 +00:00
tree-data-ref.h re PR tree-optimization/54132 (Incorrect loop transformation with -ftree-loop-distribute-patterns) 2012-09-19 08:59:06 +00:00
tree-dfa.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
tree-diagnostic.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
tree-diagnostic.h
tree-dump.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
tree-dump.h invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
tree-eh.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
tree-emutls.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
tree-flow-inline.h Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-flow.h tree-flow.h (register_new_name_mapping): Remove. 2012-08-20 12:04:38 +00:00
tree-if-conv.c re PR tree-optimization/53395 (The LAPACK functions i(d|s)amax are more than two times slower after revision 187183) 2012-09-03 13:31:52 -07:00
tree-inline.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
tree-inline.h
tree-into-ssa.c tree-ssa-loop-ch.c (copy_loop_headers): Remove redundant checking. 2012-08-22 13:14:32 +00:00
tree-iterator.c
tree-iterator.h
tree-loop-distribution.c re PR tree-optimization/54629 (ICE (segfault) in index_in_loop_nest tree-data-ref.h:608) 2012-09-21 11:54:14 +00:00
tree-mudflap.c
tree-mudflap.h
tree-nested.c tree.h (DECL_NONLOCAL_FRAME): New macro. 2012-10-02 10:00:32 +00:00
tree-nomudflap.c
tree-nrv.c
tree-object-size.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-optimize.c
tree-outof-ssa.c Integrate lexical block into source_location. 2012-09-19 19:56:42 +00:00
tree-parloops.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
tree-pass.h Replace cgraph_node_set and varpool_node_set by symtab_node_encoder in partitioning. 2012-09-09 12:31:32 +00:00
tree-phinodes.c
tree-predcom.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-pretty-print.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-pretty-print.h
tree-profile.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
tree-scalar-evolution.c
tree-scalar-evolution.h
tree-sra.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
tree-ssa-address.c tree.h (copy_mem_ref_info): Delete. 2012-10-01 13:40:35 +00:00
tree-ssa-alias.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-ssa-alias.h re PR tree-optimization/54498 (incorrect code generation from g++ -O) 2012-09-06 14:47:42 +00:00
tree-ssa-ccp.c re PR tree-optimization/54684 (bootstrap broken with --disable-checking) 2012-09-24 14:14:18 +00:00
tree-ssa-coalesce.c bitmap.c (bitmap_last_set_bit): Rewrite to return the correct bit. 2012-09-07 10:23:06 +00:00
tree-ssa-copy.c
tree-ssa-copyrename.c
tree-ssa-dce.c
tree-ssa-dom.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
tree-ssa-dse.c
tree-ssa-forwprop.c tree-ssa-forwprop.c (forward_propagate_into_cond): Don't use boolean_type_node for vectors. 2012-10-02 08:52:44 +00:00
tree-ssa-ifcombine.c
tree-ssa-live.c tree.h (tree_constructor): Remove IS_UNKNOWN_LOCATION. 2012-09-27 17:06:22 +00:00
tree-ssa-live.h
tree-ssa-loop-ch.c re PR tree-optimization/46590 (long compile time with -O2 and many loops) 2012-09-03 15:39:15 +00:00
tree-ssa-loop-im.c tree.h (copy_mem_ref_info): Delete. 2012-10-01 13:40:35 +00:00
tree-ssa-loop-ivcanon.c re PR tree-optimization/54669 (verify_flow_info failure after loop unrolling with -fnon-call-exceptions) 2012-09-23 20:37:37 +00:00
tree-ssa-loop-ivopts.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-ssa-loop-manip.c re PR tree-optimization/46590 (long compile time with -O2 and many loops) 2012-09-05 13:29:13 +00:00
tree-ssa-loop-niter.c Modify gcc/*.[hc] double_int call sites to use the new interface. 2012-09-07 00:06:35 +00:00
tree-ssa-loop-prefetch.c
tree-ssa-loop-unswitch.c
tree-ssa-loop.c
tree-ssa-math-opts.c tree-ssa-math-opts.c (bswap_stats): Add found_16bit field. 2012-09-26 15:42:47 +02:00
tree-ssa-operands.c Merge identical cases. 2012-09-20 17:05:41 +00:00
tree-ssa-operands.h predict.c (maybe_hot_frequency_p): New parameter fun. 2012-08-24 14:57:24 +02:00
tree-ssa-phiopt.c ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
tree-ssa-phiprop.c
tree-ssa-pre.c tree-ssa-pre.c (bitmap_find_leader, [...]): Remove dominating stmt argument. 2012-09-24 10:53:22 +00:00
tree-ssa-propagate.c
tree-ssa-propagate.h
tree-ssa-reassoc.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
tree-ssa-sccvn.c re PR tree-optimization/54713 (error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c) 2012-10-02 15:43:09 +02:00
tree-ssa-sccvn.h tree-ssa-sccvn.h (enum vn_kind): New. 2012-09-13 12:43:58 +00:00
tree-ssa-sink.c
tree-ssa-strlen.c
tree-ssa-structalias.c function.c (push_cfun): Check old current_function_decl matches old cfun... 2012-09-20 18:35:40 +02:00
tree-ssa-tail-merge.c
tree-ssa-ter.c
tree-ssa-threadedge.c
tree-ssa-threadupdate.c Don't cast XNEWVEC's result. 2012-09-20 17:02:40 +00:00
tree-ssa-uncprop.c
tree-ssa-uninit.c
tree-ssa.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
tree-ssanames.c
tree-stdarg.c
tree-stdarg.h
tree-streamer-in.c tree.h (DECL_NONLOCAL_FRAME): New macro. 2012-10-02 10:00:32 +00:00
tree-streamer-out.c tree.h (DECL_NONLOCAL_FRAME): New macro. 2012-10-02 10:00:32 +00:00
tree-streamer.c
tree-streamer.h
tree-switch-conversion.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
tree-tailcall.c
tree-vect-data-refs.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
tree-vect-generic.c re PR tree-optimization/54713 (error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c) 2012-09-28 14:18:57 +02:00
tree-vect-loop-manip.c re PR middle-end/54759 (segfault for gcc.dg/vect/pr49093.c on Solaris) 2012-10-01 16:33:23 +00:00
tree-vect-loop.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
tree-vect-patterns.c invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
tree-vect-slp.c re PR tree-optimization/54713 (error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c) 2012-10-02 15:43:09 +02:00
tree-vect-stmts.c re PR testsuite/54772 (vectorization broken in gfortran on x86_64-*-freebsd) 2012-10-02 17:19:09 +00:00
tree-vectorizer.c re PR middle-end/54759 (segfault for gcc.dg/vect/pr49093.c on Solaris) 2012-10-01 16:33:23 +00:00
tree-vectorizer.h invoke.texi: Add documentation for the new option. 2012-10-01 05:43:06 +00:00
tree-vrp.c re PR tree-optimization/54676 (ICE: in set_value_range, at tree-vrp.c:433) 2012-09-25 14:46:54 +02:00
tree.c tree.c (truth_type_for): New function. 2012-09-29 08:23:23 +00:00
tree.def
tree.h tree.h (DECL_NONLOCAL_FRAME): New macro. 2012-10-02 10:00:32 +00:00
treestruct.def
tsystem.h
typeclass.h
valtrack.c re PR debug/54551 (DF resets some DEBUG_INSNs unnecessarily) 2012-10-02 20:06:08 +00:00
valtrack.h re PR debug/54551 (DF resets some DEBUG_INSNs unnecessarily) 2012-10-02 20:06:08 +00:00
value-prof.c
value-prof.h
var-tracking.c re PR debug/54177 (Segfault in cselib_lookup due to NULL_RTX passed from vt_add_function_parameter) 2012-10-02 19:58:37 +00:00
varasm.c Remove unnecessary VEC function overloads. 2012-09-10 20:04:13 -04:00
varpool.c symtab.c (insert_to_assembler_name_hash): Do not insert register vars. 2012-09-19 10:01:56 +00:00
vec.c Make all VEC_* functions, member functions of vec_t. 2012-09-04 09:22:54 -04:00
vec.h vec.h: Remove compatibility notes for previous distinction between vectors of objects... 2012-09-12 09:51:52 -04:00
vecir.h ipa-pure-const.c (state_from_flags, [...]): Use current_function_name instead of lang_hooks.decl_printable_name. 2012-09-13 13:41:46 +00:00
vecprim.h
version.c
version.h
vmsdbg.h
vmsdbgout.c
web.c
xcoff.h
xcoffout.c
xcoffout.h

Copyright (C) 2000, 2003 Free Software Foundation, Inc.

This file is intended to contain a few notes about writing C code
within GCC so that it compiles without error on the full range of
compilers GCC needs to be able to compile on.

The problem is that many ISO-standard constructs are not accepted by
either old or buggy compilers, and we keep getting bitten by them.
This knowledge until know has been sparsely spread around, so I
thought I'd collect it in one useful place.  Please add and correct
any problems as you come across them.

I'm going to start from a base of the ISO C90 standard, since that is
probably what most people code to naturally.  Obviously using
constructs introduced after that is not a good idea.

For the complete coding style conventions used in GCC, please read
http://gcc.gnu.org/codingconventions.html


String literals
---------------

Irix6 "cc -n32" and OSF4 "cc" have problems with constant string
initializers with parens around it, e.g.

const char string[] = ("A string");

This is unfortunate since this is what the GNU gettext macro N_
produces.  You need to find a different way to code it.

Some compilers like MSVC++ have fairly low limits on the maximum
length of a string literal; 509 is the lowest we've come across.  You
may need to break up a long printf statement into many smaller ones.


Empty macro arguments
---------------------

ISO C (6.8.3 in the 1990 standard) specifies the following:

If (before argument substitution) any argument consists of no
preprocessing tokens, the behavior is undefined.

This was relaxed by ISO C99, but some older compilers emit an error,
so code like

#define foo(x, y) x y
foo (bar, )

needs to be coded in some other way.


Avoid unnecessary test before free
----------------------------------

Since SunOS 4 stopped being a reasonable portability target,
(which happened around 2007) there has been no need to guard
against "free (NULL)".  Thus, any guard like the following
constitutes a redundant test:

  if (P)
    free (P);

It is better to avoid the test.[*]
Instead, simply free P, regardless of whether it is NULL.

[*] However, if your profiling exposes a test like this in a
performance-critical loop, say where P is nearly always NULL, and
the cost of calling free on a NULL pointer would be prohibitively
high, consider using __builtin_expect, e.g., like this:

  if (__builtin_expect (ptr != NULL, 0))
    free (ptr);



Trigraphs
---------

You weren't going to use them anyway, but some otherwise ISO C
compliant compilers do not accept trigraphs.


Suffixes on Integer Constants
-----------------------------

You should never use a 'l' suffix on integer constants ('L' is fine),
since it can easily be confused with the number '1'.


			Common Coding Pitfalls
			======================

errno
-----

errno might be declared as a macro.


Implicit int
------------

In C, the 'int' keyword can often be omitted from type declarations.
For instance, you can write

  unsigned variable;

as shorthand for

  unsigned int variable;

There are several places where this can cause trouble.  First, suppose
'variable' is a long; then you might think

  (unsigned) variable

would convert it to unsigned long.  It does not.  It converts to
unsigned int.  This mostly causes problems on 64-bit platforms, where
long and int are not the same size.

Second, if you write a function definition with no return type at
all:

  operate (int a, int b)
  {
    ...
  }

that function is expected to return int, *not* void.  GCC will warn
about this.

Implicit function declarations always have return type int.  So if you
correct the above definition to

  void
  operate (int a, int b)
  ...

but operate() is called above its definition, you will get an error
about a "type mismatch with previous implicit declaration".  The cure
is to prototype all functions at the top of the file, or in an
appropriate header.

Char vs unsigned char vs int
----------------------------

In C, unqualified 'char' may be either signed or unsigned; it is the
implementation's choice.  When you are processing 7-bit ASCII, it does
not matter.  But when your program must handle arbitrary binary data,
or fully 8-bit character sets, you have a problem.  The most obvious
issue is if you have a look-up table indexed by characters.

For instance, the character '\341' in ISO Latin 1 is SMALL LETTER A
WITH ACUTE ACCENT.  In the proper locale, isalpha('\341') will be
true.  But if you read '\341' from a file and store it in a plain
char, isalpha(c) may look up character 225, or it may look up
character -31.  And the ctype table has no entry at offset -31, so
your program will crash.  (If you're lucky.)

It is wise to use unsigned char everywhere you possibly can.  This
avoids all these problems.  Unfortunately, the routines in <string.h>
take plain char arguments, so you have to remember to cast them back
and forth - or avoid the use of strxxx() functions, which is probably
a good idea anyway.

Another common mistake is to use either char or unsigned char to
receive the result of getc() or related stdio functions.  They may
return EOF, which is outside the range of values representable by
char.  If you use char, some legal character value may be confused
with EOF, such as '\377' (SMALL LETTER Y WITH UMLAUT, in Latin-1).
The correct choice is int.

A more subtle version of the same mistake might look like this:

  unsigned char pushback[NPUSHBACK];
  int pbidx;
  #define unget(c) (assert(pbidx < NPUSHBACK), pushback[pbidx++] = (c))
  #define get(c) (pbidx ? pushback[--pbidx] : getchar())
  ...
  unget(EOF);

which will mysteriously turn a pushed-back EOF into a SMALL LETTER Y
WITH UMLAUT.


Other common pitfalls
---------------------

o Expecting 'plain' char to be either sign or unsigned extending.

o Shifting an item by a negative amount or by greater than or equal to
  the number of bits in a type (expecting shifts by 32 to be sensible
  has caused quite a number of bugs at least in the early days).

o Expecting ints shifted right to be sign extended.

o Modifying the same value twice within one sequence point.

o Host vs. target floating point representation, including emitting NaNs
  and Infinities in a form that the assembler handles.

o qsort being an unstable sort function (unstable in the sense that
  multiple items that sort the same may be sorted in different orders
  by different qsort functions).

o Passing incorrect types to fprintf and friends.

o Adding a function declaration for a module declared in another file to
  a .c file instead of to a .h file.