2000-03-09 03:39:09 +00:00
|
|
|
/* Header file for libgcc2.c. */
|
2005-02-10 18:59:07 +00:00
|
|
|
/* Copyright (C) 2000, 2001, 2004, 2005
|
2000-03-09 03:39:09 +00:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
|
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 14:35:51 +00:00
|
|
|
This file is part of GCC.
|
2000-03-09 03:39:09 +00: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 14:35:51 +00: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-09 03:39:09 +00: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 14:35:51 +00: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-09 03:39:09 +00: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 14:35:51 +00:00
|
|
|
along with GCC; see the file COPYING. If not, write to the Free
|
2005-06-25 02:02:01 +00:00
|
|
|
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
02110-1301, USA. */
|
2000-03-09 03:39:09 +00:00
|
|
|
|
2003-04-22 17:21:04 +00:00
|
|
|
/* As a special exception, if you link this library with other files,
|
|
|
|
some of which are compiled with GCC, to produce an executable,
|
|
|
|
this library does not by itself cause the resulting executable
|
|
|
|
to be covered by the GNU General Public License.
|
|
|
|
This exception does not however invalidate any other reasons why
|
|
|
|
the executable file might be covered by the GNU General Public License. */
|
|
|
|
|
|
|
|
|
2001-05-25 18:31:47 -07:00
|
|
|
#ifndef GCC_LIBGCC2_H
|
|
|
|
#define GCC_LIBGCC2_H
|
2000-03-09 03:39:09 +00:00
|
|
|
|
2004-11-30 08:15:42 +00:00
|
|
|
#ifndef HIDE_EXPORTS
|
2004-08-03 16:57:40 +00:00
|
|
|
#pragma GCC visibility push(default)
|
2004-11-30 08:15:42 +00:00
|
|
|
#endif
|
2004-08-03 16:57:40 +00:00
|
|
|
|
2000-03-09 03:39:09 +00:00
|
|
|
extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
|
|
|
|
extern void __clear_cache (char *, char *);
|
2001-05-14 02:46:22 +00:00
|
|
|
extern void __eprintf (const char *, const char *, unsigned int, const char *)
|
|
|
|
__attribute__ ((__noreturn__));
|
2000-03-09 03:39:09 +00:00
|
|
|
|
|
|
|
/* Permit the tm.h file to select the endianness to use just for this
|
|
|
|
file. This is used when the endianness is determined when the
|
|
|
|
compiler is run. */
|
|
|
|
|
|
|
|
#ifndef LIBGCC2_WORDS_BIG_ENDIAN
|
|
|
|
#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
|
|
|
|
#endif
|
|
|
|
|
re PR middle-end/19920 (build broken on several targets due to recent 'DC' type update to libgcc2)
PR 19920
* libgcc2.c (WORD_SIZE): Remove all definitions; replace uses
with W_TYPE_SIZE.
(HIGH_WORD_COEFF, HIGH_HALFWORD_COEFF): Remove all definitions;
replace uses with Wtype_MAXp1_F.
(L_fixunstfdi, L_fixtfdi, L_floatditf, L_fixunsxfdi, L_fixxfdi,
L_floatdixf, L_fixunsxfsi, L_fixunsdfdi, L_floatdidf, L_fixunsdfsi,
L_powidf2, L_powixf2, L_powitf2, L_muldc3, L_divdc3, L_mulxc3,
L_divxc3, L_multc3, L_divtc3): Protect with HAVE_DFMODE, HAVE_XFMODE,
and HAVE_TFMODE as appropriate.
(__fixunssfDI): Provide an implementation that doesn't need DFmode.
(__floatdisf): Likewise.
* libgcc2.h (LIBGCC2_DOUBLE_TYPE_SIZE): New.
(HAVE_DFMODE, HAVE_XFMODE, HAVE_TFMODE): New.
(Wtype_MAXp1_F): New.
(DFtype, DCtype, __fixdfdi, __floatdidf, __fixunsdfSI, __fixunsdfDI,
__powidf2, __divdc3, __muldc3): Protect with HAVE_DFMODE.
From-SVN: r95121
2005-02-16 14:55:33 -08:00
|
|
|
#ifndef LIBGCC2_DOUBLE_TYPE_SIZE
|
|
|
|
#define LIBGCC2_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
|
|
|
|
#endif
|
2000-03-09 03:39:09 +00:00
|
|
|
#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
|
|
|
|
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
|
|
|
|
#endif
|
|
|
|
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
#ifndef LIBGCC2_HAS_SF_MODE
|
|
|
|
#define LIBGCC2_HAS_SF_MODE (BITS_PER_UNIT == 8)
|
|
|
|
#endif
|
|
|
|
|
2005-02-25 21:34:49 +00:00
|
|
|
#ifndef LIBGCC2_HAS_DF_MODE
|
|
|
|
#define LIBGCC2_HAS_DF_MODE \
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
(BITS_PER_UNIT == 8 \
|
|
|
|
&& (LIBGCC2_DOUBLE_TYPE_SIZE == 64 \
|
|
|
|
|| LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64))
|
2005-02-25 21:34:49 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LIBGCC2_HAS_XF_MODE
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
#define LIBGCC2_HAS_XF_MODE \
|
|
|
|
(BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 80)
|
2005-02-25 21:34:49 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LIBGCC2_HAS_TF_MODE
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
#define LIBGCC2_HAS_TF_MODE \
|
|
|
|
(BITS_PER_UNIT == 8 && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
|
2005-02-25 21:34:49 +00:00
|
|
|
#endif
|
|
|
|
|
re PR other/25028 (TImode-to-floating conversions broken)
PR other/25028
* libgcc2.h (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Define.
* libgcc2.c (__floatdixf, __floatundixf, __floatditf,
__floatunditf): Use #error if type sizes don't match requirements
of implementation.
(__floatdisf, __floatdidf): Unify. Possibly use XFmode or TFmode
as wider floating-point type. Use #error if type sizes don't
match requirements of implementation. Avoid overflow in computing
Wtype_MAXp1_F * Wtype_MAXp1_F. When special casing conversion,
shift one more bit. Cast 1 to DWtype or UDWtype for shifting.
(__floatundisf, __floatundidf): Likewise.
* config/ia64/hpux.h (XF_SIZE, TF_SIZE): Define.
* config/ia64/ia64.c (ia64_init_libfuncs): Use
_U_Qfcnvfxt_quad_to_quad and _U_Qfcnvxf_quad_to_quad for
TFmode-TImode conversions.
* doc/tm.texi (SF_SIZE, DF_SIZE, XF_SIZE, TF_SIZE): Document.
testsuite:
* gcc.dg/torture/fp-int-convert-timode.c: Only XFAIL for LP64 IA64
HP-UX.
From-SVN: r108598
2005-12-15 21:50:10 +00:00
|
|
|
#ifndef SF_SIZE
|
|
|
|
#if LIBGCC2_HAS_SF_MODE
|
|
|
|
#define SF_SIZE FLT_MANT_DIG
|
|
|
|
#else
|
|
|
|
#define SF_SIZE 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef DF_SIZE
|
|
|
|
#if LIBGCC2_HAS_DF_MODE
|
|
|
|
#if LIBGCC2_DOUBLE_TYPE_SIZE == 64
|
|
|
|
#define DF_SIZE DBL_MANT_DIG
|
|
|
|
#elif LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64
|
|
|
|
#define DF_SIZE LDBL_MANT_DIG
|
|
|
|
#else
|
|
|
|
#define DF_SIZE 0
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define DF_SIZE 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef XF_SIZE
|
|
|
|
#if LIBGCC2_HAS_XF_MODE
|
|
|
|
#define XF_SIZE LDBL_MANT_DIG
|
|
|
|
#else
|
|
|
|
#define XF_SIZE 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TF_SIZE
|
|
|
|
#if LIBGCC2_HAS_TF_MODE
|
|
|
|
#define TF_SIZE LDBL_MANT_DIG
|
|
|
|
#else
|
|
|
|
#define TF_SIZE 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2006-01-20 00:42:29 +00:00
|
|
|
/* FIXME: This #ifdef probably should be removed, ie. enable the test
|
|
|
|
for mips too. */
|
|
|
|
#ifdef __powerpc__
|
|
|
|
#define IS_IBM_EXTENDED(SIZE) (SIZE == 106)
|
|
|
|
#else
|
|
|
|
#define IS_IBM_EXTENDED(SIZE) 0
|
|
|
|
#endif
|
|
|
|
|
2000-03-09 03:39:09 +00:00
|
|
|
/* In the first part of this file, we are interfacing to calls generated
|
|
|
|
by the compiler itself. These calls pass values into these routines
|
|
|
|
which have very specific modes (rather than very specific types), and
|
|
|
|
these compiler-generated calls also expect any return values to have
|
|
|
|
very specific modes (rather than very specific types). Thus, we need
|
|
|
|
to avoid using regular C language type names in this part of the file
|
|
|
|
because the sizes for those types can be configured to be anything.
|
|
|
|
Instead we use the following special type names. */
|
|
|
|
|
|
|
|
typedef int QItype __attribute__ ((mode (QI)));
|
|
|
|
typedef unsigned int UQItype __attribute__ ((mode (QI)));
|
|
|
|
typedef int HItype __attribute__ ((mode (HI)));
|
|
|
|
typedef unsigned int UHItype __attribute__ ((mode (HI)));
|
2000-03-27 11:03:26 +00:00
|
|
|
#if MIN_UNITS_PER_WORD > 1
|
2003-12-21 14:08:35 +00:00
|
|
|
/* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1. */
|
2000-03-09 03:39:09 +00:00
|
|
|
typedef int SItype __attribute__ ((mode (SI)));
|
|
|
|
typedef unsigned int USItype __attribute__ ((mode (SI)));
|
2000-09-10 15:02:52 +02:00
|
|
|
#if LONG_LONG_TYPE_SIZE > 32
|
2003-12-21 14:08:35 +00:00
|
|
|
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2. */
|
2000-03-09 03:39:09 +00:00
|
|
|
typedef int DItype __attribute__ ((mode (DI)));
|
|
|
|
typedef unsigned int UDItype __attribute__ ((mode (DI)));
|
2000-04-15 12:34:38 -04:00
|
|
|
#if MIN_UNITS_PER_WORD > 4
|
2003-12-21 14:08:35 +00:00
|
|
|
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4. */
|
2000-04-15 12:34:38 -04:00
|
|
|
typedef int TItype __attribute__ ((mode (TI)));
|
|
|
|
typedef unsigned int UTItype __attribute__ ((mode (TI)));
|
|
|
|
#endif
|
2000-03-09 03:39:09 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
#if LIBGCC2_HAS_SF_MODE
|
2000-03-09 03:39:09 +00:00
|
|
|
typedef float SFtype __attribute__ ((mode (SF)));
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
typedef _Complex float SCtype __attribute__ ((mode (SC)));
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
#endif
|
2005-02-25 21:34:49 +00:00
|
|
|
#if LIBGCC2_HAS_DF_MODE
|
re PR middle-end/19920 (build broken on several targets due to recent 'DC' type update to libgcc2)
PR 19920
* libgcc2.c (WORD_SIZE): Remove all definitions; replace uses
with W_TYPE_SIZE.
(HIGH_WORD_COEFF, HIGH_HALFWORD_COEFF): Remove all definitions;
replace uses with Wtype_MAXp1_F.
(L_fixunstfdi, L_fixtfdi, L_floatditf, L_fixunsxfdi, L_fixxfdi,
L_floatdixf, L_fixunsxfsi, L_fixunsdfdi, L_floatdidf, L_fixunsdfsi,
L_powidf2, L_powixf2, L_powitf2, L_muldc3, L_divdc3, L_mulxc3,
L_divxc3, L_multc3, L_divtc3): Protect with HAVE_DFMODE, HAVE_XFMODE,
and HAVE_TFMODE as appropriate.
(__fixunssfDI): Provide an implementation that doesn't need DFmode.
(__floatdisf): Likewise.
* libgcc2.h (LIBGCC2_DOUBLE_TYPE_SIZE): New.
(HAVE_DFMODE, HAVE_XFMODE, HAVE_TFMODE): New.
(Wtype_MAXp1_F): New.
(DFtype, DCtype, __fixdfdi, __floatdidf, __fixunsdfSI, __fixunsdfDI,
__powidf2, __divdc3, __muldc3): Protect with HAVE_DFMODE.
From-SVN: r95121
2005-02-16 14:55:33 -08:00
|
|
|
typedef float DFtype __attribute__ ((mode (DF)));
|
|
|
|
typedef _Complex float DCtype __attribute__ ((mode (DC)));
|
|
|
|
#endif
|
2005-02-25 21:34:49 +00:00
|
|
|
#if LIBGCC2_HAS_XF_MODE
|
2000-03-09 03:39:09 +00:00
|
|
|
typedef float XFtype __attribute__ ((mode (XF)));
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
typedef _Complex float XCtype __attribute__ ((mode (XC)));
|
2000-03-09 03:39:09 +00:00
|
|
|
#endif
|
2005-02-25 21:34:49 +00:00
|
|
|
#if LIBGCC2_HAS_TF_MODE
|
2000-03-09 03:39:09 +00:00
|
|
|
typedef float TFtype __attribute__ ((mode (TF)));
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
typedef _Complex float TCtype __attribute__ ((mode (TC)));
|
2000-03-09 03:39:09 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef int word_type __attribute__ ((mode (__word__)));
|
|
|
|
|
|
|
|
/* Make sure that we don't accidentally use any normal C language built-in
|
|
|
|
type names in the first part of this file. Instead we want to use *only*
|
|
|
|
the type names defined above. The following macro definitions insure
|
|
|
|
that if we *do* accidentally use some normal C language built-in type name,
|
|
|
|
we will get a syntax error. */
|
|
|
|
|
|
|
|
#define char bogus_type
|
|
|
|
#define short bogus_type
|
|
|
|
#define int bogus_type
|
|
|
|
#define long bogus_type
|
|
|
|
#define unsigned bogus_type
|
|
|
|
#define float bogus_type
|
|
|
|
#define double bogus_type
|
|
|
|
|
re PR other/18665 (-ftrapv borks up simple integer arithmetic)
PR other/18665
* libgcc-std.ver (GCC_3.4.4): Inherit from GCC_3.4.2.
Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3.
* libgcc2.c (__addvsi3): Rename to __addvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__addvdi3): Rename to __addvDI3.
(__subvsi3): Rename to __subvSI3. Use word type for the result.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__subvdi3): Rename to __subvDI3.
(_mulvsi3): Rename to _mulvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(_mulvdi3): Rename to _mulvDI3.
(__negvsi2): Rename to __negvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__negvdi2): Rename to __negvDI2.
(__absvsi2): Rename to __absvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvdi2): Rename to __absvDI2.
* libgcc2.h (64-bit targets): Define COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvSI2, __addvSI3, __subvSI3, __mulvSI3, __negvSI2, __absvDI2,
__addvDI3, __subvDI3, __mulvDI3, __negvDI2): Define to the appropriate
symbol and declare.
(__absvsi2, __addvsi3, __subvsi3, __mulvsi3, __negvsi2): Declare if
COMPAT_SIMODE_TRAPPING_ARITHMETIC.
From-SVN: r92187
2004-12-15 13:30:46 +01:00
|
|
|
/* Versions prior to 3.4.4 were not taking into account the word size for
|
|
|
|
the 5 trapping arithmetic functions absv, addv, subv, mulv and negv. As
|
|
|
|
a consequence, the si and di variants were always and the only ones emitted.
|
|
|
|
To maintain backward compatibility, COMPAT_SIMODE_TRAPPING_ARITHMETIC is
|
|
|
|
defined on platforms where it makes sense to still have the si variants
|
|
|
|
emitted. As a bonus, their implementation is now correct. Note that the
|
|
|
|
same mechanism should have been implemented for the di variants, but it
|
|
|
|
turns out that no platform would define COMPAT_DIMODE_TRAPPING_ARITHMETIC
|
|
|
|
if it existed. */
|
|
|
|
|
2006-05-19 08:05:39 +00:00
|
|
|
#if LIBGCC2_UNITS_PER_WORD == 8
|
2000-04-15 12:34:38 -04:00
|
|
|
#define W_TYPE_SIZE (8 * BITS_PER_UNIT)
|
|
|
|
#define Wtype DItype
|
|
|
|
#define UWtype UDItype
|
|
|
|
#define HWtype DItype
|
|
|
|
#define UHWtype UDItype
|
|
|
|
#define DWtype TItype
|
|
|
|
#define UDWtype UTItype
|
|
|
|
#define __NW(a,b) __ ## a ## di ## b
|
|
|
|
#define __NDW(a,b) __ ## a ## ti ## b
|
re PR other/18665 (-ftrapv borks up simple integer arithmetic)
PR other/18665
* libgcc-std.ver (GCC_3.4.4): Inherit from GCC_3.4.2.
Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3.
* libgcc2.c (__addvsi3): Rename to __addvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__addvdi3): Rename to __addvDI3.
(__subvsi3): Rename to __subvSI3. Use word type for the result.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__subvdi3): Rename to __subvDI3.
(_mulvsi3): Rename to _mulvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(_mulvdi3): Rename to _mulvDI3.
(__negvsi2): Rename to __negvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__negvdi2): Rename to __negvDI2.
(__absvsi2): Rename to __absvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvdi2): Rename to __absvDI2.
* libgcc2.h (64-bit targets): Define COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvSI2, __addvSI3, __subvSI3, __mulvSI3, __negvSI2, __absvDI2,
__addvDI3, __subvDI3, __mulvDI3, __negvDI2): Define to the appropriate
symbol and declare.
(__absvsi2, __addvsi3, __subvsi3, __mulvsi3, __negvsi2): Declare if
COMPAT_SIMODE_TRAPPING_ARITHMETIC.
From-SVN: r92187
2004-12-15 13:30:46 +01:00
|
|
|
#define COMPAT_SIMODE_TRAPPING_ARITHMETIC
|
2006-05-19 08:05:39 +00:00
|
|
|
#elif LIBGCC2_UNITS_PER_WORD == 4
|
2000-03-09 03:39:09 +00:00
|
|
|
#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
|
|
|
|
#define Wtype SItype
|
|
|
|
#define UWtype USItype
|
|
|
|
#define HWtype SItype
|
|
|
|
#define UHWtype USItype
|
|
|
|
#define DWtype DItype
|
|
|
|
#define UDWtype UDItype
|
|
|
|
#define __NW(a,b) __ ## a ## si ## b
|
|
|
|
#define __NDW(a,b) __ ## a ## di ## b
|
2006-05-19 08:05:39 +00:00
|
|
|
#elif LIBGCC2_UNITS_PER_WORD == 2
|
2000-03-09 03:39:09 +00:00
|
|
|
#define W_TYPE_SIZE (2 * BITS_PER_UNIT)
|
|
|
|
#define Wtype HItype
|
|
|
|
#define UWtype UHItype
|
|
|
|
#define HWtype HItype
|
|
|
|
#define UHWtype UHItype
|
|
|
|
#define DWtype SItype
|
|
|
|
#define UDWtype USItype
|
|
|
|
#define __NW(a,b) __ ## a ## hi ## b
|
|
|
|
#define __NDW(a,b) __ ## a ## si ## b
|
|
|
|
#else
|
|
|
|
#define W_TYPE_SIZE BITS_PER_UNIT
|
|
|
|
#define Wtype QItype
|
|
|
|
#define UWtype UQItype
|
|
|
|
#define HWtype QItype
|
|
|
|
#define UHWtype UQItype
|
|
|
|
#define DWtype HItype
|
|
|
|
#define UDWtype UHItype
|
|
|
|
#define __NW(a,b) __ ## a ## qi ## b
|
|
|
|
#define __NDW(a,b) __ ## a ## hi ## b
|
|
|
|
#endif
|
|
|
|
|
2001-01-31 03:53:32 +00:00
|
|
|
#define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1))
|
|
|
|
#define Wtype_MIN (- Wtype_MAX - 1)
|
|
|
|
|
re PR middle-end/19920 (build broken on several targets due to recent 'DC' type update to libgcc2)
PR 19920
* libgcc2.c (WORD_SIZE): Remove all definitions; replace uses
with W_TYPE_SIZE.
(HIGH_WORD_COEFF, HIGH_HALFWORD_COEFF): Remove all definitions;
replace uses with Wtype_MAXp1_F.
(L_fixunstfdi, L_fixtfdi, L_floatditf, L_fixunsxfdi, L_fixxfdi,
L_floatdixf, L_fixunsxfsi, L_fixunsdfdi, L_floatdidf, L_fixunsdfsi,
L_powidf2, L_powixf2, L_powitf2, L_muldc3, L_divdc3, L_mulxc3,
L_divxc3, L_multc3, L_divtc3): Protect with HAVE_DFMODE, HAVE_XFMODE,
and HAVE_TFMODE as appropriate.
(__fixunssfDI): Provide an implementation that doesn't need DFmode.
(__floatdisf): Likewise.
* libgcc2.h (LIBGCC2_DOUBLE_TYPE_SIZE): New.
(HAVE_DFMODE, HAVE_XFMODE, HAVE_TFMODE): New.
(Wtype_MAXp1_F): New.
(DFtype, DCtype, __fixdfdi, __floatdidf, __fixunsdfSI, __fixunsdfDI,
__powidf2, __divdc3, __muldc3): Protect with HAVE_DFMODE.
From-SVN: r95121
2005-02-16 14:55:33 -08:00
|
|
|
#if W_TYPE_SIZE == 8
|
|
|
|
# define Wtype_MAXp1_F 0x1p8f
|
|
|
|
#elif W_TYPE_SIZE == 16
|
|
|
|
# define Wtype_MAXp1_F 0x1p16f
|
|
|
|
#elif W_TYPE_SIZE == 32
|
|
|
|
# define Wtype_MAXp1_F 0x1p32f
|
|
|
|
#elif W_TYPE_SIZE == 64
|
|
|
|
# define Wtype_MAXp1_F 0x1p64f
|
|
|
|
#else
|
|
|
|
# error "expand the table"
|
|
|
|
#endif
|
|
|
|
|
2000-04-15 12:34:38 -04:00
|
|
|
#define __muldi3 __NDW(mul,3)
|
|
|
|
#define __divdi3 __NDW(div,3)
|
|
|
|
#define __udivdi3 __NDW(udiv,3)
|
|
|
|
#define __moddi3 __NDW(mod,3)
|
|
|
|
#define __umoddi3 __NDW(umod,3)
|
|
|
|
#define __negdi2 __NDW(neg,2)
|
|
|
|
#define __lshrdi3 __NDW(lshr,3)
|
|
|
|
#define __ashldi3 __NDW(ashl,3)
|
|
|
|
#define __ashrdi3 __NDW(ashr,3)
|
|
|
|
#define __cmpdi2 __NDW(cmp,2)
|
|
|
|
#define __ucmpdi2 __NDW(ucmp,2)
|
|
|
|
#define __udivmoddi4 __NDW(udivmod,4)
|
|
|
|
#define __fixunstfDI __NDW(fixunstf,)
|
|
|
|
#define __fixtfdi __NDW(fixtf,)
|
|
|
|
#define __fixunsxfDI __NDW(fixunsxf,)
|
|
|
|
#define __fixxfdi __NDW(fixxf,)
|
|
|
|
#define __fixunsdfDI __NDW(fixunsdf,)
|
|
|
|
#define __fixdfdi __NDW(fixdf,)
|
|
|
|
#define __fixunssfDI __NDW(fixunssf,)
|
|
|
|
#define __fixsfdi __NDW(fixsf,)
|
|
|
|
#define __floatdixf __NDW(float,xf)
|
|
|
|
#define __floatditf __NDW(float,tf)
|
|
|
|
#define __floatdidf __NDW(float,df)
|
|
|
|
#define __floatdisf __NDW(float,sf)
|
fp-bit.c (clzusi): New function.
* config/fp-bit.c (clzusi): New function.
(si_to_float, usi_to_float): Use it to compute proper shift.
(usi_to_float): Preserve guard bits when shifting right.
* libgcc-std.ver (GCC_4.2.0): New version.
* libgcc2.c (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): New functions.
* libgcc2.h (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): Declare.
* mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf,
_floatundixf, and _floatunditf.
* optabs.c (expand_float): If target does not define a pattern for
signed or unsigned conversion, use an unsigned libcall instead of
a signed one.
(init_optabs): Initialize ufloat_optab.
testsuite:
* gcc.c-torture/execute/floatunsisf-1.c: New test.
From-SVN: r107345
2005-11-22 00:38:30 +00:00
|
|
|
#define __floatundixf __NDW(floatun,xf)
|
|
|
|
#define __floatunditf __NDW(floatun,tf)
|
|
|
|
#define __floatundidf __NDW(floatun,df)
|
|
|
|
#define __floatundisf __NDW(floatun,sf)
|
2000-04-15 12:34:38 -04:00
|
|
|
#define __fixunsxfSI __NW(fixunsxf,)
|
|
|
|
#define __fixunstfSI __NW(fixunstf,)
|
|
|
|
#define __fixunsdfSI __NW(fixunsdf,)
|
|
|
|
#define __fixunssfSI __NW(fixunssf,)
|
|
|
|
|
re PR other/18665 (-ftrapv borks up simple integer arithmetic)
PR other/18665
* libgcc-std.ver (GCC_3.4.4): Inherit from GCC_3.4.2.
Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3.
* libgcc2.c (__addvsi3): Rename to __addvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__addvdi3): Rename to __addvDI3.
(__subvsi3): Rename to __subvSI3. Use word type for the result.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__subvdi3): Rename to __subvDI3.
(_mulvsi3): Rename to _mulvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(_mulvdi3): Rename to _mulvDI3.
(__negvsi2): Rename to __negvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__negvdi2): Rename to __negvDI2.
(__absvsi2): Rename to __absvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvdi2): Rename to __absvDI2.
* libgcc2.h (64-bit targets): Define COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvSI2, __addvSI3, __subvSI3, __mulvSI3, __negvSI2, __absvDI2,
__addvDI3, __subvDI3, __mulvDI3, __negvDI2): Define to the appropriate
symbol and declare.
(__absvsi2, __addvsi3, __subvsi3, __mulvsi3, __negvsi2): Declare if
COMPAT_SIMODE_TRAPPING_ARITHMETIC.
From-SVN: r92187
2004-12-15 13:30:46 +01:00
|
|
|
#define __absvSI2 __NW(absv,2)
|
|
|
|
#define __addvSI3 __NW(addv,3)
|
|
|
|
#define __subvSI3 __NW(subv,3)
|
|
|
|
#define __mulvSI3 __NW(mulv,3)
|
|
|
|
#define __negvSI2 __NW(negv,2)
|
|
|
|
#define __absvDI2 __NDW(absv,2)
|
|
|
|
#define __addvDI3 __NDW(addv,3)
|
|
|
|
#define __subvDI3 __NDW(subv,3)
|
|
|
|
#define __mulvDI3 __NDW(mulv,3)
|
|
|
|
#define __negvDI2 __NDW(negv,2)
|
|
|
|
|
2003-02-04 16:52:24 -08:00
|
|
|
#define __ffsSI2 __NW(ffs,2)
|
libgcc-std.ver (__clztf2): New.
* libgcc-std.ver (__clztf2): New.
(__ctztf2, __popcounttf2, __paritytf2): New.
* libgcc2.c (__clzSI2, __clzDI2, __ctzSI2, __ctzDI2, __popcountSI2,
__popcountDI2, __paritySI2, __parityDI2): Use UWmode and UDWmode;
adjust code to match the different type sizes.
* libgcc2.h (__clzSI2, __ctzSI2, __popcountSI2, __paritySI2,
__clzDI2, __ctzDI2, __popcountDI2, __parityDI2): New macros.
* optabs.c (init_integral_libfuncs): Don't hard-code SImode and
TImode; select word_mode and twice that.
(init_floating_libfuncs): Don't hard-code SFmode and TFmode;
select the modes from float, double, and long double.
(init_optabs): Remove duplicate initializations.
From-SVN: r62606
2003-02-09 10:35:22 -08:00
|
|
|
#define __clzSI2 __NW(clz,2)
|
|
|
|
#define __ctzSI2 __NW(ctz,2)
|
|
|
|
#define __popcountSI2 __NW(popcount,2)
|
|
|
|
#define __paritySI2 __NW(parity,2)
|
2003-02-04 16:52:24 -08:00
|
|
|
#define __ffsDI2 __NDW(ffs,2)
|
libgcc-std.ver (__clztf2): New.
* libgcc-std.ver (__clztf2): New.
(__ctztf2, __popcounttf2, __paritytf2): New.
* libgcc2.c (__clzSI2, __clzDI2, __ctzSI2, __ctzDI2, __popcountSI2,
__popcountDI2, __paritySI2, __parityDI2): Use UWmode and UDWmode;
adjust code to match the different type sizes.
* libgcc2.h (__clzSI2, __ctzSI2, __popcountSI2, __paritySI2,
__clzDI2, __ctzDI2, __popcountDI2, __parityDI2): New macros.
* optabs.c (init_integral_libfuncs): Don't hard-code SImode and
TImode; select word_mode and twice that.
(init_floating_libfuncs): Don't hard-code SFmode and TFmode;
select the modes from float, double, and long double.
(init_optabs): Remove duplicate initializations.
From-SVN: r62606
2003-02-09 10:35:22 -08:00
|
|
|
#define __clzDI2 __NDW(clz,2)
|
|
|
|
#define __ctzDI2 __NDW(ctz,2)
|
|
|
|
#define __popcountDI2 __NDW(popcount,2)
|
|
|
|
#define __parityDI2 __NDW(parity,2)
|
2003-02-04 16:52:24 -08:00
|
|
|
|
2000-03-16 22:14:08 +00:00
|
|
|
extern DWtype __muldi3 (DWtype, DWtype);
|
|
|
|
extern DWtype __divdi3 (DWtype, DWtype);
|
|
|
|
extern UDWtype __udivdi3 (UDWtype, UDWtype);
|
|
|
|
extern UDWtype __umoddi3 (UDWtype, UDWtype);
|
|
|
|
extern DWtype __moddi3 (DWtype, DWtype);
|
2000-04-15 12:34:38 -04:00
|
|
|
|
2000-03-16 22:14:08 +00:00
|
|
|
/* __udivmoddi4 is static inline when building other libgcc2 portions. */
|
|
|
|
#if (!defined (L_udivdi3) && !defined (L_divdi3) && \
|
|
|
|
!defined (L_umoddi3) && !defined (L_moddi3))
|
|
|
|
extern UDWtype __udivmoddi4 (UDWtype, UDWtype, UDWtype *);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* __negdi2 is static inline when building other libgcc2 portions. */
|
|
|
|
#if !defined(L_divdi3) && !defined(L_moddi3)
|
|
|
|
extern DWtype __negdi2 (DWtype);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern DWtype __lshrdi3 (DWtype, word_type);
|
|
|
|
extern DWtype __ashldi3 (DWtype, word_type);
|
|
|
|
extern DWtype __ashrdi3 (DWtype, word_type);
|
[multiple changes]
2003-02-01 Richard Henderson <rth@redhat.com>
* optabs.c (expand_unop): Use word_mode for outmode of bit scaners.
* libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change
return type to Wtype.
* libgcc-std.ver (GCC_3.4): Fix inheritance.
* config/i386/i386.md (ffssi2): Use nonimmediate_operand for
expander input constraint.
2003-02-01 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
* optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and
OTI_parity.
(clz_optab, ctz_optab, popcount_optab, parity_optab): New.
* optabs.c (widen_clz, expand_parity): New.
(expand_unop): Handle clz and parity. Hardcode SImode as outmode
for libcalls to clz, ctz, popcount, and parity.
(init_optabs): Init clz_optab, ctz_optab, popcount_optab and
parity_optab, and set up libfunc handlers.
* libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2,
__popcountsi2, __popcountdi2, __paritysi2 __paritydi2,
__popcount_tab): New.
* libgcc2.h: Declare them.
* libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c.
* genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab
and parity_optab.
* builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New.
* builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT,
BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL,
BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL,
BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL,
BUILT_IN_PARITYLL): New.
* builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs
and add optab argument.
(expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*.
* tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New.
* expr.c (expand_expr): Handle them.
* fold-const.c (tree_expr_nonnegative_p): Likewise.
* rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New.
* reload1.c (eliminate_regs): Handle them.
(elimination_effects): Likewise.
* function.c (instantiate_virtual_regs_1): Likewise
* genattrtab.c (check_attr_value): Likewise.
* simplify-rtx.c (simplify_unary_operation): Likewise.
* c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR.
* combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY.
(nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY.
* config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New.
* config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to
__builtin_arm_clz.
* Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move...
* mklibgcc.in (lib2funcs): ...here and merge. Add new members.
* doc/extend.texi (Other Builtins): Add new builtins.
* doc/md.texi (Standard Names): Add new patterns.
From-SVN: r62252
2003-02-01 11:00:02 -08:00
|
|
|
|
2000-03-16 22:14:08 +00:00
|
|
|
/* __udiv_w_sdiv is static inline when building other libgcc2 portions. */
|
|
|
|
#if (!defined(L_udivdi3) && !defined(L_divdi3) && \
|
|
|
|
!defined(L_umoddi3) && !defined(L_moddi3))
|
|
|
|
extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern word_type __cmpdi2 (DWtype, DWtype);
|
|
|
|
extern word_type __ucmpdi2 (DWtype, DWtype);
|
|
|
|
|
re PR other/18665 (-ftrapv borks up simple integer arithmetic)
PR other/18665
* libgcc-std.ver (GCC_3.4.4): Inherit from GCC_3.4.2.
Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3.
* libgcc2.c (__addvsi3): Rename to __addvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__addvdi3): Rename to __addvDI3.
(__subvsi3): Rename to __subvSI3. Use word type for the result.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__subvdi3): Rename to __subvDI3.
(_mulvsi3): Rename to _mulvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(_mulvdi3): Rename to _mulvDI3.
(__negvsi2): Rename to __negvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__negvdi2): Rename to __negvDI2.
(__absvsi2): Rename to __absvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvdi2): Rename to __absvDI2.
* libgcc2.h (64-bit targets): Define COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvSI2, __addvSI3, __subvSI3, __mulvSI3, __negvSI2, __absvDI2,
__addvDI3, __subvDI3, __mulvDI3, __negvDI2): Define to the appropriate
symbol and declare.
(__absvsi2, __addvsi3, __subvsi3, __mulvsi3, __negvsi2): Declare if
COMPAT_SIMODE_TRAPPING_ARITHMETIC.
From-SVN: r92187
2004-12-15 13:30:46 +01:00
|
|
|
extern Wtype __absvSI2 (Wtype);
|
|
|
|
extern Wtype __addvSI3 (Wtype, Wtype);
|
|
|
|
extern Wtype __subvSI3 (Wtype, Wtype);
|
|
|
|
extern Wtype __mulvSI3 (Wtype, Wtype);
|
|
|
|
extern Wtype __negvSI2 (Wtype);
|
2007-01-04 23:16:34 +00:00
|
|
|
extern SItype __bswapsi2 (SItype);
|
re PR other/18665 (-ftrapv borks up simple integer arithmetic)
PR other/18665
* libgcc-std.ver (GCC_3.4.4): Inherit from GCC_3.4.2.
Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3.
* libgcc2.c (__addvsi3): Rename to __addvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__addvdi3): Rename to __addvDI3.
(__subvsi3): Rename to __subvSI3. Use word type for the result.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__subvdi3): Rename to __subvDI3.
(_mulvsi3): Rename to _mulvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(_mulvdi3): Rename to _mulvDI3.
(__negvsi2): Rename to __negvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__negvdi2): Rename to __negvDI2.
(__absvsi2): Rename to __absvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvdi2): Rename to __absvDI2.
* libgcc2.h (64-bit targets): Define COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvSI2, __addvSI3, __subvSI3, __mulvSI3, __negvSI2, __absvDI2,
__addvDI3, __subvDI3, __mulvDI3, __negvDI2): Define to the appropriate
symbol and declare.
(__absvsi2, __addvsi3, __subvsi3, __mulvsi3, __negvsi2): Declare if
COMPAT_SIMODE_TRAPPING_ARITHMETIC.
From-SVN: r92187
2004-12-15 13:30:46 +01:00
|
|
|
extern DWtype __absvDI2 (DWtype);
|
|
|
|
extern DWtype __addvDI3 (DWtype, DWtype);
|
|
|
|
extern DWtype __subvDI3 (DWtype, DWtype);
|
|
|
|
extern DWtype __mulvDI3 (DWtype, DWtype);
|
|
|
|
extern DWtype __negvDI2 (DWtype);
|
2007-01-04 23:16:34 +00:00
|
|
|
extern DItype __bswapdi2 (DItype);
|
re PR other/18665 (-ftrapv borks up simple integer arithmetic)
PR other/18665
* libgcc-std.ver (GCC_3.4.4): Inherit from GCC_3.4.2.
Export __absvti2, __addvti3, __mulvti3, __negvti2 and __subvti3.
* libgcc2.c (__addvsi3): Rename to __addvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__addvdi3): Rename to __addvDI3.
(__subvsi3): Rename to __subvSI3. Use word type for the result.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__subvdi3): Rename to __subvDI3.
(_mulvsi3): Rename to _mulvSI3.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(_mulvdi3): Rename to _mulvDI3.
(__negvsi2): Rename to __negvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__negvdi2): Rename to __negvDI2.
(__absvsi2): Rename to __absvSI2.
New version if COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvdi2): Rename to __absvDI2.
* libgcc2.h (64-bit targets): Define COMPAT_SIMODE_TRAPPING_ARITHMETIC.
(__absvSI2, __addvSI3, __subvSI3, __mulvSI3, __negvSI2, __absvDI2,
__addvDI3, __subvDI3, __mulvDI3, __negvDI2): Define to the appropriate
symbol and declare.
(__absvsi2, __addvsi3, __subvsi3, __mulvsi3, __negvsi2): Declare if
COMPAT_SIMODE_TRAPPING_ARITHMETIC.
From-SVN: r92187
2004-12-15 13:30:46 +01:00
|
|
|
|
|
|
|
#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC
|
|
|
|
extern SItype __absvsi2 (SItype);
|
|
|
|
extern SItype __addvsi3 (SItype, SItype);
|
|
|
|
extern SItype __subvsi3 (SItype, SItype);
|
|
|
|
extern SItype __mulvsi3 (SItype, SItype);
|
|
|
|
extern SItype __negvsi2 (SItype);
|
|
|
|
#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
|
2000-10-20 23:32:10 +00:00
|
|
|
|
2005-03-30 20:59:21 +00:00
|
|
|
#undef int
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
#if LIBGCC2_HAS_SF_MODE
|
2000-03-16 22:14:08 +00:00
|
|
|
extern DWtype __fixsfdi (SFtype);
|
|
|
|
extern SFtype __floatdisf (DWtype);
|
fp-bit.c (clzusi): New function.
* config/fp-bit.c (clzusi): New function.
(si_to_float, usi_to_float): Use it to compute proper shift.
(usi_to_float): Preserve guard bits when shifting right.
* libgcc-std.ver (GCC_4.2.0): New version.
* libgcc2.c (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): New functions.
* libgcc2.h (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): Declare.
* mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf,
_floatundixf, and _floatunditf.
* optabs.c (expand_float): If target does not define a pattern for
signed or unsigned conversion, use an unsigned libcall instead of
a signed one.
(init_optabs): Initialize ufloat_optab.
testsuite:
* gcc.c-torture/execute/floatunsisf-1.c: New test.
From-SVN: r107345
2005-11-22 00:38:30 +00:00
|
|
|
extern SFtype __floatundisf (UDWtype);
|
2000-04-15 12:34:38 -04:00
|
|
|
extern UWtype __fixunssfSI (SFtype);
|
|
|
|
extern DWtype __fixunssfDI (SFtype);
|
2005-03-30 20:59:21 +00:00
|
|
|
extern SFtype __powisf2 (SFtype, int);
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
extern SCtype __divsc3 (SFtype, SFtype, SFtype, SFtype);
|
|
|
|
extern SCtype __mulsc3 (SFtype, SFtype, SFtype, SFtype);
|
libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
* libgcc2.h (LIBGCC2_HAS_SF_MODE): New macro.
(LIBGCC2_HAS_DF_MODE, LIBGCC2_HAS_TF_MODE, LIBGCC2_HAS_XF_MODE): Make
the defaults false if BITS_PER_UNIT != 8.
(SFtype, SCtype, __fixsfdi, __floatdisf, __fixunssfSI, __fixunssfDI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE rather
than BITS_PER_UNIT != 8.
(L_fixdfdi, L_fixsfdi, L_fixtfdi, L_fixunsdfdi, L_fixunsdfsi)
(L_fixunssfdi, L_fixunssfsi, L_fixunstfdi, L_fixunsxfdi, L_fixunsxfsi)
(L_fixxfdi, L_floatdidf, L_floatdisf, L_floatditf, L_floatdixf): Remove
#undefs.
* libgcc2.c (__fixunssfDI, __fixsfdi, __floatdisf, __fixunssfSI)
(__powisf2, __divsc3, __mulsc3): Guard with LIBGCC2_HAS_SF_MODE.
From-SVN: r96778
2005-03-21 07:22:22 +00:00
|
|
|
#endif
|
2005-02-25 21:34:49 +00:00
|
|
|
#if LIBGCC2_HAS_DF_MODE
|
re PR middle-end/19920 (build broken on several targets due to recent 'DC' type update to libgcc2)
PR 19920
* libgcc2.c (WORD_SIZE): Remove all definitions; replace uses
with W_TYPE_SIZE.
(HIGH_WORD_COEFF, HIGH_HALFWORD_COEFF): Remove all definitions;
replace uses with Wtype_MAXp1_F.
(L_fixunstfdi, L_fixtfdi, L_floatditf, L_fixunsxfdi, L_fixxfdi,
L_floatdixf, L_fixunsxfsi, L_fixunsdfdi, L_floatdidf, L_fixunsdfsi,
L_powidf2, L_powixf2, L_powitf2, L_muldc3, L_divdc3, L_mulxc3,
L_divxc3, L_multc3, L_divtc3): Protect with HAVE_DFMODE, HAVE_XFMODE,
and HAVE_TFMODE as appropriate.
(__fixunssfDI): Provide an implementation that doesn't need DFmode.
(__floatdisf): Likewise.
* libgcc2.h (LIBGCC2_DOUBLE_TYPE_SIZE): New.
(HAVE_DFMODE, HAVE_XFMODE, HAVE_TFMODE): New.
(Wtype_MAXp1_F): New.
(DFtype, DCtype, __fixdfdi, __floatdidf, __fixunsdfSI, __fixunsdfDI,
__powidf2, __divdc3, __muldc3): Protect with HAVE_DFMODE.
From-SVN: r95121
2005-02-16 14:55:33 -08:00
|
|
|
extern DWtype __fixdfdi (DFtype);
|
|
|
|
extern DFtype __floatdidf (DWtype);
|
fp-bit.c (clzusi): New function.
* config/fp-bit.c (clzusi): New function.
(si_to_float, usi_to_float): Use it to compute proper shift.
(usi_to_float): Preserve guard bits when shifting right.
* libgcc-std.ver (GCC_4.2.0): New version.
* libgcc2.c (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): New functions.
* libgcc2.h (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): Declare.
* mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf,
_floatundixf, and _floatunditf.
* optabs.c (expand_float): If target does not define a pattern for
signed or unsigned conversion, use an unsigned libcall instead of
a signed one.
(init_optabs): Initialize ufloat_optab.
testsuite:
* gcc.c-torture/execute/floatunsisf-1.c: New test.
From-SVN: r107345
2005-11-22 00:38:30 +00:00
|
|
|
extern DFtype __floatundidf (UDWtype);
|
re PR middle-end/19920 (build broken on several targets due to recent 'DC' type update to libgcc2)
PR 19920
* libgcc2.c (WORD_SIZE): Remove all definitions; replace uses
with W_TYPE_SIZE.
(HIGH_WORD_COEFF, HIGH_HALFWORD_COEFF): Remove all definitions;
replace uses with Wtype_MAXp1_F.
(L_fixunstfdi, L_fixtfdi, L_floatditf, L_fixunsxfdi, L_fixxfdi,
L_floatdixf, L_fixunsxfsi, L_fixunsdfdi, L_floatdidf, L_fixunsdfsi,
L_powidf2, L_powixf2, L_powitf2, L_muldc3, L_divdc3, L_mulxc3,
L_divxc3, L_multc3, L_divtc3): Protect with HAVE_DFMODE, HAVE_XFMODE,
and HAVE_TFMODE as appropriate.
(__fixunssfDI): Provide an implementation that doesn't need DFmode.
(__floatdisf): Likewise.
* libgcc2.h (LIBGCC2_DOUBLE_TYPE_SIZE): New.
(HAVE_DFMODE, HAVE_XFMODE, HAVE_TFMODE): New.
(Wtype_MAXp1_F): New.
(DFtype, DCtype, __fixdfdi, __floatdidf, __fixunsdfSI, __fixunsdfDI,
__powidf2, __divdc3, __muldc3): Protect with HAVE_DFMODE.
From-SVN: r95121
2005-02-16 14:55:33 -08:00
|
|
|
extern UWtype __fixunsdfSI (DFtype);
|
|
|
|
extern DWtype __fixunsdfDI (DFtype);
|
2005-03-30 20:59:21 +00:00
|
|
|
extern DFtype __powidf2 (DFtype, int);
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
extern DCtype __divdc3 (DFtype, DFtype, DFtype, DFtype);
|
|
|
|
extern DCtype __muldc3 (DFtype, DFtype, DFtype, DFtype);
|
re PR middle-end/19920 (build broken on several targets due to recent 'DC' type update to libgcc2)
PR 19920
* libgcc2.c (WORD_SIZE): Remove all definitions; replace uses
with W_TYPE_SIZE.
(HIGH_WORD_COEFF, HIGH_HALFWORD_COEFF): Remove all definitions;
replace uses with Wtype_MAXp1_F.
(L_fixunstfdi, L_fixtfdi, L_floatditf, L_fixunsxfdi, L_fixxfdi,
L_floatdixf, L_fixunsxfsi, L_fixunsdfdi, L_floatdidf, L_fixunsdfsi,
L_powidf2, L_powixf2, L_powitf2, L_muldc3, L_divdc3, L_mulxc3,
L_divxc3, L_multc3, L_divtc3): Protect with HAVE_DFMODE, HAVE_XFMODE,
and HAVE_TFMODE as appropriate.
(__fixunssfDI): Provide an implementation that doesn't need DFmode.
(__floatdisf): Likewise.
* libgcc2.h (LIBGCC2_DOUBLE_TYPE_SIZE): New.
(HAVE_DFMODE, HAVE_XFMODE, HAVE_TFMODE): New.
(Wtype_MAXp1_F): New.
(DFtype, DCtype, __fixdfdi, __floatdidf, __fixunsdfSI, __fixunsdfDI,
__powidf2, __divdc3, __muldc3): Protect with HAVE_DFMODE.
From-SVN: r95121
2005-02-16 14:55:33 -08:00
|
|
|
#endif
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
|
2005-02-25 21:34:49 +00:00
|
|
|
#if LIBGCC2_HAS_XF_MODE
|
2000-03-16 22:14:08 +00:00
|
|
|
extern DWtype __fixxfdi (XFtype);
|
2000-04-15 12:34:38 -04:00
|
|
|
extern DWtype __fixunsxfDI (XFtype);
|
2000-03-16 22:14:08 +00:00
|
|
|
extern XFtype __floatdixf (DWtype);
|
fp-bit.c (clzusi): New function.
* config/fp-bit.c (clzusi): New function.
(si_to_float, usi_to_float): Use it to compute proper shift.
(usi_to_float): Preserve guard bits when shifting right.
* libgcc-std.ver (GCC_4.2.0): New version.
* libgcc2.c (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): New functions.
* libgcc2.h (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): Declare.
* mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf,
_floatundixf, and _floatunditf.
* optabs.c (expand_float): If target does not define a pattern for
signed or unsigned conversion, use an unsigned libcall instead of
a signed one.
(init_optabs): Initialize ufloat_optab.
testsuite:
* gcc.c-torture/execute/floatunsisf-1.c: New test.
From-SVN: r107345
2005-11-22 00:38:30 +00:00
|
|
|
extern XFtype __floatundixf (UDWtype);
|
2000-04-15 12:34:38 -04:00
|
|
|
extern UWtype __fixunsxfSI (XFtype);
|
2005-03-30 20:59:21 +00:00
|
|
|
extern XFtype __powixf2 (XFtype, int);
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
extern XCtype __divxc3 (XFtype, XFtype, XFtype, XFtype);
|
|
|
|
extern XCtype __mulxc3 (XFtype, XFtype, XFtype, XFtype);
|
2000-03-16 22:14:08 +00:00
|
|
|
#endif
|
|
|
|
|
2005-02-25 21:34:49 +00:00
|
|
|
#if LIBGCC2_HAS_TF_MODE
|
2000-04-15 12:34:38 -04:00
|
|
|
extern DWtype __fixunstfDI (TFtype);
|
2000-03-16 22:14:08 +00:00
|
|
|
extern DWtype __fixtfdi (TFtype);
|
|
|
|
extern TFtype __floatditf (DWtype);
|
fp-bit.c (clzusi): New function.
* config/fp-bit.c (clzusi): New function.
(si_to_float, usi_to_float): Use it to compute proper shift.
(usi_to_float): Preserve guard bits when shifting right.
* libgcc-std.ver (GCC_4.2.0): New version.
* libgcc2.c (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): New functions.
* libgcc2.h (__floatundixf, __floatunditf, __floatundidf,
__floatundisf): Declare.
* mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf,
_floatundixf, and _floatunditf.
* optabs.c (expand_float): If target does not define a pattern for
signed or unsigned conversion, use an unsigned libcall instead of
a signed one.
(init_optabs): Initialize ufloat_optab.
testsuite:
* gcc.c-torture/execute/floatunsisf-1.c: New test.
From-SVN: r107345
2005-11-22 00:38:30 +00:00
|
|
|
extern TFtype __floatunditf (UDWtype);
|
2005-03-30 20:59:21 +00:00
|
|
|
extern TFtype __powitf2 (TFtype, int);
|
tree-complex.c (expand_complex_libcall): New.
* tree-complex.c (expand_complex_libcall): New.
(expand_complex_multiplication): Use it for c99 compliance.
(expand_complex_division): Likewise.
* fold-const.c (fold_complex_add, fold_complex_mult): New.
(fold): Call them.
* builtins.c (built_in_names): Remove const.
* tree.c (build_common_builtin_nodes): Build complex arithmetic
builtins.
* tree.h (BUILT_IN_COMPLEX_MUL_MIN, BUILT_IN_COMPLEX_MUL_MAX): New.
(BUILT_IN_COMPLEX_DIV_MIN, BUILT_IN_COMPLEX_DIV_MAX): New.
(built_in_names): Remove const.
* c-common.c (c_common_type_for_mode): Handle complex modes.
* flags.h, toplev.c (flag_complex_method): Rename from
flag_complex_divide_method.
* libgcc2.c (__divsc3, __divdc3, __divxc3, __divtc3,
__mulsc3, __muldc3, __mulxc3, __multc3): New.
* libgcc2.h: Declare them.
* libgcc-std.ver: Export them.
* mklibgcc.in (lib2funcs): Build them.
From-SVN: r94909
2005-02-11 16:26:57 -08:00
|
|
|
extern TCtype __divtc3 (TFtype, TFtype, TFtype, TFtype);
|
|
|
|
extern TCtype __multc3 (TFtype, TFtype, TFtype, TFtype);
|
2000-03-16 22:14:08 +00:00
|
|
|
#endif
|
2005-03-30 20:59:21 +00:00
|
|
|
#define int bogus_type
|
2000-03-16 22:14:08 +00:00
|
|
|
|
2000-03-09 03:39:09 +00:00
|
|
|
/* DWstructs are pairs of Wtype values in the order determined by
|
|
|
|
LIBGCC2_WORDS_BIG_ENDIAN. */
|
|
|
|
|
|
|
|
#if LIBGCC2_WORDS_BIG_ENDIAN
|
|
|
|
struct DWstruct {Wtype high, low;};
|
|
|
|
#else
|
|
|
|
struct DWstruct {Wtype low, high;};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* We need this union to unpack/pack DImode values, since we don't have
|
|
|
|
any arithmetic yet. Incoming DImode parameters are stored into the
|
|
|
|
`ll' field, and the unpacked result is read from the struct `s'. */
|
|
|
|
|
|
|
|
typedef union
|
|
|
|
{
|
|
|
|
struct DWstruct s;
|
|
|
|
DWtype ll;
|
|
|
|
} DWunion;
|
|
|
|
|
2005-09-09 08:39:18 +00:00
|
|
|
/* Defined for L_popcount_tab. Exported here because some targets may
|
|
|
|
want to use it for their own versions of the __popcount builtins. */
|
|
|
|
extern const UQItype __popcount_tab[256];
|
|
|
|
|
|
|
|
/* Defined for L_clz. Exported here because some targets may want to use
|
|
|
|
it for their own versions of the __clz builtins. It contains the bit
|
|
|
|
position of the first set bit for the numbers 0 - 255. This avoids the
|
cfgcleanup.c, [...]: Fix comment typos.
* cfgcleanup.c, cfgexpand.c, cgraphunit.c, config/arm/arm.c,
config/fr30/fr30.md, config/i386/i386-interix.h,
config/i386/i386.c, config/i386/i386.md, config/sh/superh.h,
config/sh/superh64.h, config/v850/v850.c, df-core.c,
df-problems.c, df.h, except.c, final.c, haifa-sched.c,
lambda-code.c, libgcc2.h, omp-low.c, optabs.c, predict.c,
reload.c, tree-flow.h, tree-outof-ssa.c, tree-ssa-dce.c,
tree-ssa-pre.c, tree-vect-transform.c: Fix comment typos.
Follow spelling conventions.
* doc/invoke.texi, doc/rtl.texi, doc/tm.texi: Fix typos.
Follow spelling conventions.
From-SVN: r114168
2006-05-28 17:46:46 +00:00
|
|
|
need for a separate table for the __ctz builtins. */
|
2005-09-09 08:39:18 +00:00
|
|
|
extern const UQItype __clz_tab[256];
|
|
|
|
|
2000-03-09 03:39:09 +00:00
|
|
|
#include "longlong.h"
|
|
|
|
|
2004-08-03 16:57:40 +00:00
|
|
|
#undef int
|
|
|
|
extern int __clzDI2 (UDWtype);
|
|
|
|
extern int __clzSI2 (UWtype);
|
|
|
|
extern int __ctzSI2 (UWtype);
|
|
|
|
extern int __ffsSI2 (UWtype);
|
|
|
|
extern int __ffsDI2 (DWtype);
|
|
|
|
extern int __ctzDI2 (UDWtype);
|
|
|
|
extern int __popcountSI2 (UWtype);
|
|
|
|
extern int __popcountDI2 (UDWtype);
|
|
|
|
extern int __paritySI2 (UWtype);
|
|
|
|
extern int __parityDI2 (UDWtype);
|
|
|
|
#define int bogus_type
|
|
|
|
|
|
|
|
extern void __enable_execute_stack (void *);
|
|
|
|
|
2004-11-30 08:15:42 +00:00
|
|
|
#ifndef HIDE_EXPORTS
|
2004-08-03 16:57:40 +00:00
|
|
|
#pragma GCC visibility pop
|
2004-11-30 08:15:42 +00:00
|
|
|
#endif
|
2004-08-03 16:57:40 +00:00
|
|
|
|
2001-05-25 18:31:47 -07:00
|
|
|
#endif /* ! GCC_LIBGCC2_H */
|