2000-03-09 04:39:09 +01:00
|
|
|
/* Header file for libgcc2.c. */
|
2001-01-31 04:53:32 +01:00
|
|
|
/* Copyright (C) 2000, 2001
|
2000-03-09 04:39:09 +01: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 16:35:51 +02:00
|
|
|
This file is part of GCC.
|
2000-03-09 04:39:09 +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-09 04:39:09 +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-09 04:39:09 +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-09 04:39:09 +01:00
|
|
|
|
2003-04-22 19:21:04 +02: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-26 03:31:47 +02:00
|
|
|
#ifndef GCC_LIBGCC2_H
|
|
|
|
#define GCC_LIBGCC2_H
|
2000-03-09 04:39:09 +01:00
|
|
|
|
|
|
|
extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
|
|
|
|
extern void __clear_cache (char *, char *);
|
2001-05-14 04:46:22 +02:00
|
|
|
extern void __eprintf (const char *, const char *, unsigned int, const char *)
|
|
|
|
__attribute__ ((__noreturn__));
|
2000-03-09 04:39:09 +01:00
|
|
|
|
|
|
|
struct exception_descriptor;
|
|
|
|
extern short int __get_eh_table_language (struct exception_descriptor *);
|
|
|
|
extern short int __get_eh_table_version (struct exception_descriptor *);
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
|
|
|
|
#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
|
|
|
|
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
|
|
|
|
#endif
|
|
|
|
|
2000-03-27 13:43:01 +02:00
|
|
|
#ifndef MIN_UNITS_PER_WORD
|
|
|
|
#define MIN_UNITS_PER_WORD UNITS_PER_WORD
|
|
|
|
#endif
|
|
|
|
|
2000-03-09 04:39:09 +01: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 13:03:26 +02:00
|
|
|
#if MIN_UNITS_PER_WORD > 1
|
2003-12-21 15:08:35 +01:00
|
|
|
/* These typedefs are usually forbidden on dsp's with UNITS_PER_WORD 1. */
|
2000-03-09 04:39:09 +01: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 15:08:35 +01:00
|
|
|
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2. */
|
2000-03-09 04:39:09 +01:00
|
|
|
typedef int DItype __attribute__ ((mode (DI)));
|
|
|
|
typedef unsigned int UDItype __attribute__ ((mode (DI)));
|
2000-04-15 18:34:38 +02:00
|
|
|
#if MIN_UNITS_PER_WORD > 4
|
2003-12-21 15:08:35 +01:00
|
|
|
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4. */
|
2000-04-15 18:34:38 +02:00
|
|
|
typedef int TItype __attribute__ ((mode (TI)));
|
|
|
|
typedef unsigned int UTItype __attribute__ ((mode (TI)));
|
|
|
|
#endif
|
2000-03-09 04:39:09 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BITS_PER_UNIT == 8
|
|
|
|
|
|
|
|
typedef float SFtype __attribute__ ((mode (SF)));
|
|
|
|
typedef float DFtype __attribute__ ((mode (DF)));
|
|
|
|
|
|
|
|
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
|
|
|
|
typedef float XFtype __attribute__ ((mode (XF)));
|
|
|
|
#endif
|
|
|
|
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
|
|
|
|
typedef float TFtype __attribute__ ((mode (TF)));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else /* BITS_PER_UNIT != 8 */
|
|
|
|
|
|
|
|
/* On dsp's there are usually qf/hf/tqf modes used instead of the above.
|
|
|
|
For now we don't support them in libgcc2.c. */
|
|
|
|
|
|
|
|
#undef L_fixdfdi
|
|
|
|
#undef L_fixsfdi
|
|
|
|
#undef L_fixtfdi
|
|
|
|
#undef L_fixunsdfdi
|
|
|
|
#undef L_fixunsdfsi
|
|
|
|
#undef L_fixunssfdi
|
|
|
|
#undef L_fixunssfsi
|
|
|
|
#undef L_fixunstfdi
|
|
|
|
#undef L_fixunsxfdi
|
|
|
|
#undef L_fixunsxfsi
|
|
|
|
#undef L_fixxfdi
|
|
|
|
#undef L_floatdidf
|
|
|
|
#undef L_floatdisf
|
|
|
|
#undef L_floatditf
|
|
|
|
#undef L_floatdixf
|
|
|
|
|
|
|
|
#endif /* BITS_PER_UNIT != 8 */
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2000-04-15 18:34:38 +02:00
|
|
|
#if MIN_UNITS_PER_WORD > 4
|
|
|
|
#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
|
2001-01-07 21:54:35 +01:00
|
|
|
#elif MIN_UNITS_PER_WORD > 2 \
|
|
|
|
|| (MIN_UNITS_PER_WORD > 1 && LONG_LONG_TYPE_SIZE > 32)
|
2000-03-09 04:39:09 +01: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
|
2000-03-27 13:03:26 +02:00
|
|
|
#elif MIN_UNITS_PER_WORD > 1
|
2000-03-09 04:39:09 +01: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 04:53:32 +01:00
|
|
|
#define Wtype_MAX ((Wtype)(((UWtype)1 << (W_TYPE_SIZE - 1)) - 1))
|
|
|
|
#define Wtype_MIN (- Wtype_MAX - 1)
|
|
|
|
|
2000-04-15 18:34:38 +02: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)
|
|
|
|
#define __fixunsxfSI __NW(fixunsxf,)
|
|
|
|
#define __fixunstfSI __NW(fixunstf,)
|
|
|
|
#define __fixunsdfSI __NW(fixunsdf,)
|
|
|
|
#define __fixunssfSI __NW(fixunssf,)
|
|
|
|
|
2003-02-05 01:52:24 +01: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 19:35:22 +01:00
|
|
|
#define __clzSI2 __NW(clz,2)
|
|
|
|
#define __ctzSI2 __NW(ctz,2)
|
|
|
|
#define __popcountSI2 __NW(popcount,2)
|
|
|
|
#define __paritySI2 __NW(parity,2)
|
2003-02-05 01:52:24 +01: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 19:35:22 +01:00
|
|
|
#define __clzDI2 __NDW(clz,2)
|
|
|
|
#define __ctzDI2 __NDW(ctz,2)
|
|
|
|
#define __popcountDI2 __NDW(popcount,2)
|
|
|
|
#define __parityDI2 __NDW(parity,2)
|
2003-02-05 01:52:24 +01:00
|
|
|
|
2000-03-16 23:14:08 +01: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 18:34:38 +02:00
|
|
|
|
2000-03-16 23:14:08 +01: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 20:00:02 +01:00
|
|
|
|
2000-03-16 23:14:08 +01: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);
|
|
|
|
|
2000-12-16 23:43:58 +01:00
|
|
|
extern Wtype __absvsi2 (Wtype);
|
|
|
|
extern DWtype __absvdi2 (DWtype);
|
|
|
|
extern Wtype __addvsi3 (Wtype, Wtype);
|
|
|
|
extern DWtype __addvdi3 (DWtype, DWtype);
|
|
|
|
extern Wtype __subvsi3 (Wtype, Wtype);
|
|
|
|
extern DWtype __subvdi3 (DWtype, DWtype);
|
|
|
|
extern Wtype __mulvsi3 (Wtype, Wtype);
|
|
|
|
extern DWtype __mulvdi3 (DWtype, DWtype);
|
|
|
|
extern Wtype __negvsi2 (Wtype);
|
|
|
|
extern DWtype __negvdi2 (DWtype);
|
2000-10-21 01:32:10 +02:00
|
|
|
|
2000-03-16 23:14:08 +01:00
|
|
|
#if BITS_PER_UNIT == 8
|
|
|
|
extern DWtype __fixdfdi (DFtype);
|
|
|
|
extern DWtype __fixsfdi (SFtype);
|
|
|
|
extern DFtype __floatdidf (DWtype);
|
|
|
|
extern SFtype __floatdisf (DWtype);
|
2000-04-15 18:34:38 +02:00
|
|
|
extern UWtype __fixunsdfSI (DFtype);
|
|
|
|
extern UWtype __fixunssfSI (SFtype);
|
|
|
|
extern DWtype __fixunsdfDI (DFtype);
|
|
|
|
extern DWtype __fixunssfDI (SFtype);
|
2000-03-16 23:14:08 +01:00
|
|
|
|
|
|
|
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
|
|
|
|
extern DWtype __fixxfdi (XFtype);
|
2000-04-15 18:34:38 +02:00
|
|
|
extern DWtype __fixunsxfDI (XFtype);
|
2000-03-16 23:14:08 +01:00
|
|
|
extern XFtype __floatdixf (DWtype);
|
2000-04-15 18:34:38 +02:00
|
|
|
extern UWtype __fixunsxfSI (XFtype);
|
2000-03-16 23:14:08 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
|
2000-04-15 18:34:38 +02:00
|
|
|
extern DWtype __fixunstfDI (TFtype);
|
2000-03-16 23:14:08 +01:00
|
|
|
extern DWtype __fixtfdi (TFtype);
|
|
|
|
extern TFtype __floatditf (DWtype);
|
|
|
|
#endif
|
|
|
|
#endif /* BITS_PER_UNIT == 8 */
|
|
|
|
|
2000-03-09 04:39:09 +01: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;
|
|
|
|
|
|
|
|
#include "longlong.h"
|
|
|
|
|
2001-05-26 03:31:47 +02:00
|
|
|
#endif /* ! GCC_LIBGCC2_H */
|