summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-03 21:10:09 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-03 21:10:09 +0000
commit4268f174a342afb4108ba0718c302c349d53128f (patch)
tree95ce10820dcdc63db9f1448b54fe058ae5559247 /gcc
parentba403b8ee3c4394c51bfdf6539169e5c79957bed (diff)
downloadppe42-gcc-4268f174a342afb4108ba0718c302c349d53128f.tar.gz
ppe42-gcc-4268f174a342afb4108ba0718c302c349d53128f.zip
* emit-rtl.c, final.c, fold-const.c, gengenrtl.c, optabs.c,
print-tree.c, real.c, real.h, recog.c, rtl.c, simplify-rtx.c, tree.c, config/m68k/m68k.c, f/com.c, f/target.h, java/expr.c, java/jcf-parse.c, java/lex.c: Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef REAL_ARITHMETIC blocks unconditional. Delete some further #ifdef blocks predicated on REAL_ARITHMETIC. * flags.h, toplev.c: Delete remaining references to flag_pretend_float. * doc/invoke.texi: Remove documentation of -fpretend-float. * doc/tm.texi: Describe the various REAL_* macros as provided by real.h, not by the target configuration files. * config/alpha/alpha.h, config/alpha/unicosmk.h, config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h, config/convex/convex.h, config/cris/cris.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/h8300/h8300.h, config/i370/i370.h, config/i386/i386.h, config/i386/osf1elf.h, config/i960/i960.h, config/ia64/ia64.h, config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/dpx2.h, config/m68k/linux-aout.h, config/m68k/linux.h, config/m68k/m68k.h, config/m68k/sun3.h, config/m68k/vxm68k.h, config/mcore/mcore.h, config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h, config/pa/pa.h, config/pj/pj.h, config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h, config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h, config/sparc/sol2.h, config/sparc/sparc.h, config/sparc/vxsim.h, config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Do not define, undefine, or mention in comments any of REAL_ARITHMETIC, REAL_VALUE_ATOF, REAL_VALUE_HTOF, REAL_VALUE_ISNAN, REAL_VALUE_ISINF, REAL_VALUE_TO_TARGET_SINGLE, REAL_VALUE_TO_TARGET_DOUBLE, REAL_VALUE_TO_TARGET_LONG_DOUBLE, REAL_VALUE_TO_DECIMAL, REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS, REAL_VALUE_LDEXP, REAL_VALUE_FIX, REAL_VALUE_UNSIGNED_FIX, REAL_VALUE_RNDZINT, REAL_VALUE_UNSIGNED_RNDZINT, REAL_INFINITY, REAL_VALUE_NEGATE, REAL_VALUE_TRUNCATE, REAL_VALUE_TO_INT, or REAL_VALUE_FROM_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog57
-rw-r--r--gcc/config/alpha/alpha.h3
-rw-r--r--gcc/config/alpha/unicosmk.h15
-rw-r--r--gcc/config/arc/arc.h4
-rw-r--r--gcc/config/arm/arm.h8
-rw-r--r--gcc/config/avr/avr.h4
-rw-r--r--gcc/config/c4x/c4x.h5
-rw-r--r--gcc/config/convex/convex.h15
-rw-r--r--gcc/config/cris/cris.h4
-rw-r--r--gcc/config/d30v/d30v.h159
-rw-r--r--gcc/config/dsp16xx/dsp16xx.h5
-rw-r--r--gcc/config/h8300/h8300.h4
-rw-r--r--gcc/config/i370/linux.h8
-rw-r--r--gcc/config/i386/i386.h7
-rw-r--r--gcc/config/i386/osf1elf.h6
-rw-r--r--gcc/config/i960/i960.h4
-rw-r--r--gcc/config/ia64/ia64.h6
-rw-r--r--gcc/config/m32r/m32r.h4
-rw-r--r--gcc/config/m68hc11/m68hc11.h5
-rw-r--r--gcc/config/m68k/dpx2.h5
-rw-r--r--gcc/config/m68k/linux-aout.h3
-rw-r--r--gcc/config/m68k/linux.h3
-rw-r--r--gcc/config/m68k/m68k.c21
-rw-r--r--gcc/config/m68k/m68k.h8
-rw-r--r--gcc/config/m68k/netbsd-elf.h4
-rw-r--r--gcc/config/m68k/sun3.h3
-rw-r--r--gcc/config/m68k/vxm68k.h3
-rw-r--r--gcc/config/mcore/mcore.h4
-rw-r--r--gcc/config/mips/mips.h4
-rw-r--r--gcc/config/mmix/mmix.h11
-rw-r--r--gcc/config/mn10200/mn10200.h4
-rw-r--r--gcc/config/mn10300/mn10300.h4
-rw-r--r--gcc/config/pa/pa.h4
-rw-r--r--gcc/config/pj/pj.h4
-rw-r--r--gcc/config/rs6000/rs6000.h3
-rw-r--r--gcc/config/s390/s390.h6
-rw-r--r--gcc/config/sh/sh.h4
-rw-r--r--gcc/config/sparc/freebsd.h2
-rw-r--r--gcc/config/sparc/linux.h2
-rw-r--r--gcc/config/sparc/linux64.h2
-rw-r--r--gcc/config/sparc/sol2.h2
-rw-r--r--gcc/config/sparc/sparc.h6
-rw-r--r--gcc/config/sparc/vxsim.h2
-rw-r--r--gcc/config/stormy16/stormy16.h28
-rw-r--r--gcc/config/v850/v850.h4
-rw-r--r--gcc/config/vax/vax.h2
-rw-r--r--gcc/config/xtensa/xtensa.h4
-rw-r--r--gcc/doc/invoke.texi10
-rw-r--r--gcc/doc/tm.texi23
-rw-r--r--gcc/emit-rtl.c147
-rw-r--r--gcc/f/ChangeLog6
-rw-r--r--gcc/f/com.c4
-rw-r--r--gcc/f/target.h290
-rw-r--r--gcc/final.c25
-rw-r--r--gcc/flags.h6
-rw-r--r--gcc/fold-const.c595
-rw-r--r--gcc/gengenrtl.c22
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/expr.c4
-rw-r--r--gcc/java/jcf-parse.c15
-rw-r--r--gcc/java/lex.c4
-rw-r--r--gcc/optabs.c5
-rw-r--r--gcc/print-tree.c22
-rw-r--r--gcc/real.c60
-rw-r--r--gcc/real.h245
-rw-r--r--gcc/recog.c22
-rw-r--r--gcc/regclass.c12
-rw-r--r--gcc/reload.c12
-rw-r--r--gcc/rtl.c22
-rw-r--r--gcc/simplify-rtx.c80
-rw-r--r--gcc/toplev.c8
-rw-r--r--gcc/tree.c38
72 files changed, 123 insertions, 2036 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 60c2a8d1e27..d82d278e7e5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,44 @@
+2002-03-03 Zack Weinberg <zack@codesourcery.com>
+
+ * emit-rtl.c, final.c, fold-const.c, gengenrtl.c, optabs.c,
+ print-tree.c, real.c, real.h, recog.c, rtl.c, simplify-rtx.c,
+ tree.c, config/m68k/m68k.c:
+ Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
+ REAL_ARITHMETIC blocks unconditional. Delete some further
+ #ifdef blocks predicated on REAL_ARITHMETIC.
+ * flags.h, toplev.c: Delete remaining references to
+ flag_pretend_float.
+
+ * doc/invoke.texi: Remove documentation of -fpretend-float.
+ * doc/tm.texi: Describe the various REAL_* macros as provided by
+ real.h, not by the target configuration files.
+
+ * config/alpha/alpha.h, config/alpha/unicosmk.h, config/arm/arm.h,
+ config/avr/avr.h, config/c4x/c4x.h, config/convex/convex.h,
+ config/cris/cris.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
+ config/h8300/h8300.h, config/i370/i370.h, config/i386/i386.h,
+ config/i386/osf1elf.h, config/i960/i960.h, config/ia64/ia64.h,
+ config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/dpx2.h,
+ config/m68k/linux-aout.h, config/m68k/linux.h, config/m68k/m68k.h,
+ config/m68k/sun3.h, config/m68k/vxm68k.h, config/mcore/mcore.h,
+ config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h,
+ config/mn10300/mn10300.h, config/pa/pa.h, config/pj/pj.h,
+ config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h,
+ config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h,
+ config/sparc/sol2.h, config/sparc/sparc.h, config/sparc/vxsim.h,
+ config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h,
+ config/xtensa/xtensa.h:
+ Do not define, undefine, or mention in comments any of
+ REAL_ARITHMETIC, REAL_VALUE_ATOF, REAL_VALUE_HTOF,
+ REAL_VALUE_ISNAN, REAL_VALUE_ISINF,
+ REAL_VALUE_TO_TARGET_SINGLE, REAL_VALUE_TO_TARGET_DOUBLE,
+ REAL_VALUE_TO_TARGET_LONG_DOUBLE, REAL_VALUE_TO_DECIMAL,
+ REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS,
+ REAL_VALUE_LDEXP, REAL_VALUE_FIX, REAL_VALUE_UNSIGNED_FIX,
+ REAL_VALUE_RNDZINT, REAL_VALUE_UNSIGNED_RNDZINT,
+ REAL_INFINITY, REAL_VALUE_NEGATE, REAL_VALUE_TRUNCATE,
+ REAL_VALUE_TO_INT, or REAL_VALUE_FROM_INT.
+
2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 1750a.h, a29k.h, alpha.h, arc.h, arm.h, avr.h, c4x.h, clipper.h,
@@ -8,7 +49,7 @@
stormy16.h, v850.h, vax.h, we32k.h, xtensa.h (BITS_PER_WORD):
Delete.
* defaults.h (BITS_PER_WORD): Define.
- * doc/tm.texi (BITS_PER_WORD): Document default value.
+ * doc/tm.texi (BITS_PER_WORD): Document default value.
* 1750a.h, avr.h, convex.h, d30v.h, dsp16xx.h, fr30.h, ia64.h,
m68hc11.h, m88k.h, mips.h, pdp11.h, rs6000.h, sparc.c,
@@ -32,7 +73,7 @@
* ggc-page.c (NUM_EXTRA_ORDERS): Likewise.
* lcm.c (N_ENTITIES): Likewise.
* stor-layout.c (set_sizetype): Likewise.
-
+
2002-03-03 Richard Henderson <rth@redhat.com>
* toplev.c (rest_of_decl_compilation): Do not invoke make_decl_rtl
@@ -74,7 +115,7 @@
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
- config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
+ config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
config/arm/arm.h, config/arm/pe.c, config/arm/pe.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
@@ -84,12 +125,12 @@
config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h,
- config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
- config/m68hc11/m68hc11.h, config/m88k/m88k.h,
+ config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
+ config/m68hc11/m68hc11.h, config/m88k/m88k.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h,
- config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
+ config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
@@ -97,7 +138,7 @@
config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes
FIRST argument. As needed, examine it and do nothing.
- * config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
+ * config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h,
config/mcore/mcore.h: Remove REDO_SECTION_INFO_P.
@@ -380,7 +421,7 @@ objc:
2002-02-27 Andrew MacLeod <amacleod@redhat.com>
- * dwarf2out.c (stack_adjust_offset): Add support for POST_INC,
+ * dwarf2out.c (stack_adjust_offset): Add support for POST_INC,
POST_DEC, and POST_MODIFY.
2002-02-27 Zack Weinberg <zack@codesourcery.com>
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index d783997bc45..683740d913c 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -409,9 +409,6 @@ extern const char *alpha_mlat_string; /* For -mmemory-latency= */
/* target machine storage layout */
-/* Define to enable software floating point emulation. */
-#define REAL_ARITHMETIC
-
/* Define the size of `int'. The default is the same as the word size. */
#define INT_TYPE_SIZE 32
diff --git a/gcc/config/alpha/unicosmk.h b/gcc/config/alpha/unicosmk.h
index 65ab319d502..80492e486b8 100644
--- a/gcc/config/alpha/unicosmk.h
+++ b/gcc/config/alpha/unicosmk.h
@@ -35,13 +35,6 @@ Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-D__unix=1 -D_UNICOS=205 -D_CRAY=1 -D_CRAYT3E=1 -D_CRAYMPP=1 -D_CRAYIEEE=1 -D_ADDR64=1 -D_LD64=1 -D__UNICOSMK__ -D__INT_MAX__=9223372036854775807 -D__SHRT_MAX__=2147483647"
-/* Disable software floating point emulation because it requires a 16-bit
- type which we do not have. */
-
-#ifndef __GNUC__
-#undef REAL_ARITHMETIC
-#endif
-
#define SHORT_TYPE_SIZE 32
#undef INT_TYPE_SIZE
@@ -568,14 +561,6 @@ ssib_section () \
#undef ASM_OUTPUT_MAX_SKIP_ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,POWER,MAXSKIP)
-/* We have to define these because we do not use the floating-point
- emulation. Unfortunately, atof does not accept hex literals. */
-
-#ifndef REAL_ARITHMETIC
-#define REAL_VALUE_ATOF(x,s) atof(x)
-#define REAL_VALUE_HTOF(x,s) atof(x)
-#endif
-
#undef NM_FLAGS
#undef OBJECT_FORMAT_COFF
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index d6c24afc86a..f536126acb1 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -168,10 +168,6 @@ do { \
/* Target machine storage layout. */
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN 1
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 524bfbf465c..9a27c533c2e 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -647,8 +647,6 @@ extern int arm_is_6_or_7;
/* This is required to ensure that push insns always push a word. */
#define PROMOTE_FUNCTION_ARGS
-/* Define for XFmode extended real floating point support.
- This will automatically cause REAL_ARITHMETIC to be defined. */
/* For the ARM:
I think I have added all the code to make this work. Unfortunately,
early releases of the floating point emulation code on RISCiX used a
@@ -663,12 +661,6 @@ extern int arm_is_6_or_7;
/* Disable XFmode patterns in md file */
#define ENABLE_XF_PATTERNS 0
-/* Define if you don't want extended real, but do want to use the
- software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-/* See comment above */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN 0
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index d1d06e81fc8..e11961ab5a1 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -2915,10 +2915,6 @@ extern struct rtx_def *ldi_reg_rtx;
#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* Get the standard ELF stabs definitions. */
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index f0695ea703a..d9cd3da4e99 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -360,11 +360,6 @@ extern const char *c4x_rpts_cycles_string, *c4x_cpu_version_string;
#define BITS_PER_HIGH 16
#define BITS_PER_LO_SUM 16
-/* Use the internal floating point stuff in the compiler and not the
- host floating point stuff. */
-
-#define REAL_ARITHMETIC
-
/* Define register numbers. */
/* Extended-precision registers. */
diff --git a/gcc/config/convex/convex.h b/gcc/config/convex/convex.h
index 62dc416f173..7ed4e4539d9 100644
--- a/gcc/config/convex/convex.h
+++ b/gcc/config/convex/convex.h
@@ -409,18 +409,6 @@ extern int target_flags;
#define LINK_LIBGCC_SPECIAL_1
-/* Since IEEE support was added to gcc, most things seem to like it
- better if we disable exceptions and check afterward for infinity. */
-
-#if __convex__
-#if _IEEE_FLOAT_
-#define REAL_VALUE_ISNAN(x) 0
-#define REAL_VALUE_ISINF(x) ((*(short *) &(x) & 0x7ff0) == 0x7ff0)
-#else
-#define REAL_VALUE_ISNAN(x) 0
-#define REAL_VALUE_ISINF(x) ((*(short *) &(x) & 0xfff0) == 0x8000)
-#endif
-#endif
/* Target machine storage layout */
@@ -1089,9 +1077,6 @@ enum reg_class {
Follow the host format. */
#define TARGET_FLOAT_FORMAT HOST_FLOAT_FORMAT
-/* But must prevent real.c from constructing VAX dfloats */
-#define REAL_VALUE_ATOF(X,S) atof (X)
-
/* Check a `double' value for validity for a particular machine mode. */
#define CHECK_FLOAT_VALUE(MODE, D, OVERFLOW) \
(OVERFLOW = check_float_value (MODE, &D, OVERFLOW))
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index c547a236755..ac3d521a2dc 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -1746,10 +1746,6 @@ call_ ## FUNC (void) \
/* Node: SDB and DWARF */
/* (no definitions) */
-/* Node: Cross-compilation */
-#define REAL_ARITHMETIC
-
-
/* Node: Misc */
/* FIXME: Check this one more time. */
diff --git a/gcc/config/d30v/d30v.h b/gcc/config/d30v/d30v.h
index 0e665600b22..1ef08ac2ca2 100644
--- a/gcc/config/d30v/d30v.h
+++ b/gcc/config/d30v/d30v.h
@@ -3000,27 +3000,6 @@ extern const char *d30v_branch_cost_string;
/* These macros are provided by `real.h' for writing the definitions of
`ASM_OUTPUT_DOUBLE' and the like: */
-/* These translate X, of type `REAL_VALUE_TYPE', to the target's floating point
- representation, and store its bit pattern in the array of `long int' whose
- address is L. The number of elements in the output array is determined by
- the size of the desired target floating point data type: 32 bits of it go in
- each `long int' array element. Each array element holds 32 bits of the
- result, even if `long int' is wider than 32 bits on the host machine.
-
- The array element values are designed so that you can print them out using
- `fprintf' in the order they should appear in the target machine's memory. */
-/* #define REAL_VALUE_TO_TARGET_SINGLE(X, L) */
-/* #define REAL_VALUE_TO_TARGET_DOUBLE(X, L) */
-/* #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(X, L) */
-
-/* This macro converts X, of type `REAL_VALUE_TYPE', to a decimal number and
- stores it as a string into STRING. You must pass, as STRING, the address of
- a long enough block of space to hold the result.
-
- The argument FORMAT is a `printf'-specification that serves as a suggestion
- for how to format the output string. */
-/* #define REAL_VALUE_TO_DECIMAL(X, FORMAT, STRING) */
-
/* Output of Uninitialized Variables. */
@@ -4139,144 +4118,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
/* #define SDB_ALLOW_FORWARD_REFERENCES */
-/* Cross Compilation and Floating Point. */
-
-/* While all modern machines use 2's complement representation for integers,
- there are a variety of representations for floating point numbers. This
- means that in a cross-compiler the representation of floating point numbers
- in the compiled program may be different from that used in the machine doing
- the compilation.
-
- Because different representation systems may offer different amounts of
- range and precision, the cross compiler cannot safely use the host machine's
- floating point arithmetic. Therefore, floating point constants must be
- represented in the target machine's format. This means that the cross
- compiler cannot use `atof' to parse a floating point constant; it must have
- its own special routine to use instead. Also, constant folding must emulate
- the target machine's arithmetic (or must not be done at all).
-
- The macros in the following table should be defined only if you are cross
- compiling between different floating point formats.
-
- Otherwise, don't define them. Then default definitions will be set up which
- use `double' as the data type, `==' to test for equality, etc.
-
- You don't need to worry about how many times you use an operand of any of
- these macros. The compiler never uses operands which have side effects. */
-
-/* A macro for the C data type to be used to hold a floating point value in the
- target machine's format. Typically this would be a `struct' containing an
- array of `int'. */
-/* #define REAL_VALUE_TYPE */
-
-/* A macro for a C expression which compares for equality the two values, X and
- Y, both of type `REAL_VALUE_TYPE'. */
-/* #define REAL_VALUES_EQUAL(X, Y) */
-
-/* A macro for a C expression which tests whether X is less than Y, both values
- being of type `REAL_VALUE_TYPE' and interpreted as floating point numbers in
- the target machine's representation. */
-/* #define REAL_VALUES_LESS(X, Y) */
-
-/* A macro for a C expression which performs the standard library function
- `ldexp', but using the target machine's floating point representation. Both
- X and the value of the expression have type `REAL_VALUE_TYPE'. The second
- argument, SCALE, is an integer. */
-/* #define REAL_VALUE_LDEXP(X, SCALE) */
-
-/* A macro whose definition is a C expression to convert the target-machine
- floating point value X to a signed integer. X has type `REAL_VALUE_TYPE'. */
-/* #define REAL_VALUE_FIX(X) */
-
-/* A macro whose definition is a C expression to convert the target-machine
- floating point value X to an unsigned integer. X has type
- `REAL_VALUE_TYPE'. */
-/* #define REAL_VALUE_UNSIGNED_FIX(X) */
-
-/* A macro whose definition is a C expression to round the target-machine
- floating point value X towards zero to an integer value (but still as a
- floating point number). X has type `REAL_VALUE_TYPE', and so does the
- value. */
-/* #define REAL_VALUE_RNDZINT(X) */
-
-/* A macro whose definition is a C expression to round the target-machine
- floating point value X towards zero to an unsigned integer value (but still
- represented as a floating point number). X has type `REAL_VALUE_TYPE', and
- so does the value. */
-/* #define REAL_VALUE_UNSIGNED_RNDZINT(X) */
-
-/* A macro for a C expression which converts STRING, an expression of type
- `char *', into a floating point number in the target machine's
- representation for mode MODE. The value has type `REAL_VALUE_TYPE'. */
-/* #define REAL_VALUE_ATOF(STRING, MODE) */
-
-/* Define this macro if infinity is a possible floating point value, and
- therefore division by 0 is legitimate. */
-/* #define REAL_INFINITY */
-
-/* A macro for a C expression which determines whether X, a floating point
- value, is infinity. The value has type `int'. By default, this is defined
- to call `isinf'. */
-/* #define REAL_VALUE_ISINF(X) */
-
-/* A macro for a C expression which determines whether X, a floating point
- value, is a "nan" (not-a-number). The value has type `int'. By default,
- this is defined to call `isnan'. */
-/* #define REAL_VALUE_ISNAN(X) */
-
-/* Define the following additional macros if you want to make floating point
- constant folding work while cross compiling. If you don't define them,
- cross compilation is still possible, but constant folding will not happen
- for floating point values. */
-
-/* A macro for a C statement which calculates an arithmetic operation of the
- two floating point values X and Y, both of type `REAL_VALUE_TYPE' in the
- target machine's representation, to produce a result of the same type and
- representation which is stored in OUTPUT (which will be a variable).
-
- The operation to be performed is specified by CODE, a tree code which will
- always be one of the following: `PLUS_EXPR', `MINUS_EXPR', `MULT_EXPR',
- `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'.
-
- The expansion of this macro is responsible for checking for overflow. If
- overflow happens, the macro expansion should execute the statement `return
- 0;', which indicates the inability to perform the arithmetic operation
- requested. */
-/* #define REAL_ARITHMETIC(OUTPUT, CODE, X, Y) */
-
-/* The real.h file actually defines REAL_ARITHMETIC appropriately if it was
- defined at all before entering into the code, by using #undef first. */
-#define REAL_ARITHMETIC
-
-/* A macro for a C expression which returns the negative of the floating point
- value X. Both X and the value of the expression have type `REAL_VALUE_TYPE'
- and are in the target machine's floating point representation.
-
- There is no way for this macro to report overflow, since overflow can't
- happen in the negation operation. */
-/* #define REAL_VALUE_NEGATE(X) */
-
-/* A macro for a C expression which converts the floating point value X to mode
- MODE.
-
- Both X and the value of the expression are in the target machine's floating
- point representation and have type `REAL_VALUE_TYPE'. However, the value
- should have an appropriate bit pattern to be output properly as a floating
- constant whose precision accords with mode MODE.
-
- There is no way for this macro to report overflow. */
-/* #define REAL_VALUE_TRUNCATE(MODE, X) */
-
-/* A macro for a C expression which converts a floating point value X into a
- double-precision integer which is then stored into LOW and HIGH, two
- variables of type INT. */
-/* #define REAL_VALUE_TO_INT(LOW, HIGH, X) */
-
-/* A macro for a C expression which converts a double-precision integer found
- in LOW and HIGH, two variables of type INT, into a floating point value
- which is then stored into X. */
-/* #define REAL_VALUE_FROM_INT(X, LOW, HIGH) */
-
/* Miscellaneous Parameters. */
diff --git a/gcc/config/dsp16xx/dsp16xx.h b/gcc/config/dsp16xx/dsp16xx.h
index 0feb5e8966e..a9812830454 100644
--- a/gcc/config/dsp16xx/dsp16xx.h
+++ b/gcc/config/dsp16xx/dsp16xx.h
@@ -294,11 +294,6 @@ extern int target_flags;
/* STORAGE LAYOUT */
-/* Define if you don't want extended real, but do want to use the
- software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields.
*/
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 3a6fe8fcb3d..f5b54db6b31 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -180,10 +180,6 @@ extern int target_flags;
/* Target machine storage layout */
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields.
This is not true on the H8/300. */
diff --git a/gcc/config/i370/linux.h b/gcc/config/i370/linux.h
index 72c66189648..52a34385949 100644
--- a/gcc/config/i370/linux.h
+++ b/gcc/config/i370/linux.h
@@ -28,14 +28,6 @@ Boston, MA 02111-1307, USA. */
#define TARGET_ELF_ABI
#define LINUX_DEFAULT_ELF
-
-/* hack alert define to get dbx/gdb/dwarf to compile */
-/* problem is that host float format is not target float format. */
-/* define REAL_ARITHMETIC for software emulation of float to
- * int conversion. This seems to have somethings to do with
- * cross-compiling ... */
-#define REAL_ARITHMETIC
-
/* Include system common definitions */
/* TODO: convert include to ${tm_file} list in config.gcc. */
#include "i370/i370.h"
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index f5b8e2f6cc9..023a9dc1464 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -669,8 +669,6 @@ extern int ix86_arch;
/* target machine storage layout */
/* Define for XFmode or TFmode extended real floating point support.
- This will automatically cause REAL_ARITHMETIC to be defined.
-
The XFmode is specified by i386 ABI, while TFmode may be faster
due to alignment and simplifications in the address calculations.
*/
@@ -702,11 +700,6 @@ extern int ix86_arch;
#define MAX_LONG_TYPE_SIZE 32
#endif
-/* Define if you don't want extended real, but do want to use the
- software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-/* #define REAL_ARITHMETIC */
-
/* Define this if most significant byte of a word is the lowest numbered. */
/* That is true on the 80386. */
diff --git a/gcc/config/i386/osf1elf.h b/gcc/config/i386/osf1elf.h
index 1f0c635730a..a772442c4fc 100644
--- a/gcc/config/i386/osf1elf.h
+++ b/gcc/config/i386/osf1elf.h
@@ -205,9 +205,3 @@ do \
} \
} \
while (0)
-
-#if defined (CROSS_COMPILE) && defined (HOST_BITS_PER_INT) && defined (HOST_BITS_PER_LONG) && defined (HOST_BITS_PER_LONGLONG)
-#if (HOST_BITS_PER_INT==32) && (HOST_BITS_PER_LONG==64) && (HOST_BITS_PER_LONGLONG==64)
-#define REAL_ARITHMETIC
-#endif
-#endif
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index c1446a2db03..a9f7e256c0a 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -380,10 +380,6 @@ extern int target_flags;
/* Target machine storage layout. */
-/* Define for cross-compilation from a host with a different float format
- or endianness, as well as to support 80 bit long doubles on the i960. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN 0
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index afa7bfd212d..b8f2449f91a 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -2277,12 +2277,6 @@ do { \
fputc (')', FILE); \
} while (0)
-/* Cross Compilation and Floating Point. */
-
-/* Define to enable software floating point emulation. */
-#define REAL_ARITHMETIC
-
-
/* Register Renaming Parameters. */
/* A C expression that is nonzero if hard register number REGNO2 can be
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index 22a2f99c80e..02a91681258 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -421,10 +421,6 @@ extern enum m32r_sdata m32r_sdata;
/* Target machine storage layout. */
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN 1
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index 067c2a3eb75..cdb28e796c6 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -244,11 +244,6 @@ extern const struct processor_costs *m68hc11_cost;
/* Width of a word, in units (bytes). */
#define UNITS_PER_WORD 2
-/* Define if you don't want extended real, but do want to use the
- software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Width in bits of a pointer. See also the macro `Pmode' defined below. */
#define POINTER_SIZE 16
diff --git a/gcc/config/m68k/dpx2.h b/gcc/config/m68k/dpx2.h
index 2bc06b4bc2b..06dfd50514d 100644
--- a/gcc/config/m68k/dpx2.h
+++ b/gcc/config/m68k/dpx2.h
@@ -113,11 +113,6 @@ Boston, MA 02111-1307, USA. */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
-/* Define if you don't want extended real, but do want to use the
- software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
#undef ASM_OUTPUT_SOURCE_FILENAME
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NA) \
do { fprintf ((FILE), "\t.file\t'%s'\n", (NA)); } while (0)
diff --git a/gcc/config/m68k/linux-aout.h b/gcc/config/m68k/linux-aout.h
index dd07a4e983e..f7bb33726ad 100644
--- a/gcc/config/m68k/linux-aout.h
+++ b/gcc/config/m68k/linux-aout.h
@@ -73,6 +73,3 @@ Boston, MA 02111-1307, USA. */
/* Don't default to pcc-struct-return, because gcc is the only compiler. */
#undef PCC_STATIC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0
-
-/* Allow folding division by zero. */
-#define REAL_INFINITY
diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
index 9926329813e..b1ec9777364 100644
--- a/gcc/config/m68k/linux.h
+++ b/gcc/config/m68k/linux.h
@@ -247,9 +247,6 @@ Boston, MA 02111-1307, USA. */
#define DBX_CONTIN_LENGTH 0
-/* Allow folding division by zero. */
-#define REAL_INFINITY
-
/* 1 if N is a possible register number for a function value. For
m68k/SVR4 allow d0, a0, or fp0 as return registers, for integral,
pointer, or floating types, respectively. Reject fp0 if not using
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 42c4f7cc287..6289d3f6ef5 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -3112,13 +3112,6 @@ standard_68881_constant_p (x)
if (TARGET_68040 || TARGET_68060)
return 0;
-#ifndef REAL_ARITHMETIC
-#if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- if (! flag_pretend_float)
- return 0;
-#endif
-#endif
-
if (! inited_68881_table)
init_68881_table ();
@@ -3153,13 +3146,6 @@ floating_exact_log2 (x)
REAL_VALUE_TYPE r, r1;
int i;
-#ifndef REAL_ARITHMETIC
-#if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- if (! flag_pretend_float)
- return 0;
-#endif
-#endif
-
REAL_VALUE_FROM_CONST_DOUBLE (r, x);
if (REAL_VALUES_LESS (r, dconst0))
@@ -3305,13 +3291,6 @@ standard_sun_fpa_constant_p (x)
REAL_VALUE_TYPE r;
int i;
-#ifndef REAL_ARITHMETIC
-#if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- if (! flag_pretend_float)
- return 0;
-#endif
-#endif
-
if (! inited_FPA_table)
init_FPA_table ();
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index a33528826df..1f21ba96bac 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -294,15 +294,9 @@ extern int target_flags;
/* target machine storage layout */
-/* Define for XFmode extended real floating point support.
- This will automatically cause REAL_ARITHMETIC to be defined. */
+/* Define for XFmode extended real floating point support. */
#define LONG_DOUBLE_TYPE_SIZE 96
-/* Define if you don't want extended real, but do want to use the
- software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-/* #define REAL_ARITHMETIC */
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields.
This is true for 68020 insns such as bfins and bfexts.
diff --git a/gcc/config/m68k/netbsd-elf.h b/gcc/config/m68k/netbsd-elf.h
index 97c1b961852..f0d1e91e3b1 100644
--- a/gcc/config/m68k/netbsd-elf.h
+++ b/gcc/config/m68k/netbsd-elf.h
@@ -34,10 +34,6 @@ Boston, MA 02111-1307, USA. */
#if TARGET_DEFAULT == 0
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
-
-/* Use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
#endif
#ifdef __mc68010__
diff --git a/gcc/config/m68k/sun3.h b/gcc/config/m68k/sun3.h
index 0bee8234687..2db724fb95e 100644
--- a/gcc/config/m68k/sun3.h
+++ b/gcc/config/m68k/sun3.h
@@ -163,9 +163,6 @@ Boston, MA 02111-1307, USA. */
#define DBX_DEBUGGING_INFO
-/* Allow folding division by zero. */
-#define REAL_INFINITY
-
/* Generate calls to memcpy, memcmp and memset. */
#define TARGET_MEM_FUNCTIONS
diff --git a/gcc/config/m68k/vxm68k.h b/gcc/config/m68k/vxm68k.h
index 433595be93d..161d063a129 100644
--- a/gcc/config/m68k/vxm68k.h
+++ b/gcc/config/m68k/vxm68k.h
@@ -94,9 +94,6 @@ Unrecognized value in TARGET_CPU_DEFAULT.
#define STRUCTURE_SIZE_BOUNDARY 16
-/* Allow folding division by zero. */
-#define REAL_INFINITY
-
/* GCC is the primary compiler for VxWorks, so we don't need this. */
#undef PCC_STATIC_STRUCT_RETURN
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index 3da212eed06..01336756f1c 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -214,10 +214,6 @@ extern const char * mcore_stack_increment_string;
/* Target machine storage Layout. */
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
if (GET_MODE_CLASS (MODE) == MODE_INT \
&& GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index f1e170de216..72d44982de4 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1546,10 +1546,6 @@ do { \
/* Target machine storage layout */
-/* Define in order to support both big and little endian float formats
- in the same gcc binary. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields.
*/
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index 7d2c7f20d39..e42274088b5 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -1154,17 +1154,6 @@ const_section () \
#define DWARF2_DEBUGGING_INFO
#define DWARF2_ASM_LINE_DEBUG_INFO 1
-/* Node: Cross-compilation */
-
-/* FIXME: I don't know whether it is best to tweak emit-rtl.c to handle
- the case where sizeof (float) == word_size / 2 on the target, or to fix
- real.h to define REAL_ARITHMETIC in that case. Anyway, it should be
- documented that a target can define this to force emulation. Note that
- we don't check #ifdef CROSS_COMPILE here; not even if mmix gets
- self-hosted must we do that. Case gcc.c-torture/compile/930611-1.c. */
-#define REAL_ARITHMETIC
-
-
/* Node: Misc */
#define PREDICATE_CODES \
diff --git a/gcc/config/mn10200/mn10200.h b/gcc/config/mn10200/mn10200.h
index 5652041b8b6..a0191fcbcdf 100644
--- a/gcc/config/mn10200/mn10200.h
+++ b/gcc/config/mn10200/mn10200.h
@@ -915,10 +915,6 @@ struct cum_arg { int nbytes; };
((GET_CODE (X) == PLUS ? OFFSET : 0) \
+ (frame_pointer_needed ? 0 : -total_frame_size ()))
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Specify the machine mode that this machine uses
for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE Pmode
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 71b73840fb7..a0fe0cd833f 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -1013,10 +1013,6 @@ struct cum_arg {int nbytes; };
+ (frame_pointer_needed \
? 0 : -initial_offset (ARG_POINTER_REGNUM, STACK_POINTER_REGNUM)))
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Specify the machine mode that this machine uses
for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE Pmode
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index c2bc2ea3c2c..41250568a46 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -362,10 +362,6 @@ extern int target_flags;
/* target machine storage layout */
-/* Define for cross-compilation from a host with a different float format
- or endianness (e.g. VAX, x86). */
-#define REAL_ARITHMETIC
-
/* Define this macro if it is advisable to hold scalars in registers
in a wider mode than that declared by the program. In such cases,
the value is constrained to be within the bounds of the declared
diff --git a/gcc/config/pj/pj.h b/gcc/config/pj/pj.h
index ed824738b52..42065f532a8 100644
--- a/gcc/config/pj/pj.h
+++ b/gcc/config/pj/pj.h
@@ -110,10 +110,6 @@ extern int target_flags;
/* Target machine storage layout. */
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN 0
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index e8d9022eed4..30c87bf5fa9 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -483,9 +483,6 @@ extern int rs6000_altivec_abi;
/* target machine storage layout */
-/* Define to support cross compilation to an RS6000 target. */
-#define REAL_ARITHMETIC
-
/* Define this macro if it is advisable to hold scalars in registers
in a wider mode than that declared by the program. In such cases,
the value is constrained to be within the bounds of the declared
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 0d2d9ff4678..959bc9cf1f8 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -78,7 +78,7 @@ extern int target_flags;
#define OVERRIDE_OPTIONS override_options ()
-/* Defines for REAL_ARITHMETIC. */
+/* Defines for real.c. */
#define IEEE_FLOAT 1
#define TARGET_IBM_FLOAT 0
#define TARGET_IEEE_FLOAT 1
@@ -201,10 +201,6 @@ if (INTEGRAL_MODE_P (MODE) && \
#define STRICT_ALIGNMENT 0
-/* real arithmetic */
-
-#define REAL_ARITHMETIC
-
/* Define target floating point format. */
#undef TARGET_FLOAT_FORMAT
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 8d98aa2573b..75e7d5eae3f 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -406,10 +406,6 @@ do { \
/* Target machine storage layout. */
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h
index 61a61d40d3e..ff7c3e716bc 100644
--- a/gcc/config/sparc/freebsd.h
+++ b/gcc/config/sparc/freebsd.h
@@ -56,7 +56,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32
-/* Define for support of TFmode long double and REAL_ARITHMETIC.
+/* Define for support of TFmode long double.
Sparc ABI says that long double is 4 words. */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index d46413339c1..086bcdbdfc8 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -228,7 +228,7 @@ do { \
sprintf (LABEL, "*.L%s%ld", PREFIX, (long)(NUM))
-/* Define for support of TFmode long double and REAL_ARITHMETIC.
+/* Define for support of TFmode long double.
Sparc ABI says that long double is 4 words. */
#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index 31d82042f48..1d5dfa05a69 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -146,7 +146,7 @@ Boston, MA 02111-1307, USA. */
#undef MAX_WCHAR_TYPE_SIZE
-/* Define for support of TFmode long double and REAL_ARITHMETIC.
+/* Define for support of TFmode long double.
Sparc ABI says that long double is 4 words. */
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64)
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
index 1f86a50f5fd..49945849ca6 100644
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -196,7 +196,7 @@ Boston, MA 02111-1307, USA. */
/* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
Instead, it is enabled here, because it does work under Solaris. */
-/* Define for support of TFmode long double and REAL_ARITHMETIC.
+/* Define for support of TFmode long double.
Sparc ABI says that long double is 4 words. */
#define LONG_DOUBLE_TYPE_SIZE 128
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 348d98c5888..c1e472de7d6 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -687,10 +687,6 @@ extern struct sparc_cpu_select sparc_select[];
/* target machine storage layout */
-/* Define for cross-compilation to a sparc target with no TFmode from a host
- with a different float format (e.g. VAX). */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN 1
@@ -732,7 +728,7 @@ extern struct sparc_cpu_select sparc_select[];
#if 0
/* ??? This does not work in SunOS 4.x, so it is not enabled here.
Instead, it is enabled in sol2.h, because it does work under Solaris. */
-/* Define for support of TFmode long double and REAL_ARITHMETIC.
+/* Define for support of TFmode long double.
Sparc ABI says that long double is 4 words. */
#define LONG_DOUBLE_TYPE_SIZE 128
#endif
diff --git a/gcc/config/sparc/vxsim.h b/gcc/config/sparc/vxsim.h
index 94cfb92df10..30d9279df01 100644
--- a/gcc/config/sparc/vxsim.h
+++ b/gcc/config/sparc/vxsim.h
@@ -128,6 +128,6 @@ do { \
/* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
Instead, it is enabled here, because it does work under Solaris. */
-/* Define for support of TFmode long double and REAL_ARITHMETIC.
+/* Define for support of TFmode long double.
Sparc ABI says that long double is 4 words. */
#define LONG_DOUBLE_TYPE_SIZE 64
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index 8f5dbb851d7..846ac246a12 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -2808,30 +2808,6 @@ do { \
is treated as a logical line separator. */
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '|')
-/* These macros are provided by `real.h' for writing the definitions of
- `ASM_OUTPUT_DOUBLE' and the like: */
-
-/* These translate X, of type `REAL_VALUE_TYPE', to the target's floating point
- representation, and store its bit pattern in the array of `long int' whose
- address is L. The number of elements in the output array is determined by
- the size of the desired target floating point data type: 32 bits of it go in
- each `long int' array element. Each array element holds 32 bits of the
- result, even if `long int' is wider than 32 bits on the host machine.
-
- The array element values are designed so that you can print them out using
- `fprintf' in the order they should appear in the target machine's memory. */
-/* #define REAL_VALUE_TO_TARGET_SINGLE(X, L) */
-/* #define REAL_VALUE_TO_TARGET_DOUBLE(X, L) */
-/* #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(X, L) */
-
-/* This macro converts X, of type `REAL_VALUE_TYPE', to a decimal number and
- stores it as a string into STRING. You must pass, as STRING, the address of
- a long enough block of space to hold the result.
-
- The argument FORMAT is a `printf'-specification that serves as a suggestion
- for how to format the output string. */
-/* #define REAL_VALUE_TO_DECIMAL(X, FORMAT, STRING) */
-
/* Output of Uninitialized Variables. */
@@ -3859,10 +3835,6 @@ do { \
/* Miscellaneous Parameters. */
-/* Define REAL_ARITHMETIC to use a software emulator for the target floating
- point mode. Otherwise the host floating point mode is used. */
-#define REAL_ARITHMETIC
-
/* Define this if you have defined special-purpose predicates in the file
`MACHINE.c'. This macro is called within an initializer of an array of
structures. The first field in the structure is the name of a predicate and
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index a42eb74dea3..175fc9ffd5e 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -1360,10 +1360,6 @@ do { \
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-/* Define to use software floating point emulator for REAL_ARITHMETIC and
- decimal <-> binary conversion. */
-#define REAL_ARITHMETIC
-
/* Specify the machine mode that this machine uses
for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? SImode : HImode)
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index ce5d35064dd..87f405c76a9 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -89,8 +89,6 @@ extern int target_flags;
/* Target machine storage layout */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields.
This is not true on the VAX. */
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index 8e049a8f0aa..1083ebc71db 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -221,10 +221,6 @@ extern unsigned xtensa_current_frame_size;
/* Target machine storage layout */
-/* Define in order to support both big and little endian float formats
- in the same gcc binary. */
-#define REAL_ARITHMETIC
-
/* Define this if most significant bit is lowest numbered
in instructions that operate on numbered bit-fields. */
#define BITS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 10b69c846d0..9244d61a6f7 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -247,7 +247,7 @@ in the following sections.
-fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol
-fdump-tree-original@r{[}-@var{n}@r{]} -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
-fdump-tree-inlined@r{[}-@var{n}@r{]} @gol
--fmem-report -fpretend-float @gol
+-fmem-report @gol
-fprofile-arcs -ftest-coverage -ftime-report @gol
-g -g@var{level} -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2 @gol
-ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
@@ -3042,14 +3042,6 @@ Dump after all tree based optimization, to @file{@var{file}.optimized}.
Dump after function inlining, to @file{@var{file}.inlined}.
@end table
-@item -fpretend-float
-@opindex fpretend-float
-When running a cross-compiler, pretend that the target machine uses the
-same floating point format as the host machine. This causes incorrect
-output of the actual floating constants, but the actual instruction
-sequence will probably be the same as GCC would make when running on
-the target machine.
-
@item -save-temps
@opindex save-temps
Store the usual ``temporary'' intermediate files permanently; place them
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 2e8ee707d4d..8d1a3188074 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7678,14 +7678,10 @@ it must have its own special routine to use instead. Also, constant
folding must emulate the target machine's arithmetic (or must not be done
at all).
-The macros in the following table should be defined only if you are cross
-compiling between different floating point formats.
-
-Otherwise, don't define them. Then default definitions will be set up which
-use @code{double} as the data type, @code{==} to test for equality, etc.
-
-You don't need to worry about how many times you use an operand of any
-of these macros. The compiler never uses operands which have side effects.
+The macros in the following table are provided by @file{real.h} for the
+compiler to use. All parts of the compiler which generate or optimize
+floating-point calculations must use these macros. They may evaluate
+their operands more than once, so operands must not have side effects.
@table @code
@findex REAL_VALUE_TYPE
@@ -7766,15 +7762,7 @@ By default, this is defined to call @code{isinf}.
A macro for a C expression which determines whether @var{x}, a floating
point value, is a ``nan'' (not-a-number). The value has type
@code{int}. By default, this is defined to call @code{isnan}.
-@end table
-@cindex constant folding and floating point
-Define the following additional macros if you want to make floating
-point constant folding work while cross compiling. If you don't
-define them, cross compilation is still possible, but constant folding
-will not happen for floating point values.
-
-@table @code
@findex REAL_ARITHMETIC
@item REAL_ARITHMETIC (@var{output}, @var{code}, @var{x}, @var{y})
A macro for a C statement which calculates an arithmetic operation of
@@ -7789,8 +7777,7 @@ which will always be one of the following: @code{PLUS_EXPR},
@code{MAX_EXPR}, @code{MIN_EXPR}.
@cindex overflow while constant folding
-The expansion of this macro is responsible for checking for overflow.
-If overflow happens, the macro expansion should execute the statement
+If overflow happens, the macro expansion executes the statement
@code{return 0;}, which indicates the inability to perform the
arithmetic operation requested.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 6b3a9cb0288..ae3ab5f070e 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -887,94 +887,7 @@ gen_lowpart_common (mode, x)
}
}
-#ifndef REAL_ARITHMETIC
- /* If X is an integral constant but we want it in floating-point, it
- must be the case that we have a union of an integer and a floating-point
- value. If the machine-parameters allow it, simulate that union here
- and return the result. The two-word and single-word cases are
- different. */
-
- else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
- || flag_pretend_float)
- && GET_MODE_CLASS (mode) == MODE_FLOAT
- && GET_MODE_SIZE (mode) == UNITS_PER_WORD
- && GET_CODE (x) == CONST_INT
- && sizeof (float) * HOST_BITS_PER_CHAR == HOST_BITS_PER_WIDE_INT)
- {
- union {HOST_WIDE_INT i; float d; } u;
-
- u.i = INTVAL (x);
- return CONST_DOUBLE_FROM_REAL_VALUE (u.d, mode);
- }
- else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
- || flag_pretend_float)
- && GET_MODE_CLASS (mode) == MODE_FLOAT
- && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
- && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE)
- && GET_MODE (x) == VOIDmode
- && (sizeof (double) * HOST_BITS_PER_CHAR
- == 2 * HOST_BITS_PER_WIDE_INT))
- {
- union {HOST_WIDE_INT i[2]; double d; } u;
- HOST_WIDE_INT low, high;
-
- if (GET_CODE (x) == CONST_INT)
- low = INTVAL (x), high = low >> (HOST_BITS_PER_WIDE_INT -1);
- else
- low = CONST_DOUBLE_LOW (x), high = CONST_DOUBLE_HIGH (x);
-#ifdef HOST_WORDS_BIG_ENDIAN
- u.i[0] = high, u.i[1] = low;
-#else
- u.i[0] = low, u.i[1] = high;
-#endif
- return CONST_DOUBLE_FROM_REAL_VALUE (u.d, mode);
- }
-
- /* Similarly, if this is converting a floating-point value into a
- single-word integer. Only do this is the host and target parameters are
- compatible. */
-
- else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
- || flag_pretend_float)
- && (GET_MODE_CLASS (mode) == MODE_INT
- || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT)
- && GET_CODE (x) == CONST_DOUBLE
- && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT
- && GET_MODE_BITSIZE (mode) == BITS_PER_WORD)
- return constant_subword (x, (offset / UNITS_PER_WORD), GET_MODE (x));
-
- /* Similarly, if this is converting a floating-point value into a
- two-word integer, we can do this one word at a time and make an
- integer. Only do this is the host and target parameters are
- compatible. */
-
- else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
- || flag_pretend_float)
- && (GET_MODE_CLASS (mode) == MODE_INT
- || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT)
- && GET_CODE (x) == CONST_DOUBLE
- && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT
- && GET_MODE_BITSIZE (mode) == 2 * BITS_PER_WORD)
- {
- rtx lowpart, highpart;
-
- lowpart = constant_subword (x,
- (offset / UNITS_PER_WORD) + WORDS_BIG_ENDIAN,
- GET_MODE (x));
- highpart = constant_subword (x,
- (offset / UNITS_PER_WORD) + (! WORDS_BIG_ENDIAN),
- GET_MODE (x));
- if (lowpart && GET_CODE (lowpart) == CONST_INT
- && highpart && GET_CODE (highpart) == CONST_INT)
- return immed_double_const (INTVAL (lowpart), INTVAL (highpart), mode);
- }
-#else /* ifndef REAL_ARITHMETIC */
-
- /* When we have a FP emulator, we can handle all conversions between
+ /* The floating-point emulator can handle all conversions between
FP and integer operands. This simplifies reload because it
doesn't have to deal with constructs like (subreg:DI
(const_double:SF ...)) or (subreg:DF (const_int ...)). */
@@ -1076,7 +989,6 @@ gen_lowpart_common (mode, x)
mode);
#endif
}
-#endif /* ifndef REAL_ARITHMETIC */
/* Otherwise, we can't do this. */
return 0;
@@ -1310,7 +1222,6 @@ constant_subword (op, offset, mode)
&& GET_MODE_SIZE (mode) == UNITS_PER_WORD)
return op;
-#ifdef REAL_ARITHMETIC
/* The output is some bits, the width of the target machine's word.
A wider-word host can surely hold them in a CONST_INT. A narrower-word
host can't. */
@@ -1389,32 +1300,10 @@ constant_subword (op, offset, mode)
else
abort ();
}
-#else /* no REAL_ARITHMETIC */
- if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
- || flag_pretend_float)
- && GET_MODE_CLASS (mode) == MODE_FLOAT
- && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
- && GET_CODE (op) == CONST_DOUBLE)
- {
- /* The constant is stored in the host's word-ordering,
- but we want to access it in the target's word-ordering. Some
- compilers don't like a conditional inside macro args, so we have two
- copies of the return. */
-#ifdef HOST_WORDS_BIG_ENDIAN
- return GEN_INT (offset == WORDS_BIG_ENDIAN
- ? CONST_DOUBLE_HIGH (op) : CONST_DOUBLE_LOW (op));
-#else
- return GEN_INT (offset != WORDS_BIG_ENDIAN
- ? CONST_DOUBLE_HIGH (op) : CONST_DOUBLE_LOW (op));
-#endif
- }
-#endif /* no REAL_ARITHMETIC */
/* Single word float is a little harder, since single- and double-word
values often do not have the same high-order bits. We have already
verified that we want the only defined word of the single-word value. */
-#ifdef REAL_ARITHMETIC
if (GET_MODE_CLASS (mode) == MODE_FLOAT
&& GET_MODE_BITSIZE (mode) == 32
&& GET_CODE (op) == CONST_DOUBLE)
@@ -1438,40 +1327,6 @@ constant_subword (op, offset, mode)
return GEN_INT (val);
}
-#else
- if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
- || flag_pretend_float)
- && sizeof (float) * 8 == HOST_BITS_PER_WIDE_INT
- && GET_MODE_CLASS (mode) == MODE_FLOAT
- && GET_MODE_SIZE (mode) == UNITS_PER_WORD
- && GET_CODE (op) == CONST_DOUBLE)
- {
- double d;
- union {float f; HOST_WIDE_INT i; } u;
-
- REAL_VALUE_FROM_CONST_DOUBLE (d, op);
-
- u.f = d;
- return GEN_INT (u.i);
- }
- if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
- && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD)
- || flag_pretend_float)
- && sizeof (double) * 8 == HOST_BITS_PER_WIDE_INT
- && GET_MODE_CLASS (mode) == MODE_FLOAT
- && GET_MODE_SIZE (mode) == UNITS_PER_WORD
- && GET_CODE (op) == CONST_DOUBLE)
- {
- double d;
- union {double d; HOST_WIDE_INT i; } u;
-
- REAL_VALUE_FROM_CONST_DOUBLE (d, op);
-
- u.d = d;
- return GEN_INT (u.i);
- }
-#endif /* no REAL_ARITHMETIC */
/* The only remaining cases that we can handle are integers.
Convert to proper endianness now since these cases need it.
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 94cf6911a57..0b910d7b9c9 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-03 Zack Weinberg <zack@codesourcery.com>
+
+ * com.c, target.h: Remove all #ifndef REAL_ARITHMETIC
+ blocks, make all #ifdef REAL_ARITHMETIC blocks unconditional.
+ Delete some further #ifdef blocks predicated on REAL_ARITHMETIC.
+
Thu Feb 28 07:53:46 2002 Neil Booth <neil@daikokuya.demon.co.uk>
* com.c (copy_lang_decl): Delete.
diff --git a/gcc/f/com.c b/gcc/f/com.c
index d1e769a21bc..f64df2bd740 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -11799,11 +11799,7 @@ ffecom_init_0 ()
{
REAL_VALUE_TYPE point_5;
-#ifdef REAL_ARITHMETIC
REAL_ARITHMETIC (point_5, RDIV_EXPR, dconst1, dconst2);
-#else
- point_5 = .5;
-#endif
ffecom_float_half_ = build_real (float_type_node, point_5);
ffecom_double_half_ = build_real (double_type_node, point_5);
}
diff --git a/gcc/f/target.h b/gcc/f/target.h
index 85b385def52..1c50b1c2fa5 100644
--- a/gcc/f/target.h
+++ b/gcc/f/target.h
@@ -38,16 +38,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#endif
#endif
-/* For now, g77 requires the ability to determine the exact bit pattern
- of a float on the target machine. (Hopefully this will be changed
- soon). Make sure we can do this. */
-
-#if !defined (REAL_ARITHMETIC) \
- && ((TARGET_FLOAT_FORMAT != HOST_FLOAT_FORMAT) \
- || (FLOAT_WORDS_BIG_ENDIAN != HOST_FLOAT_WORDS_BIG_ENDIAN))
-#error "g77 requires ability to access exact FP representation of target machine"
-#endif
-
/* Simple definitions and enumerations. */
#define FFETARGET_charactersizeNONE (-1)
@@ -333,7 +323,6 @@ typedef ? ffetargetLogical8;
?
#endif
#if FFETARGET_okREAL1
-#ifdef REAL_ARITHMETIC
#ifdef FFETARGET_32bit_longs
typedef long int ffetargetReal1;
#define ffetargetReal1_f "l"
@@ -351,13 +340,8 @@ typedef int ffetargetReal1;
REAL_VALUE_TO_TARGET_SINGLE ((in), _tmp); \
(out) = (ffetargetReal1) _tmp; })
#endif
-#else /* REAL_ARITHMETIC */
-typedef float ffetargetReal1;
-#define ffetargetReal1_f ""
-#endif /* REAL_ARITHMETIC */
#endif
#if FFETARGET_okREAL2
-#ifdef REAL_ARITHMETIC
#ifdef FFETARGET_32bit_longs
typedef struct
{
@@ -387,63 +371,29 @@ ffetargetReal2;
(out)[0] = (int) (_tmp[0]); \
(out)[1] = (int) (_tmp[1]); })
#endif
-#else
-typedef double ffetargetReal2;
-#define ffetargetReal2_f ""
-#endif
#endif
#if FFETARGET_okREAL3
-#ifdef REAL_ARITHMETIC
typedef long ffetargetReal3[?];
-#else
-typedef ? ffetargetReal3;
-#define ffetargetReal3_f
-#endif
?
#endif
#if FFETARGET_okREAL4
-#ifdef REAL_ARITHMETIC
typedef long ffetargetReal4[?];
-#else
-typedef ? ffetargetReal4;
-#define ffetargetReal4_f
-#endif
?
#endif
#if FFETARGET_okREAL5
-#ifdef REAL_ARITHMETIC
typedef long ffetargetReal5[?];
-#else
-typedef ? ffetargetReal5;
-#define ffetargetReal5_f
-#endif
?
#endif
#if FFETARGET_okREAL6
-#ifdef REAL_ARITHMETIC
typedef long ffetargetReal6[?];
-#else
-typedef ? ffetargetReal6;
-#define ffetargetReal6_f
-#endif
?
#endif
#if FFETARGET_okREAL7
-#ifdef REAL_ARITHMETIC
typedef long ffetargetReal7[?];
-#else
-typedef ? ffetargetReal7;
-#define ffetargetReal7_f
-#endif
?
#endif
#if FFETARGET_okREAL8
-#ifdef REAL_ARITHMETIC
typedef long ffetargetReal8[?];
-#else
-typedef ? ffetargetReal8;
-#define ffetargetReal8_f
-#endif
?
#endif
#if FFETARGET_okCOMPLEX1
@@ -864,7 +814,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
REAL_VALUE_FROM_INT (resr, (long) lf, (long) ((lf < 0) ? -1 : 0), \
((kt == 1) ? SFmode : DFmode))
-#ifdef REAL_ARITHMETIC
#define ffetarget_add_complex1(res,l,r) \
({ REAL_VALUE_TYPE lr, li, rr, ri, resr, resi; \
lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
@@ -887,19 +836,10 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
FFEBAD; })
-#else
-#define ffetarget_add_complex1(res,l,r) \
- ((res)->real = (l).real + (r).real, \
- (res)->imaginary = (l).imaginary + (r).imaginary, FFEBAD)
-#define ffetarget_add_complex2(res,l,r) \
- ((res)->real = (l).real + (r).real, \
- (res)->imaginary = (l).imaginary + (r).imaginary, FFEBAD)
-#endif
#define ffetarget_add_integer1(res,l,r) (*(res) = (l) + (r), FFEBAD)
#define ffetarget_add_integer2(res,l,r) (*(res) = (l) + (r), FFEBAD)
#define ffetarget_add_integer3(res,l,r) (*(res) = (l) + (r), FFEBAD)
#define ffetarget_add_integer4(res,l,r) (*(res) = (l) + (r), FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_add_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr, resr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -914,10 +854,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
REAL_ARITHMETIC (resr, PLUS_EXPR, lr, rr); \
ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
FFEBAD; })
-#else
-#define ffetarget_add_real1(res,l,r) (*(res) = (l) + (r), FFEBAD)
-#define ffetarget_add_real2(res,l,r) (*(res) = (l) + (r), FFEBAD)
-#endif
#define ffetarget_aggregate_ptr_memcpy(dbt,dkt,sbt,skt) \
((ffetargetCopyfunc) ffetarget_memcpy_)
#define ffetarget_and_integer1(res,l,r) (*(res) = (l) & (r), FFEBAD)
@@ -961,7 +897,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_complex1_typeless(res,l) \
ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex1_complex2(res,l) \
({ REAL_VALUE_TYPE lr, li; \
lr = ffetarget_cvt_r2_to_rv_ (&((l).real.v[0])); \
@@ -969,11 +904,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r1_ (lr, (res)->real); \
ffetarget_cvt_rv_to_r1_ (li, (res)->imaginary), \
FFEBAD; })
-#else
-#define ffetarget_convert_complex1_complex2(res,l) \
- ((res)->real = (l).real, (res)->imaginary = (l).imaginary, FFEBAD)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex1_integer(res,l) \
({ REAL_VALUE_TYPE resi, resr; \
ffetargetInteger1 lf = (l); \
@@ -982,19 +912,10 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r1_ (resr, (res)->real); \
ffetarget_cvt_rv_to_r1_ (resi, (res)->imaginary); \
FFEBAD; })
-#else
-#define ffetarget_convert_complex1_integer(res,l) \
- ((res)->real = (l), (res)->imaginary = 0, FFEBAD)
-#endif
#define ffetarget_convert_complex1_integer1 ffetarget_convert_complex1_integer
#define ffetarget_convert_complex1_integer2 ffetarget_convert_complex1_integer
#define ffetarget_convert_complex1_integer3 ffetarget_convert_complex1_integer
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex1_integer4(res,l) FFEBAD_NOCANDO
-#else
-#define ffetarget_convert_complex1_integer4 ffetarget_convert_complex1_integer
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex1_real1(res,l) \
((res)->real = (l), \
ffetarget_cvt_rv_to_r1_ (dconst0, (res)->imaginary), \
@@ -1005,19 +926,12 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r1_ (lr, (res)->real); \
ffetarget_cvt_rv_to_r1_ (dconst0, (res)->imaginary), \
FFEBAD; })
-#else
-#define ffetarget_convert_complex1_real1(res,l) \
- ((res)->real = (l), (res)->imaginary = 0, FFEBAD)
-#define ffetarget_convert_complex1_real2(res,l) \
- ((res)->real = (l), (res)->imaginary = 0, FFEBAD)
-#endif
#define ffetarget_convert_complex2_character1(res,l) \
ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_complex2_hollerith(res,l) \
ffetarget_convert_any_hollerith_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_complex2_typeless(res,l) \
ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex2_complex1(res,l) \
({ REAL_VALUE_TYPE lr, li; \
lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
@@ -1025,11 +939,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r2_ (lr, &((res)->real.v[0])); \
ffetarget_cvt_rv_to_r2_ (li, &((res)->imaginary.v[0])), \
FFEBAD; })
-#else
-#define ffetarget_convert_complex2_complex1(res,l) \
- ((res)->real = (l).real, (res)->imaginary = (l).imaginary, FFEBAD)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex2_integer(res,l) \
({ REAL_VALUE_TYPE resi, resr; \
ffetargetInteger1 lf = (l); \
@@ -1038,19 +947,10 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
FFEBAD; })
-#else
-#define ffetarget_convert_complex2_integer(res,l) \
- ((res)->real = (l), (res)->imaginary = 0, FFEBAD)
-#endif
#define ffetarget_convert_complex2_integer1 ffetarget_convert_complex2_integer
#define ffetarget_convert_complex2_integer2 ffetarget_convert_complex2_integer
#define ffetarget_convert_complex2_integer3 ffetarget_convert_complex2_integer
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex2_integer4(res,l) FFEBAD_NOCANDO
-#else
-#define ffetarget_convert_complex2_integer4 ffetarget_convert_complex2_integer
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_complex2_real1(res,l) \
({ REAL_VALUE_TYPE lr; \
lr = ffetarget_cvt_r1_to_rv_ (l); \
@@ -1061,12 +961,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
((res)->real = (l), \
ffetarget_cvt_rv_to_r2_ (dconst0, &((res)->imaginary.v[0])), \
FFEBAD)
-#else
-#define ffetarget_convert_complex2_real1(res,l) \
- ((res)->real = (l), (res)->imaginary = 0, FFEBAD)
-#define ffetarget_convert_complex2_real2(res,l) \
- ((res)->real = (l), (res)->imaginary = 0, FFEBAD)
-#endif
#define ffetarget_convert_integer2_character1(res,l) \
ffetarget_convert_integer1_character1(res,l)
#define ffetarget_convert_integer2_complex1(res,l) \
@@ -1119,15 +1013,8 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_integer1_typeless(res,l)
#define ffetarget_convert_integer4_character1(res,l) \
ffetarget_convert_integer1_character1(res,l)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_integer4_complex1(res,l) FFEBAD_NOCANDO
#define ffetarget_convert_integer4_complex2(res,l) FFEBAD_NOCANDO
-#else
-#define ffetarget_convert_integer4_complex1(res,l) \
- ffetarget_convert_integer1_complex1(res,l)
-#define ffetarget_convert_integer4_complex2(res,l) \
- ffetarget_convert_integer1_complex2(res,l)
-#endif
#define ffetarget_convert_integer4_hollerith(res,l) \
ffetarget_convert_integer1_hollerith(res,l)
#define ffetarget_convert_integer4_integer1(res,l) (*(res) = (l), FFEBAD)
@@ -1141,15 +1028,8 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_integer1_logical1(res,l)
#define ffetarget_convert_integer4_logical4(res,l) \
ffetarget_convert_integer1_logical1(res,l)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_integer4_real1(res,l) FFEBAD_NOCANDO
#define ffetarget_convert_integer4_real2(res,l) FFEBAD_NOCANDO
-#else
-#define ffetarget_convert_integer4_real1(res,l) \
- ffetarget_convert_integer1_real1(res,l)
-#define ffetarget_convert_integer4_real2(res,l) \
- ffetarget_convert_integer1_real2(res,l)
-#endif
#define ffetarget_convert_integer4_typeless(res,l) \
ffetarget_convert_integer1_typeless(res,l)
#define ffetarget_convert_logical1_character1(res,l) \
@@ -1217,7 +1097,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
#define ffetarget_convert_integer1_logical2(res,l) (*(res) = (l), FFEBAD)
#define ffetarget_convert_integer1_logical3(res,l) (*(res) = (l), FFEBAD)
#define ffetarget_convert_integer1_logical4(res,l) (*(res) = (l), FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_integer1_real1(res,l) \
({ REAL_VALUE_TYPE lr; \
lr = ffetarget_cvt_r1_to_rv_ (l); \
@@ -1242,12 +1121,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
REAL_VALUE_TO_INT (&ffetarget_long_val_, &ffetarget_long_junk_, lr); \
*(res) = ffetarget_long_val_; \
FFEBAD; })
-#else
-#define ffetarget_convert_integer1_real1(res,l) (*(res) = (l), FFEBAD)
-#define ffetarget_convert_integer1_real2(res,l) (*(res) = (l), FFEBAD)
-#define ffetarget_convert_integer1_complex1(res,l) (*(res) = (l).real, FFEBAD)
-#define ffetarget_convert_integer1_complex2(res,l) (*(res) = (l).real, FFEBAD)
-#endif
#define ffetarget_convert_real1_character1(res,l) \
ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_real1_hollerith(res,l) \
@@ -1256,36 +1129,23 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_real1_integer1(res,l)
#define ffetarget_convert_real1_integer3(res,l) \
ffetarget_convert_real1_integer1(res,l)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_real1_integer4(res,l) FFEBAD_NOCANDO
-#else
-#define ffetarget_convert_real1_integer4(res,l) \
- ffetarget_convert_real1_integer1(res,l)
-#endif
#define ffetarget_convert_real1_typeless(res,l) \
ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_real1_complex1(res,l) (*(res) = (l).real, FFEBAD)
#define ffetarget_convert_real1_complex2(res,l) \
ffetarget_convert_real1_real2 ((res), (l).real)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_real1_integer1(res,l) \
({ REAL_VALUE_TYPE resr; \
ffetargetInteger1 lf = (l); \
FFETARGET_REAL_VALUE_FROM_INT_ (resr, lf, 1); \
ffetarget_cvt_rv_to_r1_ (resr, *(res)); \
FFEBAD; })
-#else
-#define ffetarget_convert_real1_integer1(res,l) (*(res) = (l), FFEBAD)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_real1_real2(res,l) \
({ REAL_VALUE_TYPE lr; \
lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
ffetarget_cvt_rv_to_r1_ (lr, *(res)); \
FFEBAD; })
-#else
-#define ffetarget_convert_real1_real2(res,l) (*(res) = (l), FFEBAD)
-#endif
#define ffetarget_convert_real2_character1(res,l) \
ffetarget_convert_any_character1_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_real2_hollerith(res,l) \
@@ -1294,18 +1154,12 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_convert_real2_integer1(res,l)
#define ffetarget_convert_real2_integer3(res,l) \
ffetarget_convert_real2_integer1(res,l)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_real2_integer4(res,l) FFEBAD_NOCANDO
-#else
-#define ffetarget_convert_real2_integer4(res,l) \
- ffetarget_convert_real2_integer1(res,l)
-#endif
#define ffetarget_convert_real2_typeless(res,l) \
ffetarget_convert_any_typeless_ ((char *) (res), sizeof(*(res)), l)
#define ffetarget_convert_real2_complex1(res,l) \
ffetarget_convert_real2_real1 ((res), (l).real)
#define ffetarget_convert_real2_complex2(res,l) (*(res) = (l).real, FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_real2_integer(res,l) \
({ REAL_VALUE_TYPE resr; \
ffetargetInteger1 lf = (l); \
@@ -1313,18 +1167,11 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
FFEBAD; })
#define ffetarget_convert_real2_integer1 ffetarget_convert_real2_integer
-#else
-#define ffetarget_convert_real2_integer1(res,l) (*(res) = (l), FFEBAD)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_convert_real2_real1(res,l) \
({ REAL_VALUE_TYPE lr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
ffetarget_cvt_rv_to_r2_ (lr, &((res)->v[0])); \
FFEBAD; })
-#else
-#define ffetarget_convert_real2_real1(res,l) (*(res) = (l), FFEBAD)
-#endif
#define ffetarget_divide_integer1(res,l,r) \
(((r) == 0) ? (*(res) = 0, FFEBAD_DIV_BY_ZERO) \
: (*(res) = (l) / (r), FFEBAD))
@@ -1334,7 +1181,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_divide_integer1(res,l,r)
#define ffetarget_divide_integer4(res,l,r) \
ffetarget_divide_integer1(res,l,r)
-#ifdef REAL_ARITHMETIC
#define ffetarget_divide_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr, resr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1361,15 +1207,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
FFEBAD; \
}); \
})
-#else
-#define ffetarget_divide_real1(res,l,r) \
- (((r) == 0) ? (*(res) = 0, FFEBAD_DIV_BY_ZERO) \
- : (*(res) = (l) / (r), FFEBAD))
-#define ffetarget_divide_real2(res,l,r) \
- (((r) == 0) ? (*(res) = 0, FFEBAD_DIV_BY_ZERO) \
- : (*(res) = (l) / (r), FFEBAD))
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_eq_complex1(res,l,r) \
({ REAL_VALUE_TYPE lr, li, rr, ri; \
lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
@@ -1388,14 +1225,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
*(res) = (REAL_VALUES_EQUAL (lr, rr) && REAL_VALUES_EQUAL (li, ri)) \
? TRUE : FALSE; \
FFEBAD; })
-#else
-#define ffetarget_eq_complex1(res,l,r) \
- (*(res) = (((l).real == (r).real) && ((l).imaginary == (r).imaginary)) \
- ? TRUE : FALSE, FFEBAD)
-#define ffetarget_eq_complex2(res,l,r) \
- (*(res) = (((l).real == (r).real) && ((l).imaginary == (r).imaginary)) \
- ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_eq_integer1(res,l,r) \
(*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_eq_integer2(res,l,r) \
@@ -1404,7 +1233,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
(*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_eq_integer4(res,l,r) \
(*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_eq_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1417,12 +1245,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
*(res) = REAL_VALUES_EQUAL (lr, rr) ? TRUE : FALSE; \
FFEBAD; })
-#else
-#define ffetarget_eq_real1(res,l,r) \
- (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
-#define ffetarget_eq_real2(res,l,r) \
- (*(res) = ((l) == (r)) ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_eqv_integer1(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD)
#define ffetarget_eqv_integer2(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD)
#define ffetarget_eqv_integer3(res,l,r) (*(res) = (l) ^ ~(r), FFEBAD)
@@ -1439,7 +1261,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
(*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_ge_integer4(res,l,r) \
(*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_ge_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1452,12 +1273,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
*(res) = REAL_VALUES_LESS (lr, rr) ? FALSE : TRUE; \
FFEBAD; })
-#else
-#define ffetarget_ge_real1(res,l,r) \
- (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
-#define ffetarget_ge_real2(res,l,r) \
- (*(res) = ((l) >= (r)) ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_gt_integer1(res,l,r) \
(*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_gt_integer2(res,l,r) \
@@ -1466,7 +1281,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
(*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_gt_integer4(res,l,r) \
(*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_gt_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1481,12 +1295,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
*(res) = (REAL_VALUES_LESS (lr, rr) || REAL_VALUES_EQUAL (lr, rr)) \
? FALSE : TRUE; \
FFEBAD; })
-#else
-#define ffetarget_gt_real1(res,l,r) \
- (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
-#define ffetarget_gt_real2(res,l,r) \
- (*(res) = ((l) > (r)) ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_hexxmil(v,t) ffetarget_typeless_hex (v, t)
#define ffetarget_hexxvxt(v,t) ffetarget_typeless_hex (v, t)
#define ffetarget_hexzmil(v,t) ffetarget_typeless_hex (v, t)
@@ -1503,7 +1311,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
#define ffetarget_integerdefault_is_magical(i) \
(((unsigned int) i) == FFETARGET_integerBIG_MAGICAL)
#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_iszero_real1(l) \
({ REAL_VALUE_TYPE lr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1514,10 +1321,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
lr = ffetarget_cvt_r2_to_rv_ (&((l).v[0])); \
REAL_VALUES_EQUAL (lr, dconst0); \
})
-#else
-#define ffetarget_iszero_real1(l) ((l) == 0.)
-#define ffetarget_iszero_real2(l) ((l) == 0.)
-#endif
#define ffetarget_iszero_typeless(l) ((l) == 0)
#define ffetarget_logical1(v,truth) (*(v) = truth ? 1 : 0)
#define ffetarget_le_integer1(res,l,r) \
@@ -1528,7 +1331,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
(*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_le_integer4(res,l,r) \
(*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_le_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1543,12 +1345,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
*(res) = (REAL_VALUES_LESS (lr, rr) || REAL_VALUES_EQUAL (lr, rr)) \
? TRUE : FALSE; \
FFEBAD; })
-#else
-#define ffetarget_le_real1(res,l,r) \
- (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
-#define ffetarget_le_real2(res,l,r) \
- (*(res) = ((l) <= (r)) ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_lt_integer1(res,l,r) \
(*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_lt_integer2(res,l,r) \
@@ -1557,7 +1353,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
(*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_lt_integer4(res,l,r) \
(*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_lt_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1570,28 +1365,16 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
*(res) = REAL_VALUES_LESS (lr, rr) ? TRUE : FALSE; \
FFEBAD; })
-#else
-#define ffetarget_lt_real1(res,l,r) \
- (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
-#define ffetarget_lt_real2(res,l,r) \
- (*(res) = ((l) < (r)) ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_length_character1(c) ((c).length)
#define ffetarget_length_characterdefault ffetarget_length_character1
-#ifdef REAL_ARITHMETIC
#define ffetarget_make_real1(res,lr) \
ffetarget_cvt_rv_to_r1_ ((lr), *(res))
#define ffetarget_make_real2(res,lr) \
ffetarget_cvt_rv_to_r2_ ((lr), &((res)->v[0]))
-#else
-#define ffetarget_make_real1(res,lr) (*(res) = (lr))
-#define ffetarget_make_real2(res,lr) (*(res) = (lr))
-#endif
#define ffetarget_multiply_integer1(res,l,r) (*(res) = (l) * (r), FFEBAD)
#define ffetarget_multiply_integer2(res,l,r) (*(res) = (l) * (r), FFEBAD)
#define ffetarget_multiply_integer3(res,l,r) (*(res) = (l) * (r), FFEBAD)
#define ffetarget_multiply_integer4(res,l,r) (*(res) = (l) * (r), FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_multiply_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr, resr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1606,11 +1389,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
REAL_ARITHMETIC (resr, MULT_EXPR, lr, rr); \
ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
FFEBAD; })
-#else
-#define ffetarget_multiply_real1(res,l,r) (*(res) = (l) * (r), FFEBAD)
-#define ffetarget_multiply_real2(res,l,r) (*(res) = (l) * (r), FFEBAD)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_ne_complex1(res,l,r) \
({ REAL_VALUE_TYPE lr, li, rr, ri; \
lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
@@ -1629,14 +1407,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
*(res) = (REAL_VALUES_EQUAL (lr, rr) && REAL_VALUES_EQUAL (li, ri)) \
? FALSE : TRUE; \
FFEBAD; })
-#else
-#define ffetarget_ne_complex1(res,l,r) \
- (*(res) = (((l).real != (r).real) || ((l).imaginary != (r).imaginary)) \
- ? TRUE : FALSE, FFEBAD)
-#define ffetarget_ne_complex2(res,l,r) \
- (*(res) = (((l).real != (r).real) || ((l).imaginary != (r).imaginary)) \
- ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_ne_integer1(res,l,r) \
(*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_ne_integer2(res,l,r) \
@@ -1645,7 +1415,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
(*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
#define ffetarget_ne_integer4(res,l,r) \
(*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_ne_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1658,12 +1427,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
rr = ffetarget_cvt_r2_to_rv_ (&((r).v[0])); \
*(res) = REAL_VALUES_EQUAL (lr, rr) ? FALSE : TRUE; \
FFEBAD; })
-#else
-#define ffetarget_ne_real1(res,l,r) \
- (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
-#define ffetarget_ne_real2(res,l,r) \
- (*(res) = ((l) != (r)) ? TRUE : FALSE, FFEBAD)
-#endif
#define ffetarget_neqv_integer1(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
#define ffetarget_neqv_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
#define ffetarget_neqv_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
@@ -1719,7 +1482,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
fprintf ((f), "%" ffetargetLogical4_f "d", (v))
#define ffetarget_print_octalmil(f,v) ffetarget_print_octal(f,v)
#define ffetarget_print_octalvxt(f,v) ffetarget_print_octal(f,v)
-#ifdef REAL_ARITHMETIC
#define ffetarget_print_real1(f,l) \
({ REAL_VALUE_TYPE lr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1732,38 +1494,16 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
REAL_VALUE_TO_DECIMAL (lr, bad_fmt_val??, ffetarget_string_); \
fputs (ffetarget_string_, (f)); \
})
-#else
-#define ffetarget_print_real1(f,v) \
- fprintf ((f), "%" ffetargetReal1_f "g", (v))
-#define ffetarget_print_real2(f,v) \
- fprintf ((f), "%" ffetargetReal2_f "g", (v))
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_real1_one(res) ffetarget_cvt_rv_to_r1_ (dconst1, *(res))
#define ffetarget_real2_one(res) ffetarget_cvt_rv_to_r2_ (dconst1, &((res)->v[0]))
-#else
-#define ffetarget_real1_one(res) (*(res) = (float) 1.)
-#define ffetarget_real2_one(res) (*(res) = 1.)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_real1_two(res) ffetarget_cvt_rv_to_r1_ (dconst2, *(res))
#define ffetarget_real2_two(res) ffetarget_cvt_rv_to_r2_ (dconst2, &((res)->v[0]))
-#else
-#define ffetarget_real1_two(res) (*(res) = (float) 2.)
-#define ffetarget_real2_two(res) (*(res) = 2.)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_real1_zero(res) ffetarget_cvt_rv_to_r1_ (dconst0, *(res))
#define ffetarget_real2_zero(res) ffetarget_cvt_rv_to_r2_ (dconst0, &((res)->v[0]))
-#else
-#define ffetarget_real1_zero(res) (*(res) = (float) 0.)
-#define ffetarget_real2_zero(res) (*(res) = 0.)
-#endif
#define ffetarget_size_typeless_binary(t) ((ffetarget_num_digits_(t) + 7) / 8)
#define ffetarget_size_typeless_octal(t) \
((ffetarget_num_digits_(t) * 3 + 7) / 8)
#define ffetarget_size_typeless_hex(t) ((ffetarget_num_digits_(t) + 1) / 2)
-#ifdef REAL_ARITHMETIC
#define ffetarget_subtract_complex1(res,l,r) \
({ REAL_VALUE_TYPE lr, li, rr, ri, resr, resi; \
lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
@@ -1786,19 +1526,10 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
FFEBAD; })
-#else
-#define ffetarget_subtract_complex1(res,l,r) \
- ((res)->real = (l).real - (r).real, \
- (res)->imaginary = (l).imaginary - (r).imaginary, FFEBAD)
-#define ffetarget_subtract_complex2(res,l,r) \
- ((res)->real = (l).real - (r).real, \
- (res)->imaginary = (l).imaginary - (r).imaginary, FFEBAD)
-#endif
#define ffetarget_subtract_integer1(res,l,r) (*(res) = (l) - (r), FFEBAD)
#define ffetarget_subtract_integer2(res,l,r) (*(res) = (l) - (r), FFEBAD)
#define ffetarget_subtract_integer3(res,l,r) (*(res) = (l) - (r), FFEBAD)
#define ffetarget_subtract_integer4(res,l,r) (*(res) = (l) - (r), FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_subtract_real1(res,l,r) \
({ REAL_VALUE_TYPE lr, rr, resr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1813,10 +1544,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
REAL_ARITHMETIC (resr, MINUS_EXPR, lr, rr); \
ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
FFEBAD; })
-#else
-#define ffetarget_subtract_real1(res,l,r) (*(res) = (l) - (r), FFEBAD)
-#define ffetarget_subtract_real2(res,l,r) (*(res) = (l) - (r), FFEBAD)
-#endif
#define ffetarget_terminate_0()
#define ffetarget_terminate_1()
#define ffetarget_terminate_2()
@@ -1824,7 +1551,6 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
#define ffetarget_terminate_4()
#define ffetarget_text_character1(c) ((c).text)
#define ffetarget_text_characterdefault ffetarget_text_character1
-#ifdef REAL_ARITHMETIC
#define ffetarget_uminus_complex1(res,l) \
({ REAL_VALUE_TYPE lr, li, resr, resi; \
lr = ffetarget_cvt_r1_to_rv_ ((l).real); \
@@ -1843,17 +1569,10 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
ffetarget_cvt_rv_to_r2_ (resr, &((res)->real.v[0])); \
ffetarget_cvt_rv_to_r2_ (resi, &((res)->imaginary.v[0])); \
FFEBAD; })
-#else
-#define ffetarget_uminus_complex1(res,l) \
- ((res)->real = -(l).real, (res)->imaginary = -(l).imaginary, FFEBAD)
-#define ffetarget_uminus_complex2(res,l) \
- ((res)->real = -(l).real, (res)->imaginary = -(l).imaginary, FFEBAD)
-#endif
#define ffetarget_uminus_integer1(res,l) (*(res) = -(l), FFEBAD)
#define ffetarget_uminus_integer2(res,l) (*(res) = -(l), FFEBAD)
#define ffetarget_uminus_integer3(res,l) (*(res) = -(l), FFEBAD)
#define ffetarget_uminus_integer4(res,l) (*(res) = -(l), FFEBAD)
-#ifdef REAL_ARITHMETIC
#define ffetarget_uminus_real1(res,l) \
({ REAL_VALUE_TYPE lr, resr; \
lr = ffetarget_cvt_r1_to_rv_ ((l)); \
@@ -1866,17 +1585,8 @@ void *ffetarget_memcpy_ (void *dst, void *src, size_t len);
resr = REAL_VALUE_NEGATE (lr); \
ffetarget_cvt_rv_to_r2_ (resr, &((res)->v[0])); \
FFEBAD; })
-#else
-#define ffetarget_uminus_real1(res,l) (*(res) = -(l), FFEBAD)
-#define ffetarget_uminus_real2(res,l) (*(res) = -(l), FFEBAD)
-#endif
-#ifdef REAL_ARITHMETIC
#define ffetarget_value_real1(lr) ffetarget_cvt_r1_to_rv_ ((lr))
#define ffetarget_value_real2(lr) ffetarget_cvt_r2_to_rv_ (&((lr).v[0]))
-#else
-#define ffetarget_value_real1
-#define ffetarget_value_real2
-#endif
#define ffetarget_xor_integer1(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
#define ffetarget_xor_integer2(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
#define ffetarget_xor_integer3(res,l,r) (*(res) = (l) ^ (r), FFEBAD)
diff --git a/gcc/final.c b/gcc/final.c
index 5b9f0f0358a..47dd4555644 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -3771,7 +3771,6 @@ split_double (value, first, second)
}
else
{
-#ifdef REAL_ARITHMETIC
REAL_VALUE_TYPE r;
long l[2];
REAL_VALUE_FROM_CONST_DOUBLE (r, value);
@@ -3800,30 +3799,6 @@ split_double (value, first, second)
*first = GEN_INT ((HOST_WIDE_INT) l[0]);
*second = GEN_INT ((HOST_WIDE_INT) l[1]);
-#else
- if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
- && ! flag_pretend_float)
- abort ();
-
- if (
-#ifdef HOST_WORDS_BIG_ENDIAN
- WORDS_BIG_ENDIAN
-#else
- ! WORDS_BIG_ENDIAN
-#endif
- )
- {
- /* Host and target agree => no need to swap. */
- *first = GEN_INT (CONST_DOUBLE_LOW (value));
- *second = GEN_INT (CONST_DOUBLE_HIGH (value));
- }
- else
- {
- *second = GEN_INT (CONST_DOUBLE_LOW (value));
- *first = GEN_INT (CONST_DOUBLE_HIGH (value));
- }
-#endif /* no REAL_ARITHMETIC */
}
}
diff --git a/gcc/flags.h b/gcc/flags.h
index 6de5d9b5957..2c69497fb7d 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -434,12 +434,6 @@ extern int flag_delayed_branch;
extern int flag_dump_unnumbered;
-/* Nonzero means pretend it is OK to examine bits of target floats,
- even if that isn't true. The resulting code will have incorrect constants,
- but the same series of instructions that the native compiler would make. */
-
-extern int flag_pretend_float;
-
/* Nonzero means change certain warnings into errors.
Usually these are warnings about failure to conform to some standard. */
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 5a8f73b2ce4..aee10565e9a 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -59,9 +59,6 @@ static void encode PARAMS ((HOST_WIDE_INT *,
static void decode PARAMS ((HOST_WIDE_INT *,
unsigned HOST_WIDE_INT *,
HOST_WIDE_INT *));
-#ifndef REAL_ARITHMETIC
-static void exact_real_inverse_1 PARAMS ((PTR));
-#endif
static tree negate_expr PARAMS ((tree));
static tree split_tree PARAMS ((tree, enum tree_code, tree *, tree *,
int));
@@ -834,512 +831,6 @@ div_and_round_double (code, uns,
return overflow;
}
-#ifndef REAL_ARITHMETIC
-/* Effectively truncate a real value to represent the nearest possible value
- in a narrower mode. The result is actually represented in the same data
- type as the argument, but its value is usually different.
-
- A trap may occur during the FP operations and it is the responsibility
- of the calling function to have a handler established. */
-
-REAL_VALUE_TYPE
-real_value_truncate (mode, arg)
- enum machine_mode mode;
- REAL_VALUE_TYPE arg;
-{
- return REAL_VALUE_TRUNCATE (mode, arg);
-}
-
-#if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
-
-/* Check for infinity in an IEEE double precision number. */
-
-int
-target_isinf (x)
- REAL_VALUE_TYPE x;
-{
- /* The IEEE 64-bit double format. */
- union {
- REAL_VALUE_TYPE d;
- struct {
- unsigned sign : 1;
- unsigned exponent : 11;
- unsigned mantissa1 : 20;
- unsigned mantissa2 : 32;
- } little_endian;
- struct {
- unsigned mantissa2 : 32;
- unsigned mantissa1 : 20;
- unsigned exponent : 11;
- unsigned sign : 1;
- } big_endian;
- } u;
-
- u.d = dconstm1;
- if (u.big_endian.sign == 1)
- {
- u.d = x;
- return (u.big_endian.exponent == 2047
- && u.big_endian.mantissa1 == 0
- && u.big_endian.mantissa2 == 0);
- }
- else
- {
- u.d = x;
- return (u.little_endian.exponent == 2047
- && u.little_endian.mantissa1 == 0
- && u.little_endian.mantissa2 == 0);
- }
-}
-
-/* Check whether an IEEE double precision number is a NaN. */
-
-int
-target_isnan (x)
- REAL_VALUE_TYPE x;
-{
- /* The IEEE 64-bit double format. */
- union {
- REAL_VALUE_TYPE d;
- struct {
- unsigned sign : 1;
- unsigned exponent : 11;
- unsigned mantissa1 : 20;
- unsigned mantissa2 : 32;
- } little_endian;
- struct {
- unsigned mantissa2 : 32;
- unsigned mantissa1 : 20;
- unsigned exponent : 11;
- unsigned sign : 1;
- } big_endian;
- } u;
-
- u.d = dconstm1;
- if (u.big_endian.sign == 1)
- {
- u.d = x;
- return (u.big_endian.exponent == 2047
- && (u.big_endian.mantissa1 != 0
- || u.big_endian.mantissa2 != 0));
- }
- else
- {
- u.d = x;
- return (u.little_endian.exponent == 2047
- && (u.little_endian.mantissa1 != 0
- || u.little_endian.mantissa2 != 0));
- }
-}
-
-/* Check for a negative IEEE double precision number. */
-
-int
-target_negative (x)
- REAL_VALUE_TYPE x;
-{
- /* The IEEE 64-bit double format. */
- union {
- REAL_VALUE_TYPE d;
- struct {
- unsigned sign : 1;
- unsigned exponent : 11;
- unsigned mantissa1 : 20;
- unsigned mantissa2 : 32;
- } little_endian;
- struct {
- unsigned mantissa2 : 32;
- unsigned mantissa1 : 20;
- unsigned exponent : 11;
- unsigned sign : 1;
- } big_endian;
- } u;
-
- u.d = dconstm1;
- if (u.big_endian.sign == 1)
- {
- u.d = x;
- return u.big_endian.sign;
- }
- else
- {
- u.d = x;
- return u.little_endian.sign;
- }
-}
-#else /* Target not IEEE */
-
-/* Let's assume other float formats don't have infinity.
- (This can be overridden by redefining REAL_VALUE_ISINF.) */
-
-int
-target_isinf (x)
- REAL_VALUE_TYPE x ATTRIBUTE_UNUSED;
-{
- return 0;
-}
-
-/* Let's assume other float formats don't have NaNs.
- (This can be overridden by redefining REAL_VALUE_ISNAN.) */
-
-int
-target_isnan (x)
- REAL_VALUE_TYPE x ATTRIBUTE_UNUSED;
-{
- return 0;
-}
-
-/* Let's assume other float formats don't have minus zero.
- (This can be overridden by redefining REAL_VALUE_NEGATIVE.) */
-
-int
-target_negative (x)
- REAL_VALUE_TYPE x;
-{
- return x < 0;
-}
-#endif /* Target not IEEE */
-
-/* Try to change R into its exact multiplicative inverse in machine mode
- MODE. Return nonzero function value if successful. */
-struct exact_real_inverse_args
-{
- REAL_VALUE_TYPE *r;
- enum machine_mode mode;
- int success;
-};
-
-static void
-exact_real_inverse_1 (p)
- PTR p;
-{
- struct exact_real_inverse_args *args =
- (struct exact_real_inverse_args *) p;
-
- enum machine_mode mode = args->mode;
- REAL_VALUE_TYPE *r = args->r;
-
- union
- {
- double d;
- unsigned short i[4];
- }
- x, t, y;
-#ifdef CHECK_FLOAT_VALUE
- int i;
-#endif
-
- /* Set array index to the less significant bits in the unions, depending
- on the endian-ness of the host doubles. */
-#if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT \
- || HOST_FLOAT_FORMAT == IBM_FLOAT_FORMAT
-# define K 2
-#else
-# define K (2 * HOST_FLOAT_WORDS_BIG_ENDIAN)
-#endif
-
- /* Domain check the argument. */
- x.d = *r;
- if (x.d == 0.0)
- goto fail;
-
-#ifdef REAL_INFINITY
- if (REAL_VALUE_ISINF (x.d) || REAL_VALUE_ISNAN (x.d))
- goto fail;
-#endif
-
- /* Compute the reciprocal and check for numerical exactness.
- It is unnecessary to check all the significand bits to determine
- whether X is a power of 2. If X is not, then it is impossible for
- the bottom half significand of both X and 1/X to be all zero bits.
- Hence we ignore the data structure of the top half and examine only
- the low order bits of the two significands. */
- t.d = 1.0 / x.d;
- if (x.i[K] != 0 || x.i[K + 1] != 0 || t.i[K] != 0 || t.i[K + 1] != 0)
- goto fail;
-
- /* Truncate to the required mode and range-check the result. */
- y.d = REAL_VALUE_TRUNCATE (mode, t.d);
-#ifdef CHECK_FLOAT_VALUE
- i = 0;
- if (CHECK_FLOAT_VALUE (mode, y.d, i))
- goto fail;
-#endif
-
- /* Fail if truncation changed the value. */
- if (y.d != t.d || y.d == 0.0)
- goto fail;
-
-#ifdef REAL_INFINITY
- if (REAL_VALUE_ISINF (y.d) || REAL_VALUE_ISNAN (y.d))
- goto fail;
-#endif
-
- /* Output the reciprocal and return success flag. */
- *r = y.d;
- args->success = 1;
- return;
-
- fail:
- args->success = 0;
- return;
-
-#undef K
-}
-
-
-int
-exact_real_inverse (mode, r)
- enum machine_mode mode;
- REAL_VALUE_TYPE *r;
-{
- struct exact_real_inverse_args args;
-
- /* Disable if insufficient information on the data structure. */
-#if HOST_FLOAT_FORMAT == UNKNOWN_FLOAT_FORMAT
- return 0;
-#endif
-
- /* Usually disable if bounds checks are not reliable. */
- if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT) && !flag_pretend_float)
- return 0;
-
- args.mode = mode;
- args.r = r;
-
- if (do_float_handler (exact_real_inverse_1, (PTR) &args))
- return args.success;
- return 0;
-}
-
-/* Convert C99 hexadecimal floating point string constant S. Return
- real value type in mode MODE. This function uses the host computer's
- floating point arithmetic when there is no REAL_ARITHMETIC. */
-
-REAL_VALUE_TYPE
-real_hex_to_f (s, mode)
- const char *s;
- enum machine_mode mode;
-{
- REAL_VALUE_TYPE ip;
- const char *p = s;
- unsigned HOST_WIDE_INT low, high;
- int shcount, nrmcount, k;
- int sign, expsign, isfloat;
- int lost = 0;/* Nonzero low order bits shifted out and discarded. */
- int frexpon = 0; /* Bits after the decimal point. */
- int expon = 0; /* Value of exponent. */
- int decpt = 0; /* How many decimal points. */
- int gotp = 0; /* How many P's. */
- char c;
-
- isfloat = 0;
- expsign = 1;
- ip = 0.0;
-
- while (*p == ' ' || *p == '\t')
- ++p;
-
- /* Sign, if any, comes first. */
- sign = 1;
- if (*p == '-')
- {
- sign = -1;
- ++p;
- }
-
- /* The string is supposed to start with 0x or 0X . */
- if (*p == '0')
- {
- ++p;
- if (*p == 'x' || *p == 'X')
- ++p;
- else
- abort ();
- }
- else
- abort ();
-
- while (*p == '0')
- ++p;
-
- high = 0;
- low = 0;
- shcount = 0;
- while ((c = *p) != '\0')
- {
- if (ISXDIGIT (c))
- {
- k = hex_value (c & CHARMASK);
-
- if ((high & 0xf0000000) == 0)
- {
- high = (high << 4) + ((low >> 28) & 15);
- low = (low << 4) + k;
- shcount += 4;
- if (decpt)
- frexpon += 4;
- }
- else
- {
- /* Record nonzero lost bits. */
- lost |= k;
- if (! decpt)
- frexpon -= 4;
- }
- ++p;
- }
- else if (c == '.')
- {
- ++decpt;
- ++p;
- }
-
- else if (c == 'p' || c == 'P')
- {
- ++gotp;
- ++p;
- /* Sign of exponent. */
- if (*p == '-')
- {
- expsign = -1;
- ++p;
- }
-
- /* Value of exponent.
- The exponent field is a decimal integer. */
- while (ISDIGIT (*p))
- {
- k = (*p++ & CHARMASK) - '0';
- expon = 10 * expon + k;
- }
-
- expon *= expsign;
- /* F suffix is ambiguous in the significand part
- so it must appear after the decimal exponent field. */
- if (*p == 'f' || *p == 'F')
- {
- isfloat = 1;
- ++p;
- break;
- }
- }
-
- else if (c == 'l' || c == 'L')
- {
- ++p;
- break;
- }
- else
- break;
- }
-
- /* Abort if last character read was not legitimate. */
- c = *p;
- if ((c != '\0' && c != ' ' && c != '\n' && c != '\r') || (decpt > 1))
- abort ();
-
- /* There must be either one decimal point or one p. */
- if (decpt == 0 && gotp == 0)
- abort ();
-
- shcount -= 4;
- if (high == 0 && low == 0)
- return dconst0;
-
- /* Normalize. */
- nrmcount = 0;
- if (high == 0)
- {
- high = low;
- low = 0;
- nrmcount += 32;
- }
-
- /* Leave a high guard bit for carry-out. */
- if ((high & 0x80000000) != 0)
- {
- lost |= low & 1;
- low = (low >> 1) | (high << 31);
- high = high >> 1;
- nrmcount -= 1;
- }
-
- if ((high & 0xffff8000) == 0)
- {
- high = (high << 16) + ((low >> 16) & 0xffff);
- low = low << 16;
- nrmcount += 16;
- }
-
- while ((high & 0xc0000000) == 0)
- {
- high = (high << 1) + ((low >> 31) & 1);
- low = low << 1;
- nrmcount += 1;
- }
-
- if (isfloat || GET_MODE_SIZE (mode) == UNITS_PER_WORD)
- {
- /* Keep 24 bits precision, bits 0x7fffff80.
- Rounding bit is 0x40. */
- lost = lost | low | (high & 0x3f);
- low = 0;
- if (high & 0x40)
- {
- if ((high & 0x80) || lost)
- high += 0x40;
- }
- high &= 0xffffff80;
- }
- else
- {
- /* We need real.c to do long double formats, so here default
- to double precision. */
-#if HOST_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
- /* IEEE double.
- Keep 53 bits precision, bits 0x7fffffff fffffc00.
- Rounding bit is low word 0x200. */
- lost = lost | (low & 0x1ff);
- if (low & 0x200)
- {
- if ((low & 0x400) || lost)
- {
- low = (low + 0x200) & 0xfffffc00;
- if (low == 0)
- high += 1;
- }
- }
- low &= 0xfffffc00;
-#else
- /* Assume it's a VAX with 56-bit significand,
- bits 0x7fffffff ffffff80. */
- lost = lost | (low & 0x7f);
- if (low & 0x40)
- {
- if ((low & 0x80) || lost)
- {
- low = (low + 0x40) & 0xffffff80;
- if (low == 0)
- high += 1;
- }
- }
- low &= 0xffffff80;
-#endif
- }
-
- ip = (double) high;
- ip = REAL_VALUE_LDEXP (ip, 32) + (double) low;
- /* Apply shifts and exponent value as power of 2. */
- ip = REAL_VALUE_LDEXP (ip, expon - (nrmcount + frexpon));
-
- if (sign < 0)
- ip = -ip;
- return ip;
-}
-
-#endif /* no REAL_ARITHMETIC */
-
/* Given T, an expression, return the negation of T. Allow for T to be
null, in which case return null. */
@@ -1725,44 +1216,7 @@ const_binop_1 (data)
struct cb_args *args = (struct cb_args *) data;
REAL_VALUE_TYPE value;
-#ifdef REAL_ARITHMETIC
REAL_ARITHMETIC (value, args->code, args->d1, args->d2);
-#else
- switch (args->code)
- {
- case PLUS_EXPR:
- value = args->d1 + args->d2;
- break;
-
- case MINUS_EXPR:
- value = args->d1 - args->d2;
- break;
-
- case MULT_EXPR:
- value = args->d1 * args->d2;
- break;
-
- case RDIV_EXPR:
-#ifndef REAL_INFINITY
- if (args->d2 == 0)
- abort ();
-#endif
-
- value = args->d1 / args->d2;
- break;
-
- case MIN_EXPR:
- value = MIN (args->d1, args->d2);
- break;
-
- case MAX_EXPR:
- value = MAX (args->d1, args->d2);
- break;
-
- default:
- abort ();
- }
-#endif /* no REAL_ARITHMETIC */
args->t
= build_real (args->type,
@@ -1787,7 +1241,6 @@ const_binop (code, arg1, arg2, notrunc)
if (TREE_CODE (arg1) == INTEGER_CST)
return int_const_binop (code, arg1, arg2, notrunc);
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
if (TREE_CODE (arg1) == REAL_CST)
{
REAL_VALUE_TYPE d1;
@@ -1831,7 +1284,6 @@ const_binop (code, arg1, arg2, notrunc)
| TREE_CONSTANT_OVERFLOW (arg2);
return t;
}
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
if (TREE_CODE (arg1) == COMPLEX_CST)
{
tree type = TREE_TYPE (arg1);
@@ -2145,7 +1597,6 @@ fold_convert (t, arg1)
TREE_CONSTANT_OVERFLOW (t)
= TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
}
-#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
else if (TREE_CODE (arg1) == REAL_CST)
{
/* Don't initialize these, use assignments.
@@ -2166,15 +1617,9 @@ fold_convert (t, arg1)
/* See if X will be in range after truncation towards 0.
To compensate for truncation, move the bounds away from 0,
but reject if X exactly equals the adjusted bounds. */
-#ifdef REAL_ARITHMETIC
REAL_ARITHMETIC (l, MINUS_EXPR, l, dconst1);
if (!no_upper_bound)
REAL_ARITHMETIC (u, PLUS_EXPR, u, dconst1);
-#else
- l--;
- if (!no_upper_bound)
- u++;
-#endif
/* If X is a NaN, use zero instead and show we have an overflow.
Otherwise, range check. */
if (REAL_VALUE_ISNAN (x))
@@ -2184,50 +1629,23 @@ fold_convert (t, arg1)
&& REAL_VALUES_LESS (x, u)))
overflow = 1;
-#ifndef REAL_ARITHMETIC
- {
- HOST_WIDE_INT low, high;
- HOST_WIDE_INT half_word
- = (HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2);
-
- if (x < 0)
- x = -x;
-
- high = (HOST_WIDE_INT) (x / half_word / half_word);
- x -= (REAL_VALUE_TYPE) high * half_word * half_word;
- if (x >= (REAL_VALUE_TYPE) half_word * half_word / 2)
- {
- low = x - (REAL_VALUE_TYPE) half_word * half_word / 2;
- low |= (HOST_WIDE_INT) -1 << (HOST_BITS_PER_WIDE_INT - 1);
- }
- else
- low = (HOST_WIDE_INT) x;
- if (TREE_REAL_CST (arg1) < 0)
- neg_double (low, high, &low, &high);
- t = build_int_2 (low, high);
- }
-#else
{
HOST_WIDE_INT low, high;
REAL_VALUE_TO_INT (&low, &high, x);
t = build_int_2 (low, high);
}
-#endif
TREE_TYPE (t) = type;
TREE_OVERFLOW (t)
= TREE_OVERFLOW (arg1) | force_fit_type (t, overflow);
TREE_CONSTANT_OVERFLOW (t)
= TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
}
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
TREE_TYPE (t) = type;
}
else if (TREE_CODE (type) == REAL_TYPE)
{
-#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
if (TREE_CODE (arg1) == INTEGER_CST)
return build_real_from_int_cst (type, arg1);
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
if (TREE_CODE (arg1) == REAL_CST)
{
struct fc_args args;
@@ -5008,9 +4426,7 @@ fold (expr)
subop = arg0;
if (subop != 0 && TREE_CODE (subop) != INTEGER_CST
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
&& TREE_CODE (subop) != REAL_CST
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
)
/* Note that TREE_CONSTANT isn't enough:
static var addresses are constant but we can't
@@ -5045,10 +4461,7 @@ fold (expr)
subop = op;
if (TREE_CODE (subop) != INTEGER_CST
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
- && TREE_CODE (subop) != REAL_CST
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
- )
+ && TREE_CODE (subop) != REAL_CST)
/* Note that TREE_CONSTANT isn't enough:
static var addresses are constant but we can't
do arithmetic on them. */
@@ -5704,10 +5117,6 @@ fold (expr)
}
binary:
-#if defined (REAL_IS_NOT_DOUBLE) && ! defined (REAL_ARITHMETIC)
- if (TREE_CODE (arg1) == REAL_CST)
- return t;
-#endif /* REAL_IS_NOT_DOUBLE, and no REAL_ARITHMETIC */
if (wins)
t1 = const_binop (code, arg0, arg1, 0);
if (t1 != NULL_TREE)
@@ -5948,12 +5357,10 @@ fold (expr)
case RDIV_EXPR:
/* In most cases, do nothing with a divide by zero. */
-#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
#ifndef REAL_INFINITY
if (TREE_CODE (arg1) == REAL_CST && real_zerop (arg1))
return t;
#endif
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
/* (-A) / (-B) -> A / B */
if (TREE_CODE (arg0) == NEGATE_EXPR && TREE_CODE (arg1) == NEGATE_EXPR)
diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c
index 157baf179e0..f35402940ab 100644
--- a/gcc/gengenrtl.c
+++ b/gcc/gengenrtl.c
@@ -31,30 +31,28 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Calculate the format for CONST_DOUBLE. This depends on the relative
widths of HOST_WIDE_INT and REAL_VALUE_TYPE.
- We need to go out to e0wwwww, since REAL_ARITHMETIC assumes 16-bits
- per element in REAL_VALUE_TYPE.
+ We need to go out to e0wwwww, since real.c assumes 16 bits per element
+ in REAL_VALUE_TYPE.
This is duplicated in rtl.c.
A number of places assume that there are always at least two 'w'
slots in a CONST_DOUBLE, so we provide them even if one would suffice. */
-#ifdef REAL_ARITHMETIC
-# if MAX_LONG_DOUBLE_TYPE_SIZE == 96
-# define REAL_WIDTH \
+#if MAX_LONG_DOUBLE_TYPE_SIZE == 96
+# define REAL_WIDTH \
(11*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
+#else
+# if MAX_LONG_DOUBLE_TYPE_SIZE == 128
+# define REAL_WIDTH \
+ (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
# else
-# if MAX_LONG_DOUBLE_TYPE_SIZE == 128
+# if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
# define REAL_WIDTH \
- (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
-# else
-# if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
-# define REAL_WIDTH \
(7*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
-# endif
# endif
# endif
-#endif /* REAL_ARITHMETIC */
+#endif
#ifndef REAL_WIDTH
# if HOST_BITS_PER_WIDE_INT*2 >= MAX_LONG_DOUBLE_TYPE_SIZE
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 6cd8b5f9bc2..b1b01b98b07 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-03 Zack Weinberg <zack@codesourcery.com>
+
+ * java/expr.c, java/jcf-parse.c, java/lex.c:
+ Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
+ REAL_ARITHMETIC blocks unconditional. Delete some further
+ #ifdef blocks predicated on REAL_ARITHMETIC.
+
2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* class.c (init_class_processing): Use ARRAY_SIZE in lieu of
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index ecfabe5339a..b6a01065983 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1099,11 +1099,7 @@ expand_java_pushc (ival, type)
else if (type == float_type_node || type == double_type_node)
{
REAL_VALUE_TYPE x;
-#ifdef REAL_ARITHMETIC
REAL_VALUE_FROM_INT (x, ival, 0, TYPE_MODE (type));
-#else
- x = ival;
-#endif
value = build_real (type, x);
}
else
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index c2350a0c99e..c4faa8e3711 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -306,13 +306,7 @@ get_constant (jcf, index)
{
jint num = JPOOL_INT(jcf, index);
REAL_VALUE_TYPE d;
-#ifdef REAL_ARITHMETIC
d = REAL_VALUE_FROM_TARGET_SINGLE (num);
-#else
- union { float f; jint i; } u;
- u.i = num;
- d = u.f;
-#endif
value = build_real (float_type_node, d);
break;
}
@@ -343,16 +337,7 @@ get_constant (jcf, index)
num[0] = lo;
num[1] = hi;
}
-#ifdef REAL_ARITHMETIC
d = REAL_VALUE_FROM_TARGET_DOUBLE (num);
-#else
- {
- union { double d; jint i[2]; } u;
- u.i[0] = (jint) num[0];
- u.i[1] = (jint) num[1];
- d = u.d;
- }
-#endif
value = build_real (double_type_node, d);
break;
}
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index 3509b17e4f3..17a7e1b62f0 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -840,11 +840,7 @@ struct jpa_args
int number_beginning;
};
-#ifdef REAL_ARITHMETIC
#define IS_ZERO(X) (ereal_cmp (X, dconst0) == 0)
-#else
-#define IS_ZERO(X) ((X) == 0)
-#endif
static void java_perform_atof PARAMS ((PTR));
diff --git a/gcc/optabs.c b/gcc/optabs.c
index bb3e292b201..0db33ca0667 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -4120,8 +4120,6 @@ expand_float (to, from, unsignedp)
}
}
-#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
-
/* Unsigned integer, and no way to convert directly.
Convert as signed, then conditionally adjust the result. */
if (unsignedp)
@@ -4236,7 +4234,6 @@ expand_float (to, from, unsignedp)
emit_label (label);
goto done;
}
-#endif
/* No hardware instruction available; call a library routine to convert from
SImode, DImode, or TImode into SFmode, DFmode, XFmode, or TFmode. */
@@ -4387,7 +4384,6 @@ expand_fix (to, from, unsignedp)
}
}
-#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
/* For an unsigned conversion, there is one more way to do it.
If we have a signed conversion, we generate code that compares
the real value to the largest representable positive number. If if
@@ -4467,7 +4463,6 @@ expand_fix (to, from, unsignedp)
return;
}
-#endif
/* We can't do it with an insn, so use a library call. But first ensure
that the mode of TO is at least as wide as SImode, since those are the
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index adb18817288..e5627e2bfa5 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -124,7 +124,6 @@ print_node_brief (file, prefix, node, indent)
if (TREE_OVERFLOW (node))
fprintf (file, " overflow");
-#if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
d = TREE_REAL_CST (node);
if (REAL_VALUE_ISINF (d))
fprintf (file, " Inf");
@@ -137,16 +136,6 @@ print_node_brief (file, prefix, node, indent)
REAL_VALUE_TO_DECIMAL (d, "%e", string);
fprintf (file, " %s", string);
}
-#else
- {
- int i;
- unsigned char *p = (unsigned char *) &TREE_REAL_CST (node);
- fprintf (file, " 0x");
- for (i = 0; i < sizeof TREE_REAL_CST (node); i++)
- fprintf (file, "%02x", *p++);
- fprintf (file, "");
- }
-#endif
}
fprintf (file, ">");
@@ -681,7 +670,6 @@ print_node (file, prefix, node, indent)
if (TREE_OVERFLOW (node))
fprintf (file, " overflow");
-#if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
d = TREE_REAL_CST (node);
if (REAL_VALUE_ISINF (d))
fprintf (file, " Inf");
@@ -694,16 +682,6 @@ print_node (file, prefix, node, indent)
REAL_VALUE_TO_DECIMAL (d, "%e", string);
fprintf (file, " %s", string);
}
-#else
- {
- int i;
- unsigned char *p = (unsigned char *) &TREE_REAL_CST (node);
- fprintf (file, " 0x");
- for (i = 0; i < sizeof TREE_REAL_CST (node); i++)
- fprintf (file, "%02x", *p++);
- fprintf (file, "");
- }
-#endif
}
break;
diff --git a/gcc/real.c b/gcc/real.c
index 7b8879b8764..559cb058cc7 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -30,19 +30,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* To enable support of XFmode extended real floating point, define
LONG_DOUBLE_TYPE_SIZE 96 in the tm.h file (m68k.h or i386.h).
-To support cross compilation between IEEE, VAX and IBM floating
-point formats, define REAL_ARITHMETIC in the tm.h file.
-
-In either case the machine files (tm.h) must not contain any code
+Machine files (tm.h etc) must not contain any code
that tries to use host floating point arithmetic to convert
REAL_VALUE_TYPEs from `double' to `float', pass them to fprintf,
etc. In cross-compile situations a REAL_VALUE_TYPE may not
be intelligible to the host computer's native arithmetic.
-The emulator defaults to the host's floating point format so that
-its decimal conversion functions can be used if desired (see
-real.h).
-
The first part of this file interfaces gcc to a floating point
arithmetic suite that was not written with gcc in mind. Avoid
changing the low-level arithmetic routines unless you have suitable
@@ -88,10 +81,7 @@ netlib.att.com: netlib/cephes. */
If LONG_DOUBLE_TYPE_SIZE = 64 (the default, unless tm.h defines it)
then `long double' and `double' are both implemented, but they
- both mean DFmode. In this case, the software floating-point
- support available here is activated by writing
- #define REAL_ARITHMETIC
- in tm.h.
+ both mean DFmode.
The case LONG_DOUBLE_TYPE_SIZE = 128 activates TFmode support
and may deactivate XFmode since `long double' is used to refer
@@ -113,10 +103,6 @@ netlib.att.com: netlib/cephes. */
/* The following converts gcc macros into the ones used by this file. */
-/* REAL_ARITHMETIC defined means that macros in real.h are
- defined to call emulator functions. */
-#ifdef REAL_ARITHMETIC
-
#if TARGET_FLOAT_FORMAT == VAX_FLOAT_FORMAT
/* PDP-11, Pro350, VAX: */
#define DEC 1
@@ -142,33 +128,6 @@ unknown arithmetic type
#define REAL_WORDS_BIG_ENDIAN FLOAT_WORDS_BIG_ENDIAN
-#else
-/* REAL_ARITHMETIC not defined means that the *host's* data
- structure will be used. It may differ by endian-ness from the
- target machine's structure and will get its ends swapped
- accordingly (but not here). Probably only the decimal <-> binary
- functions in this file will actually be used in this case. */
-
-#if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT
-#define DEC 1
-#else /* it's not VAX */
-#if HOST_FLOAT_FORMAT == IBM_FLOAT_FORMAT
-/* IBM System/370 style */
-#define IBM 1
-#else /* it's also not an IBM */
-#if HOST_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
-#define IEEE
-#else /* it's not IEEE either */
-unknown arithmetic type
-#define UNK 1
-#endif /* not IEEE */
-#endif /* not IBM */
-#endif /* not VAX */
-
-#define REAL_WORDS_BIG_ENDIAN HOST_FLOAT_WORDS_BIG_ENDIAN
-
-#endif /* REAL_ARITHMETIC not defined */
-
/* Define INFINITY for support of infinity.
Define NANS for support of Not-a-Number's (NaN's). */
#if !defined(DEC) && !defined(IBM) && !defined(C4X)
@@ -290,7 +249,6 @@ typedef unsigned int UHItype __attribute__ ((mode (HI)));
#define NE 6
#define MAXDECEXP 4932
#define MINDECEXP -4956
-#ifdef REAL_ARITHMETIC
/* Emulator uses target format internally
but host stores it in host endian-ness. */
@@ -324,13 +282,6 @@ do { \
} \
} while (0)
-#else /* not REAL_ARITHMETIC */
-
-/* emulator uses host format */
-#define GET_REAL(r,e) e53toe ((const UEMUSHORT *) (r), (e))
-#define PUT_REAL(e,r) etoe53 ((e), (UEMUSHORT *) (r))
-
-#endif /* not REAL_ARITHMETIC */
#endif /* not TFmode */
#endif /* not XFmode */
@@ -1048,11 +999,6 @@ ereal_ldexp (x, n)
return (r);
}
-/* These routines are conditionally compiled because functions
- of the same names may be defined in fold-const.c. */
-
-#ifdef REAL_ARITHMETIC
-
/* Check for infinity in a REAL_VALUE_TYPE. */
int
@@ -1226,7 +1172,6 @@ exact_real_inverse (mode, r)
PUT_REAL (einv, r);
return 1;
}
-#endif /* REAL_ARITHMETIC defined */
/* Used for debugging--print the value of R in human-readable format
on stderr. */
@@ -1361,7 +1306,6 @@ ereal_isneg (x)
return (eisneg (ex));
}
-/* End of REAL_ARITHMETIC interface */
/*
Extended precision IEEE binary floating point arithmetic routines
diff --git a/gcc/real.h b/gcc/real.h
index 2d3a9090e04..e734b26548e 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -65,10 +65,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#endif
#endif
-/* Defining REAL_ARITHMETIC invokes a floating point emulator
- that can produce a target machine format differing by more
- than just endian-ness from the host's format. The emulator
- is also used to support extended real XFmode. */
#ifndef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 64
#endif
@@ -80,19 +76,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef MAX_LONG_DOUBLE_TYPE_SIZE
#define MAX_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
#endif
-#if (MAX_LONG_DOUBLE_TYPE_SIZE == 96) || (MAX_LONG_DOUBLE_TYPE_SIZE == 128)
-#ifndef REAL_ARITHMETIC
-#define REAL_ARITHMETIC
-#endif
-#endif
-#ifdef REAL_ARITHMETIC
+
/* **** Start of software floating point emulator interface macros **** */
/* Support 80-bit extended real XFmode if LONG_DOUBLE_TYPE_SIZE
has been defined to be 96 in the tm.h machine file. */
#if (MAX_LONG_DOUBLE_TYPE_SIZE == 96)
#define REAL_IS_NOT_DOUBLE
-#define REAL_ARITHMETIC
typedef struct {
HOST_WIDE_INT r[(11 + sizeof (HOST_WIDE_INT))/(sizeof (HOST_WIDE_INT))];
} realvaluetype;
@@ -103,7 +93,6 @@ typedef struct {
#if (MAX_LONG_DOUBLE_TYPE_SIZE == 128)
#define REAL_IS_NOT_DOUBLE
-#define REAL_ARITHMETIC
typedef struct {
HOST_WIDE_INT r[(19 + sizeof (HOST_WIDE_INT))/(sizeof (HOST_WIDE_INT))];
} realvaluetype;
@@ -130,13 +119,6 @@ typedef struct {
extern unsigned int significand_size PARAMS ((enum machine_mode));
-/* If emulation has been enabled by defining REAL_ARITHMETIC or by
- setting LONG_DOUBLE_TYPE_SIZE to 96 or 128, then define macros so that
- they invoke emulator functions. This will succeed only if the machine
- files have been updated to use these macros in place of any
- references to host machine `double' or `float' types. */
-#ifdef REAL_ARITHMETIC
-#undef REAL_ARITHMETIC
#define REAL_ARITHMETIC(value, code, d1, d2) \
earith (&(value), (code), &(d1), &(d2))
@@ -176,10 +158,21 @@ extern REAL_VALUE_TYPE ereal_from_double PARAMS ((HOST_WIDE_INT *));
#define REAL_VALUES_LESS(x, y) (ereal_cmp ((x), (y)) == -1)
#define REAL_VALUE_LDEXP(x, n) ereal_ldexp (x, n)
+/* Compare two floating-point objects for bitwise identity.
+ This is not the same as comparing for equality on IEEE hosts:
+ -0.0 equals 0.0 but they are not identical, and conversely
+ two NaNs might be identical but they cannot be equal. */
+#define REAL_VALUES_IDENTICAL(x, y) \
+ (!memcmp ((char *) &(x), (char *) &(y), sizeof (REAL_VALUE_TYPE)))
+
/* These return REAL_VALUE_TYPE: */
#define REAL_VALUE_RNDZINT(x) (etrunci (x))
#define REAL_VALUE_UNSIGNED_RNDZINT(x) (etruncui (x))
+
+/* Truncate the floating-point value X to mode MODE. */
#define REAL_VALUE_TRUNCATE(mode, x) real_value_truncate (mode, x)
+extern REAL_VALUE_TYPE real_value_truncate PARAMS ((enum machine_mode,
+ REAL_VALUE_TYPE));
/* These return HOST_WIDE_INT: */
/* Convert a floating-point value to integer, rounding toward zero. */
@@ -195,6 +188,16 @@ extern REAL_VALUE_TYPE ereal_from_double PARAMS ((HOST_WIDE_INT *));
#define REAL_VALUE_NEGATE ereal_negate
+/* Determine whether a floating-point value X is infinite. */
+#define REAL_VALUE_ISINF(x) (target_isinf (x))
+
+/* Determine whether a floating-point value X is a NaN. */
+#define REAL_VALUE_ISNAN(x) (target_isnan (x))
+
+/* Determine whether a floating-point value X is negative. */
+#define REAL_VALUE_NEGATIVE(x) (target_negative (x))
+
+/* Determine whether a floating-point value X is minus zero. */
#define REAL_VALUE_MINUS_ZERO(x) \
((ereal_cmp (x, dconst0) == 0) && (ereal_isneg (x) != 0 ))
@@ -234,203 +237,7 @@ extern REAL_VALUE_TYPE ereal_from_double PARAMS ((HOST_WIDE_INT *));
/* Conversions to decimal ASCII string. */
#define REAL_VALUE_TO_DECIMAL(r, fmt, s) (ereal_to_decimal (r, s))
-#endif /* REAL_ARITHMETIC defined */
-
/* **** End of software floating point emulator interface macros **** */
-#else /* No XFmode or TFmode and REAL_ARITHMETIC not defined */
-
-/* old interface */
-#ifdef REAL_ARITHMETIC
-/* Defining REAL_IS_NOT_DOUBLE breaks certain initializations
- when REAL_ARITHMETIC etc. are not defined. */
-
-/* Now see if the host and target machines use the same format.
- If not, define REAL_IS_NOT_DOUBLE (even if we end up representing
- reals as doubles because we have no better way in this cross compiler.)
- This turns off various optimizations that can happen when we know the
- compiler's float format matches the target's float format.
- */
-#if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
-#define REAL_IS_NOT_DOUBLE
-#ifndef REAL_VALUE_TYPE
-typedef struct {
- HOST_WIDE_INT r[sizeof (double)/sizeof (HOST_WIDE_INT)];
- } realvaluetype;
-#define REAL_VALUE_TYPE realvaluetype
-#endif /* no REAL_VALUE_TYPE */
-#endif /* formats differ */
-#endif /* 0 */
-
-#endif /* emulator not used */
-
-/* If we are not cross-compiling, use a `double' to represent the
- floating-point value. Otherwise, use some other type
- (probably a struct containing an array of longs). */
-#ifndef REAL_VALUE_TYPE
-#define REAL_VALUE_TYPE double
-#else
-#define REAL_IS_NOT_DOUBLE
-#endif
-
-#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT
-
-/* Convert a type `double' value in host format first to a type `float'
- value in host format and then to a single type `long' value which
- is the bitwise equivalent of the `float' value. */
-#ifndef REAL_VALUE_TO_TARGET_SINGLE
-#define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) \
-do { \
- union { \
- float f; \
- HOST_WIDE_INT l; \
- } u; \
- if (sizeof(HOST_WIDE_INT) < sizeof(float)) \
- abort (); \
- u.l = 0; \
- u.f = (IN); \
- (OUT) = u.l; \
-} while (0)
-#endif
-
-/* Convert a type `double' value in host format to a pair of type `long'
- values which is its bitwise equivalent, but put the two words into
- proper word order for the target. */
-#ifndef REAL_VALUE_TO_TARGET_DOUBLE
-#define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \
-do { \
- union { \
- REAL_VALUE_TYPE f; \
- HOST_WIDE_INT l[2]; \
- } u; \
- if (sizeof(HOST_WIDE_INT) * 2 < sizeof(REAL_VALUE_TYPE)) \
- abort (); \
- u.l[0] = u.l[1] = 0; \
- u.f = (IN); \
- if (HOST_FLOAT_WORDS_BIG_ENDIAN == FLOAT_WORDS_BIG_ENDIAN) \
- (OUT)[0] = u.l[0], (OUT)[1] = u.l[1]; \
- else \
- (OUT)[1] = u.l[0], (OUT)[0] = u.l[1]; \
-} while (0)
-#endif
-#endif /* HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT */
-
-/* In this configuration, double and long double are the same. */
-#ifndef REAL_VALUE_TO_TARGET_LONG_DOUBLE
-#define REAL_VALUE_TO_TARGET_LONG_DOUBLE(a, b) REAL_VALUE_TO_TARGET_DOUBLE (a, b)
-#endif
-
-/* Compare two floating-point objects for bitwise identity.
- This is not the same as comparing for equality on IEEE hosts:
- -0.0 equals 0.0 but they are not identical, and conversely
- two NaNs might be identical but they cannot be equal. */
-#define REAL_VALUES_IDENTICAL(x, y) \
- (!memcmp ((char *) &(x), (char *) &(y), sizeof (REAL_VALUE_TYPE)))
-
-/* Compare two floating-point values for equality. */
-#ifndef REAL_VALUES_EQUAL
-#define REAL_VALUES_EQUAL(x, y) ((x) == (y))
-#endif
-
-/* Compare two floating-point values for less than. */
-#ifndef REAL_VALUES_LESS
-#define REAL_VALUES_LESS(x, y) ((x) < (y))
-#endif
-
-/* Truncate toward zero to an integer floating-point value. */
-#ifndef REAL_VALUE_RNDZINT
-#define REAL_VALUE_RNDZINT(x) ((double) ((int) (x)))
-#endif
-
-/* Truncate toward zero to an unsigned integer floating-point value. */
-#ifndef REAL_VALUE_UNSIGNED_RNDZINT
-#define REAL_VALUE_UNSIGNED_RNDZINT(x) ((double) ((unsigned int) (x)))
-#endif
-
-/* Convert a floating-point value to integer, rounding toward zero. */
-#ifndef REAL_VALUE_FIX
-#define REAL_VALUE_FIX(x) ((int) (x))
-#endif
-
-/* Convert a floating-point value to unsigned integer, rounding
- toward zero. */
-#ifndef REAL_VALUE_UNSIGNED_FIX
-#define REAL_VALUE_UNSIGNED_FIX(x) ((unsigned int) (x))
-#endif
-
-/* Scale X by Y powers of 2. */
-#ifndef REAL_VALUE_LDEXP
-#define REAL_VALUE_LDEXP(x, y) ldexp (x, y)
-extern double ldexp PARAMS ((double, int));
-#endif
-
-/* Convert the string X to a floating-point value. */
-#ifndef REAL_VALUE_ATOF
-#if 1
-/* Use real.c to convert decimal numbers to binary, ... */
-#define REAL_VALUE_ATOF(x, s) ereal_atof (x, s)
-/* Could use ereal_atof here for hexadecimal floats too, but real_hex_to_f
- is OK and it uses faster native fp arithmetic. */
-/* #define REAL_VALUE_HTOF(x, s) ereal_atof (x, s) */
-#else
-/* ... or, if you like the host computer's atof, go ahead and use it: */
-#define REAL_VALUE_ATOF(x, s) atof (x)
-#if defined (MIPSEL) || defined (MIPSEB)
-/* MIPS compiler can't handle parens around the function name.
- This problem *does not* appear to be connected with any
- macro definition for atof. It does not seem there is one. */
-extern double atof ();
-#else
-extern double (atof) ();
-#endif
-#endif
-#endif
-
-/* Hexadecimal floating constant input for use with host computer's
- fp arithmetic. */
-#ifndef REAL_VALUE_HTOF
-extern REAL_VALUE_TYPE real_hex_to_f PARAMS ((const char *,
- enum machine_mode));
-#define REAL_VALUE_HTOF(s,m) real_hex_to_f(s,m)
-#endif
-
-/* Negate the floating-point value X. */
-#ifndef REAL_VALUE_NEGATE
-#define REAL_VALUE_NEGATE(x) (- (x))
-#endif
-
-/* Truncate the floating-point value X to mode MODE. This is correct only
- for the most common case where the host and target have objects of the same
- size and where `float' is SFmode. */
-
-/* Don't use REAL_VALUE_TRUNCATE directly--always call real_value_truncate. */
-extern REAL_VALUE_TYPE real_value_truncate PARAMS ((enum machine_mode,
- REAL_VALUE_TYPE));
-
-#ifndef REAL_VALUE_TRUNCATE
-#define REAL_VALUE_TRUNCATE(mode, x) \
- (GET_MODE_BITSIZE (mode) == sizeof (float) * HOST_BITS_PER_CHAR \
- ? (float) (x) : (x))
-#endif
-
-/* Determine whether a floating-point value X is infinite. */
-#ifndef REAL_VALUE_ISINF
-#define REAL_VALUE_ISINF(x) (target_isinf (x))
-#endif
-
-/* Determine whether a floating-point value X is a NaN. */
-#ifndef REAL_VALUE_ISNAN
-#define REAL_VALUE_ISNAN(x) (target_isnan (x))
-#endif
-
-/* Determine whether a floating-point value X is negative. */
-#ifndef REAL_VALUE_NEGATIVE
-#define REAL_VALUE_NEGATIVE(x) (target_negative (x))
-#endif
-
-/* Determine whether a floating-point value X is minus 0. */
-#ifndef REAL_VALUE_MINUS_ZERO
-#define REAL_VALUE_MINUS_ZERO(x) ((x) == 0 && REAL_VALUE_NEGATIVE (x))
-#endif
/* Constant real values 0, 1, 2, and -1. */
@@ -466,14 +273,6 @@ do { union real_extract u; \
extern struct rtx_def *immed_real_const_1 PARAMS ((REAL_VALUE_TYPE,
enum machine_mode));
-
-/* Convert a floating point value `r', that can be interpreted
- as a host machine float or double, to a decimal ASCII string `s'
- using printf format string `fmt'. */
-#ifndef REAL_VALUE_TO_DECIMAL
-#define REAL_VALUE_TO_DECIMAL(r, fmt, s) (sprintf (s, fmt, r))
-#endif
-
/* Replace R by 1/R in the given machine mode, if the result is exact. */
extern int exact_real_inverse PARAMS ((enum machine_mode, REAL_VALUE_TYPE *));
extern int target_isnan PARAMS ((REAL_VALUE_TYPE));
diff --git a/gcc/recog.c b/gcc/recog.c
index 69f75b79bf6..968f1e51d08 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1716,16 +1716,6 @@ asm_operand_ok (op, constraint)
break;
case 'E':
-#ifndef REAL_ARITHMETIC
- /* Match any floating double constant, but only if
- we can examine the bits of it reliably. */
- if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
- && GET_MODE (op) != VOIDmode && ! flag_pretend_float)
- break;
-#endif
- /* FALLTHRU */
-
case 'F':
if (GET_CODE (op) == CONST_DOUBLE)
return 1;
@@ -2492,18 +2482,6 @@ constrain_operands (strict)
break;
case 'E':
-#ifndef REAL_ARITHMETIC
- /* Match any CONST_DOUBLE, but only if
- we can examine the bits of it reliably. */
- if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
- && GET_MODE (op) != VOIDmode && ! flag_pretend_float)
- break;
-#endif
- if (GET_CODE (op) == CONST_DOUBLE)
- win = 1;
- break;
-
case 'F':
if (GET_CODE (op) == CONST_DOUBLE)
win = 1;
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 93a5edbaf2a..0d74e38927d 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1635,18 +1635,6 @@ record_reg_classes (n_alts, n_ops, ops, modes,
break;
case 'E':
-#ifndef REAL_ARITHMETIC
- /* Match any floating double constant, but only if
- we can examine the bits of it reliably. */
- if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
- && GET_MODE (op) != VOIDmode && ! flag_pretend_float)
- break;
-#endif
- if (GET_CODE (op) == CONST_DOUBLE)
- win = 1;
- break;
-
case 'F':
if (GET_CODE (op) == CONST_DOUBLE)
win = 1;
diff --git a/gcc/reload.c b/gcc/reload.c
index c4231a2ea12..0e08aba61b2 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3121,18 +3121,6 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
break;
case 'E':
-#ifndef REAL_ARITHMETIC
- /* Match any floating double constant, but only if
- we can examine the bits of it reliably. */
- if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
- && GET_MODE (operand) != VOIDmode && ! flag_pretend_float)
- break;
-#endif
- if (GET_CODE (operand) == CONST_DOUBLE)
- win = 1;
- break;
-
case 'F':
if (GET_CODE (operand) == CONST_DOUBLE)
win = 1;
diff --git a/gcc/rtl.c b/gcc/rtl.c
index 6077232d0e7..50058ee38fc 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -30,30 +30,28 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Calculate the format for CONST_DOUBLE. This depends on the relative
widths of HOST_WIDE_INT and REAL_VALUE_TYPE.
- We need to go out to 0wwwww, since REAL_ARITHMETIC assumes 16-bits
- per element in REAL_VALUE_TYPE.
+ We need to go out to 0wwwww, since real.c assumes 16 bits per element
+ in REAL_VALUE_TYPE.
This is duplicated in gengenrtl.c.
A number of places assume that there are always at least two 'w'
slots in a CONST_DOUBLE, so we provide them even if one would suffice. */
-#ifdef REAL_ARITHMETIC
-# if MAX_LONG_DOUBLE_TYPE_SIZE == 96
-# define REAL_WIDTH \
+#if MAX_LONG_DOUBLE_TYPE_SIZE == 96
+# define REAL_WIDTH \
(11*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
+#else
+# if MAX_LONG_DOUBLE_TYPE_SIZE == 128
+# define REAL_WIDTH \
+ (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
# else
-# if MAX_LONG_DOUBLE_TYPE_SIZE == 128
+# if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
# define REAL_WIDTH \
- (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
-# else
-# if HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
-# define REAL_WIDTH \
(7*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT
-# endif
# endif
# endif
-#endif /* REAL_ARITHMETIC */
+#endif
#ifndef REAL_WIDTH
# if HOST_BITS_PER_WIDE_INT*2 >= MAX_LONG_DOUBLE_TYPE_SIZE
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 55cbfc6fbbe..5596e0c1e0a 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -102,10 +102,8 @@ static rtx simplify_plus_minus PARAMS ((enum rtx_code,
enum machine_mode, rtx,
rtx, int));
static void check_fold_consts PARAMS ((PTR));
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
static void simplify_unary_real PARAMS ((PTR));
static void simplify_binary_real PARAMS ((PTR));
-#endif
static void simplify_binary_is2orm1 PARAMS ((PTR));
@@ -339,7 +337,6 @@ simplify_replace_rtx (x, old, new)
return x;
}
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
/* Subroutine of simplify_unary_operation, called via do_float_handler.
Handles simplification of unary ops on floating point values. */
struct simplify_unary_real_args
@@ -398,7 +395,6 @@ simplify_unary_real (p)
args->result = CONST_DOUBLE_FROM_REAL_VALUE (d, args->mode);
}
}
-#endif
/* Try to simplify a unary operation CODE whose output mode is to be
MODE with input operand OP whose mode was originally OP_MODE.
@@ -417,8 +413,6 @@ simplify_unary_operation (code, mode, op, op_mode)
check the wrong mode (input vs. output) for a conversion operation,
such as FIX. At some point, this should be simplified. */
-#if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
-
if (code == FLOAT && GET_MODE (trueop) == VOIDmode
&& (GET_CODE (trueop) == CONST_DOUBLE || GET_CODE (trueop) == CONST_INT))
{
@@ -430,25 +424,7 @@ simplify_unary_operation (code, mode, op, op_mode)
else
lv = CONST_DOUBLE_LOW (trueop), hv = CONST_DOUBLE_HIGH (trueop);
-#ifdef REAL_ARITHMETIC
REAL_VALUE_FROM_INT (d, lv, hv, mode);
-#else
- if (hv < 0)
- {
- d = (double) (~ hv);
- d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
- * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d += (double) (unsigned HOST_WIDE_INT) (~ lv);
- d = (- d - 1.0);
- }
- else
- {
- d = (double) hv;
- d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
- * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d += (double) (unsigned HOST_WIDE_INT) lv;
- }
-#endif /* REAL_ARITHMETIC */
d = real_value_truncate (mode, d);
return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
}
@@ -476,19 +452,10 @@ simplify_unary_operation (code, mode, op, op_mode)
else
hv = 0, lv &= GET_MODE_MASK (op_mode);
-#ifdef REAL_ARITHMETIC
REAL_VALUE_FROM_UNSIGNED_INT (d, lv, hv, mode);
-#else
-
- d = (double) (unsigned HOST_WIDE_INT) hv;
- d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
- * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d += (double) (unsigned HOST_WIDE_INT) lv;
-#endif /* REAL_ARITHMETIC */
d = real_value_truncate (mode, d);
return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
}
-#endif
if (GET_CODE (trueop) == CONST_INT
&& width <= HOST_BITS_PER_WIDE_INT && width > 0)
@@ -664,7 +631,6 @@ simplify_unary_operation (code, mode, op, op_mode)
return immed_double_const (lv, hv, mode);
}
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
else if (GET_CODE (trueop) == CONST_DOUBLE
&& GET_MODE_CLASS (mode) == MODE_FLOAT)
{
@@ -696,7 +662,7 @@ simplify_unary_operation (code, mode, op, op_mode)
return 0;
}
-#endif
+
/* This was formerly used only for non-IEEE float.
eggert@twinsun.com says it is safe for IEEE also. */
else
@@ -770,7 +736,6 @@ simplify_unary_operation (code, mode, op, op_mode)
}
}
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
/* Subroutine of simplify_binary_operation, called via do_float_handler.
Handles simplification of binary ops on floating point values. */
struct simplify_binary_real_args
@@ -794,7 +759,6 @@ simplify_binary_real (p)
f0 = real_value_truncate (args->mode, f0);
f1 = real_value_truncate (args->mode, f1);
-#ifdef REAL_ARITHMETIC
#ifndef REAL_INFINITY
if (args->code == DIV && REAL_VALUES_EQUAL (f1, dconst0))
{
@@ -803,40 +767,10 @@ simplify_binary_real (p)
}
#endif
REAL_ARITHMETIC (value, rtx_to_tree_code (args->code), f0, f1);
-#else
- switch (args->code)
- {
- case PLUS:
- value = f0 + f1;
- break;
- case MINUS:
- value = f0 - f1;
- break;
- case MULT:
- value = f0 * f1;
- break;
- case DIV:
-#ifndef REAL_INFINITY
- if (f1 == 0)
- return 0;
-#endif
- value = f0 / f1;
- break;
- case SMIN:
- value = MIN (f0, f1);
- break;
- case SMAX:
- value = MAX (f0, f1);
- break;
- default:
- abort ();
- }
-#endif
value = real_value_truncate (args->mode, value);
args->result = CONST_DOUBLE_FROM_REAL_VALUE (value, args->mode);
}
-#endif
/* Another subroutine called via do_float_handler. This one tests
the floating point value given against 2. and -1. */
@@ -894,7 +828,6 @@ simplify_binary_operation (code, mode, op0, op1)
tem = trueop0, trueop0 = trueop1, trueop1 = tem;
}
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
if (GET_MODE_CLASS (mode) == MODE_FLOAT
&& GET_CODE (trueop0) == CONST_DOUBLE
&& GET_CODE (trueop1) == CONST_DOUBLE
@@ -910,7 +843,6 @@ simplify_binary_operation (code, mode, op0, op1)
return args.result;
return 0;
}
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
/* We can fold some multi-word operations. */
if (GET_MODE_CLASS (mode) == MODE_INT
@@ -1432,7 +1364,6 @@ simplify_binary_operation (code, mode, op0, op1)
&& ! side_effects_p (op1))
return op0;
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
/* Change division by a constant into multiplication. Only do
this with -funsafe-math-optimizations. */
else if (GET_CODE (trueop1) == CONST_DOUBLE
@@ -1445,18 +1376,11 @@ simplify_binary_operation (code, mode, op0, op1)
if (! REAL_VALUES_EQUAL (d, dconst0))
{
-#if defined (REAL_ARITHMETIC)
REAL_ARITHMETIC (d, rtx_to_tree_code (DIV), dconst1, d);
return gen_rtx_MULT (mode, op0,
CONST_DOUBLE_FROM_REAL_VALUE (d, mode));
-#else
- return
- gen_rtx_MULT (mode, op0,
- CONST_DOUBLE_FROM_REAL_VALUE (1./d, mode));
-#endif
}
}
-#endif
break;
case UMOD:
@@ -2102,7 +2026,6 @@ simplify_relational_operation (code, mode, op0, op1)
/* If the operands are floating-point constants, see if we can fold
the result. */
-#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
else if (GET_CODE (trueop0) == CONST_DOUBLE
&& GET_CODE (trueop1) == CONST_DOUBLE
&& GET_MODE_CLASS (GET_MODE (trueop0)) == MODE_FLOAT)
@@ -2145,7 +2068,6 @@ simplify_relational_operation (code, mode, op0, op1)
op0lt = op0ltu = args.op0lt;
op1lt = op1ltu = args.op1lt;
}
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
/* Otherwise, see if the operands are both integers. */
else if ((GET_MODE_CLASS (mode) == MODE_INT || mode == VOIDmode)
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 2d72c3fc74d..11c55464468 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -726,12 +726,6 @@ int flag_asynchronous_unwind_tables = 0;
int flag_no_common;
-/* Nonzero means pretend it is OK to examine bits of target floats,
- even if that isn't true. The resulting code will have incorrect constants,
- but the same series of instructions that the native compiler would make. */
-
-int flag_pretend_float;
-
/* Nonzero means change certain warnings into errors.
Usually these are warnings about failure to conform to some standard. */
@@ -1055,8 +1049,6 @@ static const lang_independent_options f_options[] =
N_("Run the loop optimizer twice") },
{"delete-null-pointer-checks", &flag_delete_null_pointer_checks, 1,
N_("Delete useless null pointer checks") },
- {"pretend-float", &flag_pretend_float, 1,
- N_("Pretend that host and target use the same FP format") },
{"schedule-insns", &flag_schedule_insns, 1,
N_("Reschedule instructions before register allocation") },
{"schedule-insns2", &flag_schedule_insns_after_reload, 1,
diff --git a/gcc/tree.c b/gcc/tree.c
index de65191e672..a54b50641cb 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -613,15 +613,12 @@ build_real (type, d)
/* Return a new REAL_CST node whose type is TYPE
and whose value is the integer value of the INTEGER_CST node I. */
-#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
-
REAL_VALUE_TYPE
real_value_from_int_cst (type, i)
tree type ATTRIBUTE_UNUSED, i;
{
REAL_VALUE_TYPE d;
-#ifdef REAL_ARITHMETIC
/* Clear all bits of the real value type so that we can later do
bitwise comparisons to see if two values are the same. */
memset ((char *) &d, 0, sizeof d);
@@ -632,33 +629,6 @@ real_value_from_int_cst (type, i)
else
REAL_VALUE_FROM_UNSIGNED_INT (d, TREE_INT_CST_LOW (i),
TREE_INT_CST_HIGH (i), TYPE_MODE (type));
-#else /* not REAL_ARITHMETIC */
- /* Some 386 compilers mishandle unsigned int to float conversions,
- so introduce a temporary variable E to avoid those bugs. */
- if (TREE_INT_CST_HIGH (i) < 0 && ! TREE_UNSIGNED (TREE_TYPE (i)))
- {
- REAL_VALUE_TYPE e;
-
- d = (double) (~TREE_INT_CST_HIGH (i));
- e = ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
- * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d *= e;
- e = (double) (~TREE_INT_CST_LOW (i));
- d += e;
- d = (- d - 1.0);
- }
- else
- {
- REAL_VALUE_TYPE e;
-
- d = (double) (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (i);
- e = ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
- * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d *= e;
- e = (double) TREE_INT_CST_LOW (i);
- d += e;
- }
-#endif /* not REAL_ARITHMETIC */
return d;
}
@@ -680,13 +650,7 @@ build_real_from_int_cst_1 (data)
{
struct brfic_args *args = (struct brfic_args *) data;
-#ifdef REAL_ARITHMETIC
args->d = real_value_from_int_cst (args->type, args->i);
-#else
- args->d
- = REAL_VALUE_TRUNCATE (TYPE_MODE (args->type),
- real_value_from_int_cst (args->type, args->i));
-#endif
}
/* Given a tree representing an integer constant I, return a tree
@@ -732,8 +696,6 @@ build_real_from_int_cst (type, i)
return v;
}
-#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */
-
/* Return a newly constructed STRING_CST node whose value is
the LEN characters at STR.
The TREE_TYPE is not initialized. */
OpenPOWER on IntegriCloud