gcc/gcc/machmode.def

262 lines
9.5 KiB
Modula-2
Raw Permalink Normal View History

1991-05-31 22:43:32 +02:00
/* This file contains the definitions and documentation for the
1998-05-06 23:09:07 +02:00
machine modes used in the GNU compiler.
Copyright (C) 1987-2017 Free Software Foundation, Inc.
1991-05-31 22:43:32 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
This file is part of GCC.
1991-05-31 22:43:32 +02: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 3, or (at your option) any later
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
version.
1991-05-31 22:43:32 +02: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.
1991-05-31 22:43:32 +02:00
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
1991-05-31 22:43:32 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-22 16:35:51 +02:00
/* This file defines all the MACHINE MODES used by GCC.
1991-05-31 22:43:32 +02:00
A machine mode specifies a size and format of data
at the machine level.
Each RTL expression has a machine mode.
At the syntax tree level, each ..._TYPE and each ..._DECL node
has a machine mode which describes data of that type or the
data of the variable declared. */
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
/* This file is included by the genmodes program. Its text is the
body of a function. Do not rely on this, it will change in the
future.
The following statements can be used in this file -- all have
the form of a C macro call. In their arguments:
A CLASS argument must be one of the constants defined in
mode-classes.def, less the leading MODE_ prefix; some statements
that take CLASS arguments have restrictions on which classes are
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
acceptable. For instance, INT.
A MODE argument must be the printable name of a machine mode,
without quotation marks or trailing "mode". For instance, SI.
A PRECISION, BYTESIZE, or COUNT argument must be a positive integer
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
constant.
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
A FORMAT argument must be one of the real_mode_format structures
declared in real.h, or else a literal 0. Do not put a leading &
on the argument.
An EXPR argument must be a syntactically valid C expression.
If an EXPR contains commas, you may need to write an extra pair of
parentheses around it, so it appears to be a single argument to the
statement.
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
This file defines only those modes which are of use on almost all
machines. Other modes can be defined in the target-specific
mode definition file, config/ARCH/ARCH-modes.def.
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
Order matters in this file in so far as statements which refer to
other modes must appear after the modes they refer to. However,
statements which do not refer to other modes may appear in any
order.
RANDOM_MODE (MODE);
declares MODE to be of class RANDOM.
CC_MODE (MODE);
declares MODE to be of class CC.
INT_MODE (MODE, BYTESIZE);
declares MODE to be of class INT and BYTESIZE bytes wide.
All of the bits of its representation are significant.
FRACTIONAL_INT_MODE (MODE, PRECISION, BYTESIZE);
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
declares MODE to be of class INT, BYTESIZE bytes wide in
storage, but with only PRECISION significant bits.
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
FLOAT_MODE (MODE, BYTESIZE, FORMAT);
declares MODE to be of class FLOAT and BYTESIZE bytes wide,
using floating point format FORMAT.
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
All of the bits of its representation are significant.
FRACTIONAL_FLOAT_MODE (MODE, PRECISION, BYTESIZE, FORMAT);
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
declares MODE to be of class FLOAT, BYTESIZE bytes wide in
storage, but with only PRECISION significant bits, using
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
floating point format FORMAT.
DECIMAL_FLOAT_MODE (MODE, BYTESIZE, FORMAT);
declares MODE to be of class DECIMAL_FLOAT and BYTESIZE bytes
wide. All of the bits of its representation are significant.
FRACTIONAL_DECIMAL_FLOAT_MODE (MODE, BYTESIZE, FORMAT);
declares MODE to be of class DECIMAL_FLOAT and BYTESIZE bytes
wide. All of the bits of its representation are significant.
rtl.texi (Machine Modes): Document QQ... * doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes. Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. Document GET_MODE_IBIT, and GET_MODE_FBIT. * machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P, SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P, SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P, ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P, ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P, SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P, ALL_FIXED_POINT_MODE_P): New define. (CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (GET_MODE_IBIT, GET_MODE_FBIT): New define. * mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM): New mode classes. * machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT. Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTA. * genmodes.c (struct mode_data): Add ibit and fbit fields. (blank_mode): Initialize ibit and fbit. (adj_ibit, adj_fbit): New to adjust ibit and fbit. (vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (new_adjust): Change required_class to required_class_from and required_class_to for testing within a range. (complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define. (make_fixed_point_mode): New. (_ADD_ADJUST): Change C to C1 and C2. (ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to use a range for machine classes. (ADJUST_IBIT, ADJUST_FBIT): New. (emit_insn_modes_h): Output defines of CONST_MODE_IBIT and CONST_MODE_FBIT. (emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. Emit adjustment for ibit and fbit. (emit_mode_ibit, emit_mode_fbit): New. (emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit. From-SVN: r126007
2007-06-26 00:51:27 +02:00
FRACT_MODE (MODE, BYTESIZE, FBIT);
declares MODE to be of class FRACT and BYTESIZE bytes wide
with FBIT fractional bits. There may be padding bits.
UFRACT_MODE (MODE, BYTESIZE, FBIT);
declares MODE to be of class UFRACT and BYTESIZE bytes wide
with FBIT fractional bits. There may be padding bits.
ACCUM_MODE (MODE, BYTESIZE, IBIT, FBIT);
declares MODE to be of class ACCUM and BYTESIZE bytes wide
with IBIT integral bits and FBIT fractional bits.
There may be padding bits.
UACCUM_MODE (MODE, BYTESIZE, IBIT, FBIT);
rtl.texi (Machine Modes): Document QQ... * doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes. Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. Document GET_MODE_IBIT, and GET_MODE_FBIT. * machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P, SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P, SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P, ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P, ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P, SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P, ALL_FIXED_POINT_MODE_P): New define. (CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (GET_MODE_IBIT, GET_MODE_FBIT): New define. * mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM): New mode classes. * machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT. Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTA. * genmodes.c (struct mode_data): Add ibit and fbit fields. (blank_mode): Initialize ibit and fbit. (adj_ibit, adj_fbit): New to adjust ibit and fbit. (vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (new_adjust): Change required_class to required_class_from and required_class_to for testing within a range. (complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define. (make_fixed_point_mode): New. (_ADD_ADJUST): Change C to C1 and C2. (ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to use a range for machine classes. (ADJUST_IBIT, ADJUST_FBIT): New. (emit_insn_modes_h): Output defines of CONST_MODE_IBIT and CONST_MODE_FBIT. (emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. Emit adjustment for ibit and fbit. (emit_mode_ibit, emit_mode_fbit): New. (emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit. From-SVN: r126007
2007-06-26 00:51:27 +02:00
declares MODE to be of class UACCUM and BYTESIZE bytes wide
with IBIT integral bits and FBIT fractional bits.
There may be padding bits.
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
RESET_FLOAT_FORMAT (MODE, FORMAT);
changes the format of MODE, which must be class FLOAT,
to FORMAT. Use in an ARCH-modes.def to reset the format
of one of the float modes defined in this file.
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
PARTIAL_INT_MODE (MODE, PRECISION, NAME);
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
declares a mode of class PARTIAL_INT with the same size as
MODE (which must be an INT mode) and precision PREC.
Optionally, NAME is the new name of the mode. NAME is the
name of the mode.
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
VECTOR_MODE (CLASS, MODE, COUNT);
Declare a vector mode whose component mode is MODE (of class
CLASS) with COUNT components. CLASS must be INT or FLOAT.
The name of the vector mode takes the form VnX where n is
COUNT in decimal and X is MODE.
VECTOR_MODES (CLASS, WIDTH);
For all modes presently declared in class CLASS, construct
corresponding vector modes having width WIDTH. Modes whose
byte sizes do not evenly divide WIDTH are ignored, as are
modes that would produce vector modes with only one component,
and modes smaller than one byte (if CLASS is INT) or smaller
than two bytes (if CLASS is FLOAT). CLASS must be INT or
FLOAT. The names follow the same rule as VECTOR_MODE uses.
COMPLEX_MODES (CLASS);
For all modes presently declared in class CLASS, construct
corresponding complex modes. Modes smaller than one byte
are ignored. For FLOAT modes, the names are derived by
replacing the 'F' in the mode name with a 'C'. (It is an
error if there is no 'F'. For INT modes, the names are
derived by prefixing a C to the name.
ADJUST_BYTESIZE (MODE, EXPR);
ADJUST_ALIGNMENT (MODE, EXPR);
ADJUST_FLOAT_FORMAT (MODE, EXPR);
rtl.texi (Machine Modes): Document QQ... * doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes. Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. Document GET_MODE_IBIT, and GET_MODE_FBIT. * machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P, SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P, SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P, ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P, ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P, SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P, ALL_FIXED_POINT_MODE_P): New define. (CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (GET_MODE_IBIT, GET_MODE_FBIT): New define. * mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM): New mode classes. * machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT. Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTA. * genmodes.c (struct mode_data): Add ibit and fbit fields. (blank_mode): Initialize ibit and fbit. (adj_ibit, adj_fbit): New to adjust ibit and fbit. (vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (new_adjust): Change required_class to required_class_from and required_class_to for testing within a range. (complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define. (make_fixed_point_mode): New. (_ADD_ADJUST): Change C to C1 and C2. (ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to use a range for machine classes. (ADJUST_IBIT, ADJUST_FBIT): New. (emit_insn_modes_h): Output defines of CONST_MODE_IBIT and CONST_MODE_FBIT. (emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. Emit adjustment for ibit and fbit. (emit_mode_ibit, emit_mode_fbit): New. (emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit. From-SVN: r126007
2007-06-26 00:51:27 +02:00
ADJUST_IBIT (MODE, EXPR);
ADJUST_FBIT (MODE, EXPR);
Arrange for the byte size, alignment, floating point format, ibit,
or fbit of MODE to be adjustable at run time. EXPR will be executed
once after processing all command line options, and should
rtl.texi (Machine Modes): Document QQ... * doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes. Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. Document GET_MODE_IBIT, and GET_MODE_FBIT. * machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P, SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P, SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P, ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P, ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P, SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P, ALL_FIXED_POINT_MODE_P): New define. (CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (GET_MODE_IBIT, GET_MODE_FBIT): New define. * mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM): New mode classes. * machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT. Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTA. * genmodes.c (struct mode_data): Add ibit and fbit fields. (blank_mode): Initialize ibit and fbit. (adj_ibit, adj_fbit): New to adjust ibit and fbit. (vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (new_adjust): Change required_class to required_class_from and required_class_to for testing within a range. (complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define. (make_fixed_point_mode): New. (_ADD_ADJUST): Change C to C1 and C2. (ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to use a range for machine classes. (ADJUST_IBIT, ADJUST_FBIT): New. (emit_insn_modes_h): Output defines of CONST_MODE_IBIT and CONST_MODE_FBIT. (emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. Emit adjustment for ibit and fbit. (emit_mode_ibit, emit_mode_fbit): New. (emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit. From-SVN: r126007
2007-06-26 00:51:27 +02:00
evaluate to the desired byte size, alignment, format, ibit or fbit.
Unlike a FORMAT argument, if you are adjusting a float format
you must put an & in front of the name of each format structure.
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
Note: If a mode is ever made which is more than 255 bytes wide,
machmode.h and genmodes.c will have to be changed to allocate
more space for the mode_size and mode_alignment arrays. */
1991-05-31 22:43:32 +02:00
/* VOIDmode is used when no mode needs to be specified,
as for example on CONST_INT RTL expressions. */
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
RANDOM_MODE (VOID);
/* BLKmode is used for structures, arrays, etc.
that fit no more specific mode. */
RANDOM_MODE (BLK);
/* Single bit mode used for booleans. */
FRACTIONAL_INT_MODE (BI, 1, 1);
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
/* Basic integer modes. We go up to TI in generic code (128 bits).
TImode is needed here because the some front ends now genericly
support __int128. If the front ends decide to generically support
larger types, then corresponding modes must be added here. The
name OI is reserved for a 256-bit type (needed by some back ends).
*/
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
INT_MODE (QI, 1);
INT_MODE (HI, 2);
INT_MODE (SI, 4);
INT_MODE (DI, 8);
INT_MODE (TI, 16);
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
/* No partial integer modes are defined by default. */
machmode.h (int_n_data_t): New. * machmode.h (int_n_data_t): New. (int_n_enabled_p): New. (int_n_data): New. * tree.c (int_n_enabled_p): New. (int_n_trees): New. (make_or_reuse_type): Check for all __intN types, not just __int128. (build_common_tree_nodes): Likewise. Also fill in integer_typs[] entries. * tree.h (int128_integer_type_node): Remove. (int128_unsigned_type_node): Remove. (int_n_trees_t): New. (int_n_enabled_p): New. (int_n_trees): New. * toplev.c (standard_type_bitsize): New. (do_compile): Check which __intN types are enabled for the current run. * builtin-types.def (BT_INT128): Remove. (BT_UINT128): Remove. * machmode.def: Add macro to create __int128 for all targets. * stor-layout.c (mode_for_size): Support __intN types. (smallest_mode_for_size): Likewise. (initialize_sizetypes): Support __intN types. * genmodes.c (struct mode_data): Add int_n field. (blank_mode): Likewise. (INT_N): New. (make_int_n): New. (emit_insn_modes_h): Count __intN entries and define NUM_INT_N_ENTS. (emit_mode_int_n): New. (emit_insn_modes_c): Call it. * gimple.c (gimple_signed_or_unsigned_type): Check for all __intN types, not just __int128. * tree-core.h (integer_type_kind): Remove __int128-specific entries, reserve spots for __intN entries. libstdc++-v3/ * src/c++11/limits.cc: Add support for __intN types. * include/std/type_traits: Likewise. * include/std/limits: Likewise. * include/c_std/cstdlib: Likewise. * include/bits/cpp_type_traits.h: Likewise. * include/c_global/cstdlib: Likewise. c-family/ * c-pretty-print.c (pp_c_integer_constant): Check for all __intN types, not just __int128. * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN types, not just __int128. (cpp_atomic_builtins): Round pointer sizes up. (type_suffix): Use type precision, not specific types. * c-common.c (c_common_reswords): Remove __int128 special case. (c_common_type_for_size): Check for all __intN types, not just __int128. (c_common_type_for_mode): Likewise. (c_common_signed_or_unsigned_type): Likewise. (c_build_bitfield_integer_type): Likewise. (c_common_nodes_and_builtins): Likewise. (keyword_begins_type_specifier): Likewise. * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all __intN variants. c/ * c-parser.c (c_parse_init): Add RID entries for each __intN. (c_token_starts_typename): Check all __intN, not just __int128. (c_token_starts_declspecs): Likewise. (c_parser_declspecs): Likewise. (c_parser_attribute_any_word): Likewise. (c_parser_objc_selector): Likewise. * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n. (struct c_declspecs): Add int_n_idx field to record *which* __intN is specified. * c-decl.c (declspecs_add_type): Check for all __intN, not just __int128. (finish_declspecs): Likewise. testsuite/ * g++.dg/abi/mangle64.C: New. cp/ * typeck.c (cp_common_type): Check for all __intN types, not just __int128. * decl.c (grokdeclarator): Likewise. * rtti.c (emit_support_tinfos): Check for all __intN types, not just __int128. * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check for all __intN types, not just __int128. (cp_parser_simple_type_specifier): Likewise. * mangle.c (integer_type_codes): Remove int128-specific codes. * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which __intN was specified. * lex.c (init_reswords): Reserve all __intN keywords. lto/ * lto-lang.c (lto_build_c_type_nodes): Check intN types for size-type as well. (lto_init): Initialize all intN types, not just int128. From-SVN: r216220
2014-10-14 21:44:36 +02:00
/* The target normally defines any target-specific __intN types and
their modes, but __int128 for TImode is fairly common so define it
here. The type will not be created unless the target supports
TImode. */
INT_N (TI, 128);
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
/* Basic floating point modes. SF and DF are the only modes provided
by default. The names QF, HF, XF, and TF are reserved for targets
that need 1-word, 2-word, 80-bit, or 128-bit float types respectively.
These are the IEEE mappings. They can be overridden with
tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. * doc/tm.texi.in (OVERRIDE_OPTIONS): Remove documentation. (C_COMMON_OVERRIDE_OPTIONS): Don't refer to OVERRIDE_OPTIONS. * doc/tm.texi: Regenerate. * system.h (OVERRIDE_OPTIONS): Poison. * target.def (override): Default to hook_void_void. * targhooks.c (default_target_option_override): Remove. * genmodes.c, machmode.def: Update comments mentioning OVERRIDE_OPTIONS. * config/alpha/alpha-modes.def: Update comment mentioning alpha_override_options. * config/alpha/alpha-protos.h (override_options): Remove. * config/alpha/alpha.c (override_options): Rename to alpha_option_override. Call SUBTARGET_OVERRIDE_OPTIONS. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/alpha/alpha.h (OVERRIDE_OPTIONS): Remove. * config/alpha/vms.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/arc/arc-protos.h (arc_init): Remove. * config/arc/arc.c (TARGET_OPTION_OVERRIDE): Define. (arc_init): Rename to arc_option_override. Make static. * config/arc/arc.h (ARC_EXTENSION_CPU): Correct comment. (OVERRIDE_OPTIONS): Remove. * config/arm/arm-protos.h (arm_override_options): Remove. * config/arm/arm.c (TARGET_OPTION_OVERRIDE): Define. (arm_override_options): Rename to arm_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/arm/arm.h (OVERRIDE_OPTIONS): Remove. * config/arm/arm.md: Update comment referring to arm_override_options. * config/arm/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/avr/avr-protos.h (avr_override_options): Remove. * config/avr/avr.c (TARGET_OPTION_OVERRIDE): Define. (avr_override_options): Rename to avr_option_override. Make static. * config/avr/avr.h (OVERRIDE_OPTIONS): Remove. * config/bfin/bfin-protos.h (override_options): Remove (twice). * config/bfin/bfin.c (override_options): Rename to bfin_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/bfin/bfin.h (OVERRIDE_OPTIONS): Remove. * config/cris/cris-protos.h (cris_override_options): Remove. * config/cris/cris.c (TARGET_OPTION_OVERRIDE): Define. (cris_override_options): Rename to cris_option_override. Make static. * config/cris/cris.h (OVERRIDE_OPTIONS): Remove. * config/frv/frv-protos.h (frv_override_options): Remove. * config/frv/frv.c (TARGET_OPTION_OVERRIDE): Define. (frv_override_options): Rename to frv_option_override. Make static. * config/frv/frv.h (OVERRIDE_OPTIONS): Remove. * config/h8300/h8300-protos.h (h8300_init_once): Remove. * config/h8300/h8300.c (h8300_init_once): Rename to h8300_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/h8300/h8300.h (OVERRIDE_OPTIONS): Remove. * config/i386/i386-protos.h (override_options): Remove. * config/i386/i386.c (override_options): Rename to ix86_option_override_internal. Make static. Comments referring to this function and callers changed. (ix86_option_override): New. (TARGET_OPTION_OVERRIDE): Define. * config/i386/i386.h (OVERRIDE_OPTION): Remove. * config/i386/linux64.h (DEFAULT_PCC_STRUCT_RETURN): Update comment. * config/ia64/ia64.c (ia64_file_start): Update comment referring to ia64_override_options. * config/iq2000/iq2000-protos.h (override_options): Remove. * config/iq2000/iq2000.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to iq2000_option_override. Make static. * config/iq2000/iq2000.h (OVERRIDE_OPTIONS): Remove. * config/lm32/lm32-protos.h (lm32_override_options): Remove. * config/lm32/lm32.c (TARGET_OPTION_OVERRIDE): Define. (lm32_override_options): Rename to lm32_option_override. Make static. * config/lm32/lm32.h (OVERRIDE_OPTIONS): Remove. * config/m32r/m32r.c (TARGET_OPTION_OVERRIDE): Define. (m32r_option_override): New. (m32r_init): Update comment. * config/m32r/m32r.h (OVERRIDE_OPTIONS): Remove. * config/m68hc11/m68hc11-protos.h (m68hc11_override_options): Remove. * config/m68hc11/m68hc11.c (TARGET_OPTION_OVERRIDE): Define. (m68hc11_override_options): Rename to m68hc11_option_override. Make static. Return void. * config/m68hc11/m68hc11.h (OVERRIDE_OPTIONS): Remove. * config/m68k/m68k-protos.h (override_options): Remove. * config/m68k/m68k.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to m68k_option_override. Make static. * config/m68k/m68k.h (OVERRIDE_OPTIONS): Remove. * config/mcore/mcore-protos.h (mcore_override_options): Remove. * config/mcore/mcore.c (TARGET_OPTION_OVERRIDE): Define. (mcore_override_options): Rename to mcore_option_override. Make static. * config/mcore/mcore.h (OVERRIDE_OPTIONS): Remove. * config/mep/mep-protos.h (mep_override_options): Remove. * config/mep/mep.c (TARGET_OPTION_OVERRIDE): Define. (mep_override_options): Rename to mep_option_override. Make static. * config/mep/mep.h (OVERRIDE_OPTIONS): Remove. * config/mmix/mmix-protos.h (mmix_override_options): Remove. * config/mmix/mmix.c (TARGET_OPTION_OVERRIDE): Define. (mmix_override_options): Rename to mmix_option_override. Make static. * config/mmix/mmix.h (OVERRIDE_OPTIONS): Remove. * config/mn10300/mn10300-protos.h (mn10300_override_options): Remove. * config/mn10300/mn10300.c (TARGET_OPTION_OVERRIDE): Define. (mn10300_override_options): Rename to mn10300_option_override. Make static. * config/mn10300/mn10300.h (OVERRIDE_OPTIONS): Remove. * config/moxie/moxie-protos.h (moxie_override_options): Remove. * config/moxie/moxie.c (moxie_override_options): Rename to moxie_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/moxie/moxie.h (OVERRIDE_OPTIONS): Remove. * config/picochip/picochip-protos.h (picochip_override_options): Remove. Update comment referring to picochip_override_options. * config/picochip/picochip.c (TARGET_OPTION_OVERRIDE): Define. (picochip_override_options): Rename to picochip_option_override. Make static. Update comment and definition of TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. * config/picochip/picochip.h (OVERRIDE_OPTIONS): Remove. * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/rs6000/linux64.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/rs6000-modes.def: Update comment referring to rs6000_override_options. * config/rs6000/rs6000-protos.h (rs6000_override_options): Remove. * config/rs6000/rs6000.c (TARGET_OPTION_OVERRIDE): Define. (rs6000_override_options): Rename to rs6000_option_override_internal. Make static. Commented referring to rs6000_override_options and OVERRIDE_OPTIONS updated. (rs6000_option_override): New. * config/rs6000/rs6000.h (OPTION_TARGET_CPU_DEFAULT): Define instead of OVERRIDE_OPTIONS. * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Update comment. * config/s390/s390-protos.h (override_options): Remove. * config/s390/s390.c (override_options): Rename to s390_option_override. Make static. (TARGET_OPTION_OVERRIDE): Define. * config/s390/s390.h (OVERRIDE_OPTIONS): Remove. * config/score/score-protos.h (score_override_options): Remove. * config/score/score.c (TARGET_OPTION_OVERRIDE): Define. (score_override_options): Rename to score_option_override. Make static. * config/score/score.h (OVERRIDE_OPTIONS): Remove. Update comment referring to override_options. * config/score/score3.c (score3_override_options): Rename to score3_option_override. * config/score/score3.h (score3_override_options): Rename to score3_option_override. * config/score/score7.c (score7_override_options): Rename to score7_option_override. * config/score/score7.h (score7_override_options): Rename to score7_option_override. * config/sh/sh.c: Update comments referring to OVERRIDE_OPTIONS. * config/sparc/sparc.c (TARGET_OPTION_OVERRIDE): Define. (sparc_override_options): Rename to sparc_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/sparc/sparc.h (OVERRIDE_OPTIONS): Remove. * config/sparc/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/spu/spu-protos.h (spu_override_options): Remove. * config/spu/spu.c (TARGET_OPTION_OVERRIDE): Define. (spu_override_options): Rename to spu_option_override. Make static. * config/spu/spu.h (OVERRIDE_OPTIONS): Remove. * config/vax/elf.h (SUBTARGET_OVERRIDE_OPTIONS): Define instead of OVERRIDE_OPTIONS. * config/vax/vax-protos.h (override_options): Remove. * config/vax/vax.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to vax_option_override. Make static. Call SUBTARGET_OVERRIDE_OPTIONS. * config/vax/vax.h (OVERRIDE_OPTIONS): Remove. * config/vxworks.c: Update comment referring to OVERRIDE_OPTIONS. * config/vxworks.h: Update comment referring to OVERRIDE_OPTIONS. * config/xtensa/xtensa-protos.h (override_options): Remove. * config/xtensa/xtensa.c (TARGET_OPTION_OVERRIDE): Define. (override_options): Rename to xtensa_option_override. Make static. * config/xtensa/xtensa.h (OVERRIDE_OPTIONS): Remove. From-SVN: r164334
2010-09-16 13:59:39 +02:00
RESET_FLOAT_FORMAT or at runtime (in TARGET_OPTION_OVERRIDE). */
Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. * Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o with min-insn-modes.o. (STAGESTUFF): Add min-insn-modes.c. (genobjs): Add genmodes.o. (print-rtl.o, print-rtl1.o): Depend on $(TM_P_H). (insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h. (min-insn-modes.c, min-insn-modes.o): New rules. (s-modes): Also generate min-insn-modes.c. ($(BUILD_PREFIX_1)insn-modes.o): Kill. * genmodes.c (struct mode_data): Add format field. (blank_mode, validate_mode, complete_mode): Update to match. (make_scalar_mode): Separate into make_int_mode and make_float_mode. (_SCALAR_MODE): Kill. (FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument. (emit_insn_modes_c_header): Adjust. (emit_min_insn_modes_c_header, emit_real_format_for_mode) (emit_min_insn_modes_c): New functions. (emit_insn_modes_c): Call emit_real_format_for_mode. (main): Add -m option to generate min-insn-modes.c. * machmode.h: Update documentation. Add format argument to all uses of FLOAT_MODE. * real.c: Don't define real_format_for_mode here. * dwarfout.c: Move default definition of PRINT_REG... * defaults.h: ...here. * print-rtl.c: Include tm_p.h. (DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names): Kill. (print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround this entire block with #ifndef GENERATOR_FILE. * regclass.c: Unconditionally define reg_names. * config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h Don't define DEBUG_REGISTER_NAMES. * config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in redefinition of REGISTER_NAMES. * config/i386/i386.h: Don't define DEBUG_PRINT_REG. * combine.c: Change all preprocessor conditionals on EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit for clarity. * genopinit.c: Remove mention of EXTRA_CC_MODES in comment. * configure.in: Don't define EXTRA_CC_MODES. * configure, config.in: Regenerate. * doc/tm.texi: Remove documentation of EXTRA_CC_MODES. * config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c: May assume that GET_MODE_CLASS is accurate for extra CC modes at all times. * config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct number of arguments to aggregate_value_p. * genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New. * machmode.def: Explain ARCH-modes.def. Document RESET_FLOAT_FORMAT. Improve commentary on various mode clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF, XF, or TF modes here. Remove backward-compatibility definition of CC. * config/alpha/alpha-modes.def: New file; define TF mode. * config/arc/arm-modes.def: Define XF mode. * config/c4x/c4x-modes.def: Define QF and HF modes. Unset float format for SF and DF modes. * config/dsp16xx/dsp16xx-modes.def: New file; define HF mode. * config/i386/i386-modes.def: Define XF and TF modes. * config/i960/i960-modes.def: Define TF mode. * config/ia64/ia64-modes.def: Define TF and OI modes. * config/m68k/m68k-modes.def: New file; define XF mode. * config/mips/mips-modes.def: New file; define TF mode, reset formats for SF and DF modes. * config/pa/pa-modes.def: Define TF mode. * config/rs6000/rs6000.c: Define TF and PSI modes. * config/s390/s390-modes.def: Define OI mode. * config/sh/sh-modes.def: New file; define PSI mode. * config/sparc/sparc-modes.def: Define TF mode. * config/vax/vax-modes.def: New file; reset formats for SF and DF modes. * config/c4x/c4x.c (c4x_override_options): No need to mess with real_format_for_mode or set REAL_MODE_FORMATs. (c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx variable. * config/i386/i386.c (override_options): No need to set REAL_MODE_FORMATs here. * config/i960/i960.c (i960_initialize): Likewise. * config/m68k/m68k.c (m68k_override_options): Likewise. * config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT for TFmode only if not the default. * config/mips/mips.c (override_options): Likewise. * config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for DFmode only if not the default. * config/i370/i370.h (RET_REG): Don't consider TFmode. * config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode. * config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use of modes that don't appear anywhere in the machine description. * config/arc/arc-modes.def, config/arm/arm-modes.def * config/c4x/c4x-modes.def, config/frv/frv-modes.def * config/i386/i386-modes.def, config/i960/i960-modes.def * config/ia64/ia64-modes.def, config/mmix/mmix-modes.def * config/pa/pa-modes.def, config/pdp11/pdp11-modes.def * config/rs6000/rs6000-modes.def, config/s390/s390-modes.def * config/sparc/sparc-modes.def: Convert to new style for declaring extra CC modes. From-SVN: r72440
2003-10-13 23:16:33 +02:00
FLOAT_MODE (SF, 4, ieee_single_format);
FLOAT_MODE (DF, 8, ieee_double_format);
/* Basic CC modes.
FIXME define this only for targets that need it. */
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
CC_MODE (CC);
rtl.texi (Machine Modes): Document QQ... * doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes. Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. Document GET_MODE_IBIT, and GET_MODE_FBIT. * machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P, SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P, SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P, ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P, ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P, SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P, ALL_FIXED_POINT_MODE_P): New define. (CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (GET_MODE_IBIT, GET_MODE_FBIT): New define. * mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM): New mode classes. * machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT. Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTA. * genmodes.c (struct mode_data): Add ibit and fbit fields. (blank_mode): Initialize ibit and fbit. (adj_ibit, adj_fbit): New to adjust ibit and fbit. (vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM. (new_adjust): Change required_class to required_class_from and required_class_to for testing within a range. (complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. (FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define. (make_fixed_point_mode): New. (_ADD_ADJUST): Change C to C1 and C2. (ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to use a range for machine classes. (ADJUST_IBIT, ADJUST_FBIT): New. (emit_insn_modes_h): Output defines of CONST_MODE_IBIT and CONST_MODE_FBIT. (emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM. Emit adjustment for ibit and fbit. (emit_mode_ibit, emit_mode_fbit): New. (emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit. From-SVN: r126007
2007-06-26 00:51:27 +02:00
/* Fixed-point modes. */
FRACT_MODE (QQ, 1, 7); /* s.7 */
FRACT_MODE (HQ, 2, 15); /* s.15 */
FRACT_MODE (SQ, 4, 31); /* s.31 */
FRACT_MODE (DQ, 8, 63); /* s.63 */
FRACT_MODE (TQ, 16, 127); /* s.127 */
UFRACT_MODE (UQQ, 1, 8); /* .8 */
UFRACT_MODE (UHQ, 2, 16); /* .16 */
UFRACT_MODE (USQ, 4, 32); /* .32 */
UFRACT_MODE (UDQ, 8, 64); /* .64 */
UFRACT_MODE (UTQ, 16, 128); /* .128 */
ACCUM_MODE (HA, 2, 8, 7); /* s8.7 */
ACCUM_MODE (SA, 4, 16, 15); /* s16.15 */
ACCUM_MODE (DA, 8, 32, 31); /* s32.31 */
ACCUM_MODE (TA, 16, 64, 63); /* s64.63 */
UACCUM_MODE (UHA, 2, 8, 8); /* 8.8 */
UACCUM_MODE (USA, 4, 16, 16); /* 16.16 */
UACCUM_MODE (UDA, 8, 32, 32); /* 32.32 */
UACCUM_MODE (UTA, 16, 64, 64); /* 64.64 */
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
/* Allow the target to specify additional modes of various kinds. */
#if HAVE_EXTRA_MODES
# include EXTRA_MODES_FILE
#endif
1991-05-31 22:43:32 +02:00
/* Complex modes. */
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
COMPLEX_MODES (INT);
COMPLEX_MODES (FLOAT);
dfp.h, dfp.c: New files. 2005-12-02 Jon Grimm <jgrimm2@us.ibm.com> Janis Johnson <janis187@us.ibm.com> David Edelsohn <dje@watson.ibm.com> Ben Elliston <bje@au.ibm.com> * dfp.h, dfp.c: New files. * Makefile.in (DECNUM, DECNUMINC, LIBDECNUMBER): New variables. (DECNUM_H): Likewise. (LIBDEPS, LIBS, BACKEND): Append $(LIBDECNUMBER). (INCLUDES): Append $(DECNUMINC). (OBJS-common): Add dfp.o. (dfp.o): New rule. * real.h (EXP_BITS): Pinch one bit to .. (struct real_value): Add decimal field. (real_format): Change table size, update documentation. (REAL_MODE_FORMAT): Update for to handle float, decimal float. (real_from_string3): Declare. (decimal_single_format): Declare. (decimal_double_format): Declare. (decimal_quad_format): Declare. (REAL_VALUE_TO_TARGET_DECIMAL32): New. (REAL_VALUE_TO_TARGET_DECIMAL64): New. (REAL_VALUE_TO_TARGET_DECIMAL128): New. * real.c: Include dfp.h. (normalize): Early return for decimal floats. (do_add): Zero decimal field. (do_compare): Call do_decimal_compare for decimal floats. (do_fix_trunc): Likewise, call decimal_do_fix_trunc. (real_arithmetic): Call decimal_real_arithmetic for decimal floating point operands. (real_identical): If a and b are of differing radix, return false. (real_to_integer): Call decimal_real_to_integer if the value is a decimal float. (real_to_integer2): Likewise, call decimal_real_to_integer2. (real_to_decimal): Likewise, call decimal_real_to_decimal. (real_to_hexadecimal): Place "N/A" in the return string for decimal float. (real_from_string3): New variant, given a mode. (real_maxval): Use decimal_real_maxval for decimal floats. (round_for_format): Use decimal_round_for_format for decimals. (real_convert): Use decimal_real_convert where appropriate. (significand_size): Handle base 10. (encode_decimal_single, decode_decimal_single, encode_decimal_double, decode_decimal_double, encode_decimal_quad, decode_decimal_quad): New functions. (decimal_single_format): New. (decimal_double_format): New. (decimal_quad_format): New. * machmode.def: Add SD, DD and TD decimal floating point modes. * machmode.h (FLOAT_MODE_P, SCALAR_FLOAT_MODE_P, MODES_WIDEN_P): Include MODE_DECIMAL_FLOAT. (DECIMAL_FLOAT_MODE_P): New. * mode-classes.def (MODE_DECIMAL_FLOAT): New mode class. * genmodes.c (struct mode_data): Add counter field. (struct mode_data): Update comment for format. (blank_mode): Initialise counter field. (new_mode): Increment counter field for each mode defined. (complete_mode): Handle MODE_DECIMAL_FLOAT, update check for mode using a format. (make_complex_modes): Handle modes containing `D'. (DECIMAL_FLOAT_MODE, FRACTIONAL_DECIMAL_FLOAT_MODE): New. (make_decimal_float_mode): New. (reset_float_format): Handle MODE_DECIMAL_FLOAT. (cmp_modes): Compare counter field if other characteristics similar. (emit_real_format_for_mode): Support formats for decimal floats. * doc/rtl.texi (Machine Modes): Document SD, DD and TDmodes. Document MODE_DECIMAL_FLOAT. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: David Edelsohn <dje@watson.ibm.com> Co-Authored-By: Janis Johnson <janis187@us.ibm.com> From-SVN: r107861
2005-12-02 03:30:42 +01:00
/* Decimal floating point modes. */
DECIMAL_FLOAT_MODE (SD, 4, decimal_single_format);
DECIMAL_FLOAT_MODE (DD, 8, decimal_double_format);
DECIMAL_FLOAT_MODE (TD, 16, decimal_quad_format);
1991-05-31 22:43:32 +02:00
/* The symbol Pmode stands for one of the above machine modes (usually SImode).
genmodes.c, [...]: New files. * genmodes.c, mode-classes.def: New files. * machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. From-SVN: r72313
2003-10-10 22:33:07 +02:00
The tm.h file specifies which one. It is not a distinct mode. */
1991-05-31 22:43:32 +02:00
/*
Local variables:
mode:c
version-control: t
End:
*/