2000-03-23 01:20:37 +01:00
|
|
|
/* This file contains the definitions and documentation for the
|
|
|
|
builtins used in the GNU compiler.
|
builtins.def (BUILT_IN_CONJ, [...]): Define.
* builtins.def (BUILT_IN_CONJ, BUILT_IN_CREAL, BUILT_IN_CIMAG):
Define.
* builtins.c (expand_builtin): Abort on BUILT_IN_CONJ,
BUILT_IN_CREAL and BUILT_IN_CIMAG.
* c-common.c (c_common_nodes_and_builtins): Create builtin conjf,
conj, conjl, crealf, creal, creall, cimagf, cimag and cimagl.
(expand_tree_builtin): Handle BUILT_IN_CONJ, BUILT_IN_CREAL and
BUILT_IN_CIMAG.
* extend.texi: Document these builtins.
testsuite:
* gcc.c-torture/execute/builtin-complex-1.c: New test.
From-SVN: r38716
2001-01-05 19:24:08 +01:00
|
|
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
This file is part of GCC.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU General Public License as published by the Free
|
|
|
|
Software Foundation; either version 2, or (at your option) any later
|
|
|
|
version.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
for more details.
|
2000-03-23 01:20:37 +01:00
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
bitmap.h, builtin-types.def, builtins.c, builtins.def,
c-aux-info.c, c-common.c, c-common.def, c-common.h,
c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
conditions.h, config.gcc, configure.frag, configure.in,
conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
emit-rtl.c, errors.c, errors.h, except.c, except.h,
exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
gencheck.c, gencodes.c, genconfig.c, genemit.c,
genextract.c, genflags.c, gengenrtl.c, genmultilib,
genopinit.c, genoutput.c, genpeep.c, genrecog.c,
gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
params.h, predict.c, predict.def, predict.h, prefix.c,
prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
regclass.c, regmove.c, regrename.c, regs.h, reload.c,
reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
xcoffout.h: replace "GNU CC" with "GCC".
From-SVN: r45105
2001-08-22 16:35:51 +02:00
|
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
|
|
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA. */
|
2000-03-23 01:20:37 +01:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
/* Before including this file, you should define a macro:
|
|
|
|
|
|
|
|
DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
|
2002-07-06 02:16:44 +02:00
|
|
|
FALLBACK_P, NONANSI_P, ATTRS)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
This macro will be called once for each builtin function. The
|
|
|
|
ENUM will be of type `enum built_in_function', and will indicate
|
|
|
|
which builtin function is being processed. The NAME of the builtin
|
|
|
|
function (which will always start with `__builtin_') is a string
|
|
|
|
literal. The CLASS is of type `enum built_in_class' and indicates
|
|
|
|
what kind of builtin is being processed.
|
|
|
|
|
|
|
|
Some builtins are actually two separate functions. For example,
|
|
|
|
for `strcmp' there are two builtin functions; `__builtin_strcmp'
|
|
|
|
and `strcmp' itself. Both behave identically. Other builtins
|
|
|
|
define only the `__builtin' variant. If BOTH_P is TRUE, then this
|
|
|
|
builtin has both variants; otherwise, it is has only the first
|
|
|
|
variant.
|
|
|
|
|
|
|
|
TYPE indicates the type of the function. The symbols correspond to
|
|
|
|
enumerals from builtin-types.def. If BOTH_P is true, then LIBTYPE
|
|
|
|
is the type of the non-`__builtin_' variant. Otherwise, LIBTYPE
|
|
|
|
should be ignored.
|
|
|
|
|
|
|
|
If FALLBACK_P is true then, if for some reason, the compiler cannot
|
|
|
|
expand the builtin function directly, it will call the
|
|
|
|
corresponding library function (which does not have the
|
|
|
|
`__builtin_' prefix.
|
|
|
|
|
|
|
|
If NONANSI_P is true, then the non-`__builtin_' variant is not an
|
|
|
|
ANSI/ISO library function, and so we should pretend it does not
|
2002-07-06 02:16:44 +02:00
|
|
|
exist when compiling in ANSI conformant mode.
|
|
|
|
|
|
|
|
ATTRs is an attribute list as defined in builtin-attrs.def that
|
|
|
|
describes the attributes of this builtin function. */
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* A GCC builtin (like __builtin_saveregs) is provided by the
|
|
|
|
compiler, but does not correspond to a function in the standard
|
|
|
|
library. */
|
|
|
|
#undef DEF_GCC_BUILTIN
|
2002-07-28 07:34:04 +02:00
|
|
|
#define DEF_GCC_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, BT_LAST, \
|
2002-07-28 07:34:04 +02:00
|
|
|
false, false, false, ATTRS)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* A fallback builtin is a builtin (like __builtin_puts) that falls
|
|
|
|
back to the corresopnding library function if necessary -- but
|
|
|
|
for which we should not introduce the non-`__builtin' variant of
|
|
|
|
the name. */
|
|
|
|
#undef DEF_FALLBACK_BUILTIN
|
2002-07-06 02:16:44 +02:00
|
|
|
#define DEF_FALLBACK_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
false, true, false, ATTRS)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2001-12-21 03:36:37 +01:00
|
|
|
/* Like DEF_FALLBACK_BUILTIN, except that the function is not one that
|
|
|
|
is specified by ANSI/ISO C. So, when we're being fully conformant
|
|
|
|
we ignore the version of these builtins that does not begin with
|
|
|
|
__builtin. */
|
|
|
|
#undef DEF_EXT_FALLBACK_BUILTIN
|
|
|
|
#define DEF_EXT_FALLBACK_BUILTIN(ENUM, NAME, TYPE) \
|
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
false, true, true, ATTR_NOTHROW_LIST)
|
2001-12-21 03:36:37 +01:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
/* A library builtin (like __builtin_strchr) is a builtin equivalent
|
|
|
|
of an ANSI/ISO standard library function. In addition to the
|
2001-10-31 15:08:11 +01:00
|
|
|
`__builtin' version, we will create an ordinary version (e.g,
|
2001-05-25 22:00:59 +02:00
|
|
|
`strchr') as well. If we cannot compute the answer using the
|
|
|
|
builtin function, we will fall back to the standard library
|
|
|
|
version. */
|
|
|
|
#undef DEF_LIB_BUILTIN
|
2002-07-06 02:16:44 +02:00
|
|
|
#define DEF_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, false, ATTRS)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Like DEF_LIB_BUILTIN, except that a call to the builtin should
|
|
|
|
never fall back to the library version. */
|
|
|
|
#undef DEF_LIB_ALWAYS_BUILTIN
|
|
|
|
#define DEF_LIB_ALWAYS_BUILTIN(ENUM, NAME, TYPE) \
|
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
true, false, true, ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Like DEF_LIB_BUILTIN, except that the function is not one that is
|
|
|
|
specified by ANSI/ISO C. So, when we're being fully conformant we
|
|
|
|
ignore the version of these builtins that does not begin with
|
|
|
|
__builtin. */
|
|
|
|
#undef DEF_EXT_LIB_BUILTIN
|
2002-07-06 02:16:44 +02:00
|
|
|
#define DEF_EXT_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, true, ATTRS)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Like DEF_LIB_BUILTIN, except that the function is only a part of
|
|
|
|
the standard in C99 or above. */
|
|
|
|
#undef DEF_C99_BUILTIN
|
|
|
|
#define DEF_C99_BUILTIN(ENUM, NAME, TYPE) \
|
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
true, !flag_isoc99, true, ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Like DEF_LIB_BUILTIN, except that the function is expanded in the
|
|
|
|
front-end. */
|
|
|
|
#undef DEF_FRONT_END_LIB_BUILTIN
|
2002-07-06 02:16:44 +02:00
|
|
|
#define DEF_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, false, ATTRS)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2001-12-21 03:36:37 +01:00
|
|
|
/* Like DEF_FRONT_END_LIB_BUILTIN, except that the function is not one
|
|
|
|
that is specified by ANSI/ISO C. So, when we're being fully
|
|
|
|
conformant we ignore the version of these builtins that does not
|
|
|
|
begin with __builtin. */
|
|
|
|
#undef DEF_EXT_FRONT_END_LIB_BUILTIN
|
2002-07-06 02:16:44 +02:00
|
|
|
#define DEF_EXT_FRONT_END_LIB_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
|
2001-12-21 03:36:37 +01:00
|
|
|
DEF_BUILTIN (ENUM, NAME, BUILT_IN_FRONTEND, TYPE, TYPE, \
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, true, ATTRS)
|
2001-12-21 03:36:37 +01:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
/* A built-in that is not currently used. */
|
|
|
|
#undef DEF_UNUSED_BUILTIN
|
|
|
|
#define DEF_UNUSED_BUILTIN(X) \
|
|
|
|
DEF_BUILTIN (X, (const char *) NULL, NOT_BUILT_IN, BT_LAST, \
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_LAST, false, false, false, ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* If SMALL_STACK is defined, then `alloca' is only defined in its
|
|
|
|
`__builtin' form. */
|
|
|
|
#if SMALL_STACK
|
|
|
|
DEF_FALLBACK_BUILTIN(BUILT_IN_ALLOCA,
|
|
|
|
"__builtin_alloca",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_PTR_SIZE,
|
|
|
|
ATTR_MALLOC_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
#else
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_ALLOCA,
|
|
|
|
"__builtin_alloca",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_PTR_SIZE,
|
|
|
|
ATTR_MALLOC_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_ABS,
|
|
|
|
"__builtin_abs",
|
|
|
|
BT_FN_INT_INT)
|
|
|
|
DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_LABS,
|
|
|
|
"__builtin_labs",
|
|
|
|
BT_FN_LONG_LONG)
|
|
|
|
|
|
|
|
DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABS,
|
|
|
|
"__builtin_fabs",
|
|
|
|
BT_FN_DOUBLE_DOUBLE)
|
|
|
|
DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSF,
|
|
|
|
"__builtin_fabsf",
|
|
|
|
BT_FN_FLOAT_FLOAT)
|
|
|
|
DEF_LIB_ALWAYS_BUILTIN(BUILT_IN_FABSL,
|
|
|
|
"__builtin_fabsl",
|
|
|
|
BT_FN_LONG_DOUBLE_LONG_DOUBLE)
|
|
|
|
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_LLABS,
|
|
|
|
"__builtin_llabs",
|
|
|
|
BT_FN_LONGLONG_LONGLONG)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_IMAXABS,
|
|
|
|
"__builtin_imaxabs",
|
|
|
|
BT_FN_INTMAX_INTMAX)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CONJ,
|
|
|
|
"__builtin_conj",
|
|
|
|
BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CONJF,
|
|
|
|
"__builtin_conjf",
|
|
|
|
BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CONJL,
|
|
|
|
"__builtin_conjl",
|
|
|
|
BT_FN_COMPLEX_LONG_DOUBLE_COMPLEX_LONG_DOUBLE)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CREAL,
|
|
|
|
"__builtin_creal",
|
|
|
|
BT_FN_DOUBLE_COMPLEX_DOUBLE)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CREALF,
|
|
|
|
"__builtin_crealf",
|
|
|
|
BT_FN_FLOAT_COMPLEX_FLOAT)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CREALL,
|
|
|
|
"__builtin_creall",
|
|
|
|
BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CIMAG,
|
|
|
|
"__builtin_cimag",
|
|
|
|
BT_FN_DOUBLE_COMPLEX_DOUBLE)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CIMAGF,
|
|
|
|
"__builtin_cimagf",
|
|
|
|
BT_FN_FLOAT_COMPLEX_FLOAT)
|
|
|
|
DEF_C99_BUILTIN(BUILT_IN_CIMAGL,
|
|
|
|
"__builtin_cimagl",
|
|
|
|
BT_FN_LONG_DOUBLE_COMPLEX_LONG_DOUBLE)
|
|
|
|
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_DIV)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_LDIV)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_FFLOOR)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_FCEIL)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_FMOD)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_FREM)
|
|
|
|
|
|
|
|
/* The system prototypes for `bzero' and `bcmp' functions have many
|
|
|
|
variations, so don't specify parameters to avoid conflicts. The
|
|
|
|
expand_* functions check the argument types anyway. */
|
|
|
|
DEF_BUILTIN (BUILT_IN_BZERO,
|
|
|
|
"__builtin_bzero",
|
|
|
|
BUILT_IN_NORMAL,
|
c-common.c, [...]: Delete code implementing -traditional mode.
* c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in,
c-tree.h, c-typeck.c, cppexp.c, cpplex.c, cpplib.c, cpplib.h,
cppmacro.c, objc/lang-specs.h, objc/objc-act.c,
builtin-types.def, builtins.def, dwarf2out.c, dwarfout.c,
gcc.c, toplev.c: Delete code implementing -traditional mode.
* ada/misc.c, ch/ch-tree.h, ch/decl.c, cp/decl2.c, f/com.c,
f/lex.c, f/top.c, java/builtins.c, java/decl.c: Delete
traditional-mode-related code copied from the C front end
but not used, or used only to permit the compiler to link.
* doc/bugreport.texi, doc/cpp.texi, doc/extend.texi,
doc/invoke.texi, doc/standards.texi, doc/trouble.texi:
Document removal of -traditional mode for compilation, and
remove documentation only relevant to that mode.
* config/nextstep.h, config/ptx4.h, config/svr4.h,
config/convex/convex.h, config/d30v/d30v.h,
config/i386/dgux.h, config/i386/osf1elf.h,
config/i386/osfelf.h, config/i386/osfrose.h,
config/i386/sco5.h, config/i386/sol2.h, config/m68k/a-ux.h,
config/m68k/hp310.h, config/m88k/dgux.h,
config/m88k/dguxbcs.h, config/m88k/luna.h, config/m88k/m88k.c,
config/m88k/m88k.h, config/m88k/openbsd.h,
config/mips/abi64.h, config/mips/osfrose.h,
config/mips/svr4-5.h, config/mips/svr4-t.h,
config/sparc/sol2-sld-64.h, config/sparc/sol2.h,
config/stormy16/stormy16.h: Remove all references to
-traditional from target specs. Delete all mention of the
no-longer-necessary TRADITIONAL_RETURN_FLOAT macro. Also
delete a couple of commented-out definitions of
DOLLARS_IN_IDENTIFIERS, with (incorrect) commentary referring
to -traditional.
* system.h: Poison TRADITIONAL_RETURN_FLOAT.
* doc/tm.texi: Remove mention of TRADITIONAL_RETURN_FLOAT macro.
* testsuite/gcc.c-torture/execute/920730-1t.c,
testsuite/gcc.c-torture/execute/920730-1t.x,
testsuite/gcc.dg/ext-glob.c: Delete test cases, only relevant
to -traditional.
From-SVN: r50110
2002-02-27 19:48:07 +01:00
|
|
|
BT_FN_VOID_PTR_SIZE,
|
2001-05-25 22:00:59 +02:00
|
|
|
BT_FN_VOID_VAR,
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, true,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_BUILTIN (BUILT_IN_BCMP,
|
|
|
|
"__builtin_bcmp",
|
|
|
|
BUILT_IN_NORMAL,
|
c-common.c, [...]: Delete code implementing -traditional mode.
* c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in,
c-tree.h, c-typeck.c, cppexp.c, cpplex.c, cpplib.c, cpplib.h,
cppmacro.c, objc/lang-specs.h, objc/objc-act.c,
builtin-types.def, builtins.def, dwarf2out.c, dwarfout.c,
gcc.c, toplev.c: Delete code implementing -traditional mode.
* ada/misc.c, ch/ch-tree.h, ch/decl.c, cp/decl2.c, f/com.c,
f/lex.c, f/top.c, java/builtins.c, java/decl.c: Delete
traditional-mode-related code copied from the C front end
but not used, or used only to permit the compiler to link.
* doc/bugreport.texi, doc/cpp.texi, doc/extend.texi,
doc/invoke.texi, doc/standards.texi, doc/trouble.texi:
Document removal of -traditional mode for compilation, and
remove documentation only relevant to that mode.
* config/nextstep.h, config/ptx4.h, config/svr4.h,
config/convex/convex.h, config/d30v/d30v.h,
config/i386/dgux.h, config/i386/osf1elf.h,
config/i386/osfelf.h, config/i386/osfrose.h,
config/i386/sco5.h, config/i386/sol2.h, config/m68k/a-ux.h,
config/m68k/hp310.h, config/m88k/dgux.h,
config/m88k/dguxbcs.h, config/m88k/luna.h, config/m88k/m88k.c,
config/m88k/m88k.h, config/m88k/openbsd.h,
config/mips/abi64.h, config/mips/osfrose.h,
config/mips/svr4-5.h, config/mips/svr4-t.h,
config/sparc/sol2-sld-64.h, config/sparc/sol2.h,
config/stormy16/stormy16.h: Remove all references to
-traditional from target specs. Delete all mention of the
no-longer-necessary TRADITIONAL_RETURN_FLOAT macro. Also
delete a couple of commented-out definitions of
DOLLARS_IN_IDENTIFIERS, with (incorrect) commentary referring
to -traditional.
* system.h: Poison TRADITIONAL_RETURN_FLOAT.
* doc/tm.texi: Remove mention of TRADITIONAL_RETURN_FLOAT macro.
* testsuite/gcc.c-torture/execute/920730-1t.c,
testsuite/gcc.c-torture/execute/920730-1t.x,
testsuite/gcc.dg/ext-glob.c: Delete test cases, only relevant
to -traditional.
From-SVN: r50110
2002-02-27 19:48:07 +01:00
|
|
|
BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
|
2001-05-25 22:00:59 +02:00
|
|
|
BT_FN_INT_VAR,
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, true,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_FFS,
|
|
|
|
"__builtin_ffs",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_INDEX,
|
|
|
|
"__builtin_index",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_EXT_LIB_BUILTIN(BUILT_IN_RINDEX,
|
|
|
|
"__builtin_rindex",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MEMCPY,
|
|
|
|
"__builtin_memcpy",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_PTR_PTR_CONST_PTR_SIZE,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MEMCMP,
|
|
|
|
"__builtin_memcmp",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_CONST_PTR_CONST_PTR_SIZE,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_MEMSET,
|
|
|
|
"__builtin_memset",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_PTR_PTR_INT_SIZE,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCAT,
|
|
|
|
"__builtin_strcat",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_STRING_CONST_STRING,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRNCAT,
|
|
|
|
"__builtin_strncat",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_STRING_CONST_STRING_SIZE,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCPY,
|
|
|
|
"__builtin_strcpy",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_STRING_CONST_STRING,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRNCPY,
|
|
|
|
"__builtin_strncpy",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_STRING_CONST_STRING_SIZE,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCMP,
|
|
|
|
"__builtin_strcmp",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRNCMP,
|
|
|
|
"__builtin_strncmp",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_CONST_STRING_CONST_STRING_SIZE,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRLEN,
|
|
|
|
"__builtin_strlen",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_SIZE_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRSTR,
|
|
|
|
"__builtin_strstr",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRPBRK,
|
|
|
|
"__builtin_strpbrk",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRSPN,
|
|
|
|
"__builtin_strspn",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_SIZE_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCSPN,
|
|
|
|
"__builtin_strcspn",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_SIZE_CONST_STRING_CONST_STRING,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRCHR,
|
|
|
|
"__builtin_strchr",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_STRRCHR,
|
|
|
|
"__builtin_strrchr",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_STRING_CONST_STRING_INT,
|
|
|
|
ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2001-12-14 22:06:35 +01:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SQRT,
|
|
|
|
"__builtin_sqrt",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SIN,
|
|
|
|
"__builtin_sin",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_COS,
|
|
|
|
"__builtin_cos",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
2002-08-04 01:21:31 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_EXP,
|
|
|
|
"__builtin_exp",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_LOG,
|
|
|
|
"__builtin_log",
|
|
|
|
BT_FN_DOUBLE_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SQRTF,
|
|
|
|
"__builtin_sqrtf",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SINF,
|
|
|
|
"__builtin_sinf",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_COSF,
|
|
|
|
"__builtin_cosf",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
2002-08-04 01:21:31 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_EXPF,
|
|
|
|
"__builtin_expf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_LOGF,
|
|
|
|
"__builtin_logf",
|
|
|
|
BT_FN_FLOAT_FLOAT,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SQRTL,
|
|
|
|
"__builtin_sqrtl",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_LONG_DOUBLE_LONG_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_SINL,
|
|
|
|
"__builtin_sinl",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_LONG_DOUBLE_LONG_DOUBLE,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_COSL,
|
|
|
|
"__builtin_cosl",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_LONG_DOUBLE_LONG_DOUBLE,
|
|
|
|
flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST)
|
2002-08-04 01:21:31 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_EXPL,
|
|
|
|
"__builtin_expl",
|
|
|
|
BT_FN_LONG_DOUBLE_LONG_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_LOGL,
|
|
|
|
"__builtin_logl",
|
|
|
|
BT_FN_LONG_DOUBLE_LONG_DOUBLE,
|
|
|
|
flag_errno_math ? ATTR_NOTHROW_LIST
|
|
|
|
: (flag_unsafe_math_optimizations
|
|
|
|
? ATTR_CONST_NOTHROW_LIST
|
|
|
|
: ATTR_PURE_NOTHROW_LIST))
|
2001-05-25 22:00:59 +02:00
|
|
|
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INF,
|
|
|
|
"__builtin_inf",
|
|
|
|
BT_FN_DOUBLE,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INFF,
|
|
|
|
"__builtin_inff",
|
|
|
|
BT_FN_FLOAT,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INFL,
|
|
|
|
"__builtin_infl",
|
|
|
|
BT_FN_LONG_DOUBLE,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2002-09-05 01:21:28 +02:00
|
|
|
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_HUGE_VAL,
|
|
|
|
"__builtin_huge_val",
|
|
|
|
BT_FN_DOUBLE,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALF,
|
|
|
|
"__builtin_huge_valf",
|
|
|
|
BT_FN_FLOAT,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2002-09-05 01:21:28 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_HUGE_VALL,
|
|
|
|
"__builtin_huge_vall",
|
|
|
|
BT_FN_LONG_DOUBLE,
|
2002-09-08 05:16:46 +02:00
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
gcc/
* builtin-types.def (BT_FN_FLOAT_CONST_STRING): New.
(BT_FN_DOUBLE_CONST_STRING, BT_FN_LONG_DOUBLE_CONST_STRING): New.
* builtins.def (__builtin_nan, __builtin_nanf, __builtin_nanl): New.
(__builtin_nans, __builtin_nansf, __builtin_nansl): New.
* builtins.c (fold_builtin_nan): New.
(fold_builtin): Call it.
* real.c (real_nan): Parse a non-empty string.
(round_for_format): Fix NaN significand truncation.
* real.h (real_nan): Return bool.
* doc/extend.texi: Document new builtins.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_QNaN_bytes,
__glibcpp_f32_has_QNaN, __glibcpp_f32_SNaN_bytes,
__glibcpp_f32_has_SNaN, __glibcpp_f64_QNaN_bytes,
__glibcpp_f64_has_QNaN, __glibcpp_f64_SNaN_bytes,
__glibcpp_f64_has_SNaN, __glibcpp_f80_QNaN_bytes,
__glibcpp_f80_has_QNaN, __glibcpp_f80_SNaN_bytes,
__glibcpp_f80_has_SNaN, __glibcpp_f96_QNaN_bytes,
__glibcpp_f96_has_QNaN, __glibcpp_f96_SNaN_bytes,
__glibcpp_f96_has_SNaN, __glibcpp_f128_QNaN_bytes,
__glibcpp_f128_has_QNaN, __glibcpp_f128_SNaN_bytes,
__glibcpp_f128_has_SNaN, __glibcpp_float_QNaN_bytes,
__glibcpp_float_has_QNaN, __glibcpp_float_SNaN_bytes,
__glibcpp_float_has_SNaN, __glibcpp_double_QNaN_bytes,
__glibcpp_double_has_QNaN, __glibcpp_double_SNaN_bytes,
__glibcpp_double_has_SNaN, __glibcpp_long_double_QNaN_bytes,
__glibcpp_long_double_has_QNaN, __glibcpp_long_double_SNaN_bytes,
__glibcpp_long_double_has_SNaN): Remove.
(__glibcpp_f128_is_iec559): True if IEEE.
(__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
(std::numeric_limits<float>::has_quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::has_signaling_NaN): Mirror has_quiet_NaN.
(std::numeric_limits<float>::quiet_NaN): Use __builtin_nanf.
(std::numeric_limits<float>::signaling_NaN): Use __builtin_nansf.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_QNaN, __glibcpp_float_SNaN): Remove.
(__glibcpp_double_QNaN, __glibcpp_double_SNaN): Remove.
(__glibcpp_long_double_QNaN, __glibcpp_long_double_SNaN): Remove.
* testsuite/18_support/numeric_limits.cc (test_infinity): New.
(test_denorm_min, test_qnan, test_is_iec559): New.
From-SVN: r57221
2002-09-17 03:28:50 +02:00
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NAN,
|
|
|
|
"__builtin_nan",
|
|
|
|
BT_FN_DOUBLE_CONST_STRING,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANF,
|
|
|
|
"__builtin_nanf",
|
|
|
|
BT_FN_FLOAT_CONST_STRING,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANL,
|
|
|
|
"__builtin_nanl",
|
|
|
|
BT_FN_LONG_DOUBLE_CONST_STRING,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANS,
|
|
|
|
"__builtin_nans",
|
|
|
|
BT_FN_DOUBLE_CONST_STRING,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANSF,
|
|
|
|
"__builtin_nansf",
|
|
|
|
BT_FN_FLOAT_CONST_STRING,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
DEF_LIB_BUILTIN(BUILT_IN_NANSL,
|
|
|
|
"__builtin_nansl",
|
|
|
|
BT_FN_LONG_DOUBLE_CONST_STRING,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_SAVEREGS,
|
|
|
|
"__builtin_saveregs",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CLASSIFY_TYPE,
|
|
|
|
"__builtin_classify_type",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_NEXT_ARG,
|
|
|
|
"__builtin_next_arg",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO,
|
|
|
|
"__builtin_args_info",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P,
|
|
|
|
"__builtin_constant_p",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS,
|
|
|
|
"__builtin_frame_address",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_UNSIGNED,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_RETURN_ADDRESS,
|
|
|
|
"__builtin_return_address",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_UNSIGNED,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS,
|
|
|
|
"__builtin_aggregate_incoming_address",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_APPLY_ARGS,
|
|
|
|
"__builtin_apply_args",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_APPLY,
|
|
|
|
"__builtin_apply",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_RETURN,
|
|
|
|
"__builtin_return",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_PTR,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_SETJMP,
|
|
|
|
"__builtin_setjmp",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_PTR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_LONGJMP,
|
|
|
|
"__builtin_longjmp",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_PTR_INT,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_TRAP,
|
|
|
|
"__builtin_trap",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
2001-12-04 01:50:35 +01:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_PREFETCH,
|
|
|
|
"__builtin_prefetch",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_CONST_PTR_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Stdio builtins. */
|
|
|
|
DEF_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR,
|
|
|
|
"__builtin_putchar",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_FALLBACK_BUILTIN(BUILT_IN_PUTS,
|
|
|
|
"__builtin_puts",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_CONST_STRING,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF,
|
|
|
|
"__builtin_printf",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_1_2)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_FALLBACK_BUILTIN(BUILT_IN_FPUTC,
|
|
|
|
"__builtin_fputc",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_INT_PTR,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
/* Declare the __builtin_ style with arguments and the regular style
|
|
|
|
without them. We rely on stdio.h to supply the arguments for the
|
|
|
|
regular style declaration since we had to use void* instead of
|
|
|
|
FILE* in the __builtin_ prototype supplied here. */
|
|
|
|
DEF_BUILTIN (BUILT_IN_FPUTS,
|
|
|
|
"__builtin_fputs",
|
|
|
|
BUILT_IN_NORMAL,
|
|
|
|
BT_FN_INT_CONST_STRING_PTR,
|
|
|
|
BT_FN_INT_VAR,
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, false, ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_FALLBACK_BUILTIN(BUILT_IN_FWRITE,
|
|
|
|
"__builtin_fwrite",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR,
|
|
|
|
ATTR_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF,
|
|
|
|
"__builtin_fprintf",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_PTR_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_2_3)
|
2000-09-12 17:10:50 +02:00
|
|
|
|
2001-12-21 03:36:37 +01:00
|
|
|
/* Stdio unlocked builtins. */
|
|
|
|
|
|
|
|
DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTCHAR_UNLOCKED,
|
|
|
|
"__builtin_putchar_unlocked",
|
|
|
|
BT_FN_INT_INT)
|
|
|
|
DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_PUTS_UNLOCKED,
|
|
|
|
"__builtin_puts_unlocked",
|
|
|
|
BT_FN_INT_CONST_STRING)
|
|
|
|
DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_PRINTF_UNLOCKED,
|
|
|
|
"__builtin_printf_unlocked",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_1_2)
|
2001-12-21 03:36:37 +01:00
|
|
|
DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FPUTC_UNLOCKED,
|
|
|
|
"__builtin_fputc_unlocked",
|
|
|
|
BT_FN_INT_INT_PTR)
|
|
|
|
/* Declare the __builtin_ style with arguments and the regular style
|
|
|
|
without them. We rely on stdio.h to supply the arguments for the
|
|
|
|
regular style declaration since we had to use void* instead of
|
|
|
|
FILE* in the __builtin_ prototype supplied here. */
|
|
|
|
DEF_BUILTIN (BUILT_IN_FPUTS_UNLOCKED,
|
|
|
|
"__builtin_fputs_unlocked",
|
|
|
|
BUILT_IN_NORMAL,
|
|
|
|
BT_FN_INT_CONST_STRING_PTR,
|
|
|
|
BT_FN_INT_VAR,
|
2002-07-06 02:16:44 +02:00
|
|
|
true, true, true, ATTR_NOTHROW_LIST)
|
2001-12-21 03:36:37 +01:00
|
|
|
DEF_EXT_FALLBACK_BUILTIN(BUILT_IN_FWRITE_UNLOCKED,
|
|
|
|
"__builtin_fwrite_unlocked",
|
|
|
|
BT_FN_SIZE_CONST_PTR_SIZE_SIZE_PTR)
|
|
|
|
DEF_EXT_FRONT_END_LIB_BUILTIN(BUILT_IN_FPRINTF_UNLOCKED,
|
|
|
|
"__builtin_fprintf_unlocked",
|
2002-07-06 02:16:44 +02:00
|
|
|
BT_FN_INT_PTR_CONST_STRING_VAR,
|
|
|
|
ATTR_FORMAT_PRINTF_2_3)
|
2001-12-21 03:36:37 +01:00
|
|
|
|
2000-03-23 01:20:37 +01:00
|
|
|
/* ISO C99 floating point unordered comparisons. */
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISGREATER,
|
|
|
|
"__builtin_isgreater",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISGREATEREQUAL,
|
|
|
|
"__builtin_isgreaterequal",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISLESS,
|
|
|
|
"__builtin_isless",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISLESSEQUAL,
|
|
|
|
"__builtin_islessequal",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISLESSGREATER,
|
|
|
|
"__builtin_islessgreater",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_ISUNORDERED,
|
|
|
|
"__builtin_isunordered",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_VAR,
|
|
|
|
ATTR_CONST_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* Various hooks for the DWARF 2 __throw routine. */
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_UNWIND_INIT,
|
|
|
|
"__builtin_unwind_init",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_DWARF_CFA,
|
|
|
|
"__builtin_dwarf_cfa",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_DWARF_FP_REGNUM,
|
|
|
|
"__builtin_dwarf_fp_regnum",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_UNSIGNED,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES,
|
|
|
|
"__builtin_init_dwarf_reg_size_table",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_PTR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_FROB_RETURN_ADDR,
|
|
|
|
"__builtin_frob_return_addr",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_PTR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR,
|
|
|
|
"__builtin_extract_return_addr",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_PTR_PTR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN,
|
|
|
|
"__builtin_eh_return",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_PTRMODE_PTR,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_REGNO,
|
|
|
|
"__builtin_eh_return_data_regno",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_INT_INT,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
varargs.h: Replace with stub which issues #error.
* ginclude/varargs.h: Replace with stub which issues #error.
* ginclude/stdarg.h: __builtin_stdarg_start is renamed
__builtin_va_start.
* builtins.def (BUILT_IN_VARARGS_START): Delete.
(BUILT_IN_VA_START): New.
* builtins.c (expand_builtin_va_start): Eliminate first
argument and code to implement pre-ISO varargs.
(std_expand_builtin_va_start): Ignore first argument; it is
always 1.
(expand_builtin): Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* function.c (assign_parms): Delete hide_last_arg and all
its uses.
(mark_varargs): Delete function.
* function.h (struct function): Delete 'varargs' bit.
(current_function_varargs): Delete macro.
* tree.h: Don't declare mark_varargs.
* c-decl.c (c_function_varargs, c_mark_varargs): Delete.
(c_expand_body): Don't call mark_varargs.
* c-objc-common.c: Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* c-tree.h: Don't declare c_mark_varargs.
* c-parse.in: Remove grammar rules for '&...' (which has been
commented out since before 2.7.2) and for '...' in K+R
argument declarations.
* builtins.c, function.c, integrate.c, sibcall.c,
config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c,
config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c,
config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h,
config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h,
config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c,
config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16.c: Delete all references to
current_function_varargs, and code predicated on that flag.
* config/alpha/alpha.c (alpha_va_start),
config/arc/arc.c (arc_va_start),
config/i386/i386.c (ix86_va_start),
config/mips/mips.c (mips_va_start),
config/mn10300/mn10300.c (mn10300_va_start),
config/rs6000/rs6000.c (rs6000_va_start),
config/s390/s390.c (s390_va_start),
config/sh/sh.c (sh_va_start),
Ignore first argument; it is always 1.
* config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start.
* config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start.
* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c:
Delete m68hc11_va_start.
* config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h:
No need to define EXPAND_BUILTIN_VA_START.
* doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi,
doc/trouble.texi: Remove references to GCC-provided <varargs.h>.
testsuite:
* c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c,
c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c,
c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c,
c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c:
Convert to use <stdarg.h>.
* c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x:
Delete.
* gcc.dg/va-arg-2.c: New.
* lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS.
From-SVN: r55472
2002-07-16 04:16:47 +02:00
|
|
|
/* Variable argument list (stdarg.h) support */
|
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_VA_START,
|
|
|
|
"__builtin_va_start",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_VALIST_REF_VAR,
|
|
|
|
ATTR_NULL)
|
varargs.h: Replace with stub which issues #error.
* ginclude/varargs.h: Replace with stub which issues #error.
* ginclude/stdarg.h: __builtin_stdarg_start is renamed
__builtin_va_start.
* builtins.def (BUILT_IN_VARARGS_START): Delete.
(BUILT_IN_VA_START): New.
* builtins.c (expand_builtin_va_start): Eliminate first
argument and code to implement pre-ISO varargs.
(std_expand_builtin_va_start): Ignore first argument; it is
always 1.
(expand_builtin): Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* function.c (assign_parms): Delete hide_last_arg and all
its uses.
(mark_varargs): Delete function.
* function.h (struct function): Delete 'varargs' bit.
(current_function_varargs): Delete macro.
* tree.h: Don't declare mark_varargs.
* c-decl.c (c_function_varargs, c_mark_varargs): Delete.
(c_expand_body): Don't call mark_varargs.
* c-objc-common.c: Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* c-tree.h: Don't declare c_mark_varargs.
* c-parse.in: Remove grammar rules for '&...' (which has been
commented out since before 2.7.2) and for '...' in K+R
argument declarations.
* builtins.c, function.c, integrate.c, sibcall.c,
config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c,
config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c,
config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h,
config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h,
config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c,
config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16.c: Delete all references to
current_function_varargs, and code predicated on that flag.
* config/alpha/alpha.c (alpha_va_start),
config/arc/arc.c (arc_va_start),
config/i386/i386.c (ix86_va_start),
config/mips/mips.c (mips_va_start),
config/mn10300/mn10300.c (mn10300_va_start),
config/rs6000/rs6000.c (rs6000_va_start),
config/s390/s390.c (s390_va_start),
config/sh/sh.c (sh_va_start),
Ignore first argument; it is always 1.
* config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start.
* config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start.
* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c:
Delete m68hc11_va_start.
* config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h:
No need to define EXPAND_BUILTIN_VA_START.
* doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi,
doc/trouble.texi: Remove references to GCC-provided <varargs.h>.
testsuite:
* c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c,
c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c,
c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c,
c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c:
Convert to use <stdarg.h>.
* c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x:
Delete.
* gcc.dg/va-arg-2.c: New.
* lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS.
From-SVN: r55472
2002-07-16 04:16:47 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_STDARG_START, /* backward compat */
|
2001-05-25 22:00:59 +02:00
|
|
|
"__builtin_stdarg_start",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_VALIST_REF_VAR,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_VA_END,
|
|
|
|
"__builtin_va_end",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_VALIST_REF,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_VA_COPY,
|
|
|
|
"__builtin_va_copy",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_VOID_VALIST_REF_VALIST_ARG,
|
|
|
|
ATTR_NULL)
|
varargs.h: Replace with stub which issues #error.
* ginclude/varargs.h: Replace with stub which issues #error.
* ginclude/stdarg.h: __builtin_stdarg_start is renamed
__builtin_va_start.
* builtins.def (BUILT_IN_VARARGS_START): Delete.
(BUILT_IN_VA_START): New.
* builtins.c (expand_builtin_va_start): Eliminate first
argument and code to implement pre-ISO varargs.
(std_expand_builtin_va_start): Ignore first argument; it is
always 1.
(expand_builtin): Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* function.c (assign_parms): Delete hide_last_arg and all
its uses.
(mark_varargs): Delete function.
* function.h (struct function): Delete 'varargs' bit.
(current_function_varargs): Delete macro.
* tree.h: Don't declare mark_varargs.
* c-decl.c (c_function_varargs, c_mark_varargs): Delete.
(c_expand_body): Don't call mark_varargs.
* c-objc-common.c: Handle BUILT_IN_VA_START and
BUILT_IN_STDARG_START identically. Delete
BUILT_IN_VARARGS_START case.
* c-tree.h: Don't declare c_mark_varargs.
* c-parse.in: Remove grammar rules for '&...' (which has been
commented out since before 2.7.2) and for '...' in K+R
argument declarations.
* builtins.c, function.c, integrate.c, sibcall.c,
config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h,
config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c,
config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c,
config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h,
config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h,
config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c,
config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16.c: Delete all references to
current_function_varargs, and code predicated on that flag.
* config/alpha/alpha.c (alpha_va_start),
config/arc/arc.c (arc_va_start),
config/i386/i386.c (ix86_va_start),
config/mips/mips.c (mips_va_start),
config/mn10300/mn10300.c (mn10300_va_start),
config/rs6000/rs6000.c (rs6000_va_start),
config/s390/s390.c (s390_va_start),
config/sh/sh.c (sh_va_start),
Ignore first argument; it is always 1.
* config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start.
* config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start.
* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c:
Delete m68hc11_va_start.
* config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h:
No need to define EXPAND_BUILTIN_VA_START.
* doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi,
doc/trouble.texi: Remove references to GCC-provided <varargs.h>.
testsuite:
* c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c,
c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c,
c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c,
c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c:
Convert to use <stdarg.h>.
* c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x:
Delete.
* gcc.dg/va-arg-2.c: New.
* lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS.
From-SVN: r55472
2002-07-16 04:16:47 +02:00
|
|
|
|
2001-05-25 22:00:59 +02:00
|
|
|
DEF_GCC_BUILTIN(BUILT_IN_EXPECT,
|
|
|
|
"__builtin_expect",
|
2002-07-28 07:34:04 +02:00
|
|
|
BT_FN_LONG_LONG_LONG,
|
|
|
|
ATTR_NULL)
|
2001-05-25 22:00:59 +02:00
|
|
|
|
|
|
|
/* C++ extensions */
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_NEW)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_VEC_NEW)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_DELETE)
|
|
|
|
DEF_UNUSED_BUILTIN(BUILT_IN_VEC_DELETE)
|
2002-07-06 02:16:44 +02:00
|
|
|
|
|
|
|
/* Declare abort, exit, _exit and _Exit */
|
|
|
|
DEF_BUILTIN (BUILT_IN_ABORT,
|
|
|
|
"__builtin_abort",
|
|
|
|
NOT_BUILT_IN,
|
2002-07-11 03:20:23 +02:00
|
|
|
BT_FN_VOID,
|
|
|
|
BT_FN_VOID,
|
2002-07-06 02:16:44 +02:00
|
|
|
1, 0, 0,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_BUILTIN (BUILT_IN_EXIT,
|
|
|
|
"__builtin_exit",
|
|
|
|
NOT_BUILT_IN,
|
2002-07-11 03:20:23 +02:00
|
|
|
BT_FN_VOID_INT,
|
|
|
|
BT_FN_VOID_INT,
|
2002-07-06 02:16:44 +02:00
|
|
|
1, 0, 0,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_BUILTIN (BUILT_IN__EXIT,
|
|
|
|
"__builtin__exit",
|
|
|
|
NOT_BUILT_IN,
|
|
|
|
BT_FN_VOID_INT,
|
|
|
|
BT_FN_VOID_INT,
|
|
|
|
1, 0, 1,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|
|
|
|
DEF_BUILTIN (BUILT_IN__EXIT2,
|
|
|
|
"__builtin__Exit",
|
|
|
|
NOT_BUILT_IN,
|
|
|
|
BT_FN_VOID_INT,
|
|
|
|
BT_FN_VOID_INT,
|
|
|
|
1, 0, !flag_isoc99,
|
|
|
|
ATTR_NORETURN_NOTHROW_LIST)
|
|
|
|
|