aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gcc.gnu.org>2003-12-20 13:56:47 -0800
committerAndrew Pinski <pinskia@gcc.gnu.org>2003-12-20 13:56:47 -0800
commit781f4ec18fc8cba7f574256630f636424ae2401a (patch)
tree48c1d8c22cabcd4478f077338325d478c4a144d4 /gcc
parent3b24df36c08c710b71a76b683f4d3b972c162e9e (diff)
downloadgcc-781f4ec18fc8cba7f574256630f636424ae2401a.zip
gcc-781f4ec18fc8cba7f574256630f636424ae2401a.tar.gz
gcc-781f4ec18fc8cba7f574256630f636424ae2401a.tar.bz2
re PR target/12749 (i386 LP64 bug.)
2003-12-20 Andrew Pinski <pinskia@gcc.gnu.org> Matt Thomas <matt@3am-software.com> PR target/12749 * config/i386/i386.c (print_operand): Print only the first 8 characters of the float in hex. 2003-12-20 Andrew Pinski <pinskia@gcc.gnu.org> PR target/12749 * gcc.c-torture/compile/20031220-2.c: New test case. Co-Authored-By: Matt Thomas <matt@3am-software.com> From-SVN: r74893
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20031220-2.c44
4 files changed, 57 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6e4bac8..fa93489 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-12-20 Andrew Pinski <pinskia@gcc.gnu.org>
+ Matt Thomas <matt@3am-software.com>
+
+ PR target/12749
+ * config/i386/i386.c (print_operand): Print only the first
+ 8 characters of the float in hex.
+
2003-12-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.h (TRAMPOLINE_TEMPLATE): Shorten sequence when generating PA
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a93d82e..cb6ffda 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -7457,7 +7457,7 @@ print_operand (FILE *file, rtx x, int code)
if (ASSEMBLER_DIALECT == ASM_ATT)
putc ('$', file);
- fprintf (file, "0x%lx", l);
+ fprintf (file, "0x%08lx", l);
}
/* These float cases don't actually occur as immediate operands. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 25db32b..ccdbbe2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-20 Andrew Pinski <pinskia@gcc.gnu.org>
+
+ PR target/12749
+ * gcc.c-torture/compile/20031220-2.c: New test case.
+
2003-12-20 Roger Sayle <roger@eyesopen.com>
PR optimization/13031
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031220-2.c b/gcc/testsuite/gcc.c-torture/compile/20031220-2.c
new file mode 100644
index 0000000..45c8277
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20031220-2.c
@@ -0,0 +1,44 @@
+/* PR target/12749
+ Orgin: Matt Thomas <matt@3am-software.com>
+ This used to cause GCC to write out an instruction for i386 when using a L64 host
+ which gas could not handle because GCC would write a full 64bit hex string out. */
+
+
+float fabsf (float);
+typedef int __int32_t;
+typedef unsigned int __uint32_t;
+typedef union
+{
+ float value;
+ __uint32_t word;
+} ieee_float_shape_type;
+extern float __ieee754_expf (float);
+extern float __ieee754_sinhf (float);
+static const float one = 1.0, shuge = 1.0e37;
+float
+__ieee754_sinhf(float x)
+{
+ float t,w,h;
+ __int32_t ix,jx;
+ do { ieee_float_shape_type gf_u; gf_u.value = (x); (jx) = gf_u.word; } while (0);
+ ix = jx&0x7fffffff;
+ if(ix>=0x7f800000) return x+x;
+ h = 0.5;
+ if (jx<0) h = -h;
+ if (ix < 0x41b00000) {
+ if (ix<0x31800000)
+ if(shuge+x>one) return x;
+ t = expm1f(fabsf(x));
+ if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one));
+ return h*(t+t/(t+one));
+ }
+ if (ix < 0x42b17180) return h*__ieee754_expf(fabsf(x));
+ if (ix<=0x42b2d4fc) {
+ w = __ieee754_expf((float)0.5*fabsf(x));
+ t = h*w;
+ return t*w;
+ }
+ return x*shuge;
+}
+
+