public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* The new ia64 assembler is incompatible with glibc
@ 2005-02-14  6:32 H. J. Lu
  2005-02-14  8:35 ` H. J. Lu
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2005-02-14  6:32 UTC (permalink / raw)
  To: jbeulich; +Cc: wilson, binutils

[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]

After applied 2 patches enclosed here, I can compile glibc in CVS. But
I got so many failures in "make check":

make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/math/basic-test.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-double.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-float.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-idouble.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ifloat.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ldouble.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ildoubl.out]
Error 1
make[3]: *** [math/xtests] Error 2
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/stdio-common/tstscanf.out]
Error 1
make[4]: ***
[/export/build/gnu/glibc-nptl/build-ia64-linux/stdio-common/tstdiomisc.out]
Error 1

It looks like the math functions are wrong. Replacing the new assembler
with the old one fixes the problem.


H.J.

[-- Attachment #2: libc-ia64-unwind-1.patch --]
[-- Type: text/plain, Size: 673 bytes --]

--- sysdeps/ia64/elf/initfini.c.unwind	2004-08-18 16:13:30.000000000 -0700
+++ sysdeps/ia64/elf/initfini.c	2005-02-03 15:53:18.000000000 -0800
@@ -116,13 +116,14 @@ __asm__ (".section .init\n"
 "/*@_init_PROLOG_ENDS*/\n"
 "\n"
 "/*@_init_EPILOG_BEGINS*/\n"
+"	.section .init\n"
 "	.proc _init#\n"
+"_init:\n"
 "	.prologue\n"
 "	.save ar.pfs, r34\n"
 "	.vframe r32\n"
 "	.save rp, r33\n"
 "	.body\n"
-"	.section .init\n"
 "	.regstk 0,2,0,0\n"
 "	mov r12 = r32\n"
 "	mov ar.pfs = r34\n"
@@ -155,6 +156,7 @@ __asm__ (".section .init\n"
 "/*@_fini_EPILOG_BEGINS*/\n"
 "	.section .fini\n"
 "	.proc _fini#\n"
+"_fini:\n"
 "	.prologue\n"
 "	.save ar.pfs, r34\n"
 "	.vframe r32\n"

[-- Attachment #3: libc-ia64-munwind-1.patch --]
[-- Type: text/plain, Size: 3952 bytes --]

2005-02-10  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/ia64/fpu/e_scalb.S: Replace __libm_error_region: with
	LOCAL_LIBM_ENTRY(__libm_error_region)
	* sysdeps/ia64/fpu/e_scalbf.S: Likewise
	* sysdeps/ia64/fpu/e_scalbl.S: Likewise
	* sysdeps/ia64/fpu/libm_scalblnf.S: Likewise
	* sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise
	* sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise
	* sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise
	* sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise
	* sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise
	* sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise

--- sysdeps/ia64/fpu/e_scalb.S.munwind	2005-01-07 14:13:58.000000000 -0800
+++ sysdeps/ia64/fpu/e_scalb.S	2005-02-03 16:00:20.000000000 -0800
@@ -461,7 +461,7 @@ SCALB_NAN_INF_ZERO: 
 };;
 
 GLOBAL_IEEE754_END(scalb)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 SCALB_OVERFLOW: 
 SCALB_UNDERFLOW: 
--- sysdeps/ia64/fpu/e_scalbf.S.munwind	2005-01-07 14:13:58.000000000 -0800
+++ sysdeps/ia64/fpu/e_scalbf.S	2005-02-03 16:00:29.000000000 -0800
@@ -461,7 +461,7 @@ SCALBF_NAN_INF_ZERO: 
 };;
 
 GLOBAL_IEEE754_END(scalbf)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 SCALBF_OVERFLOW: 
 SCALBF_UNDERFLOW: 
--- sysdeps/ia64/fpu/e_scalbl.S.munwind	2005-01-07 14:13:58.000000000 -0800
+++ sysdeps/ia64/fpu/e_scalbl.S	2005-02-03 16:00:41.000000000 -0800
@@ -461,7 +461,7 @@ SCALBL_NAN_INF_ZERO: 
 };;
 
 GLOBAL_IEEE754_END(scalbl)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 SCALBL_OVERFLOW: 
 SCALBL_UNDERFLOW: 
--- sysdeps/ia64/fpu/libm_scalblnf.S.munwind	2005-01-06 03:29:22.000000000 -0800
+++ sysdeps/ia64/fpu/libm_scalblnf.S	2005-02-03 16:00:45.000000000 -0800
@@ -296,7 +296,7 @@ GLOBAL_LIBM_ENTRY(__libm_scalblnf)
 }
 
 GLOBAL_LIBM_END(__libm_scalblnf)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 scalbnf_OVERFLOW: 
 scalbnf_UNDERFLOW: 
--- sysdeps/ia64/fpu/s_libm_ldexp.S.munwind	2005-01-06 03:29:22.000000000 -0800
+++ sysdeps/ia64/fpu/s_libm_ldexp.S	2005-02-03 15:56:52.000000000 -0800
@@ -296,7 +296,7 @@ GLOBAL_LIBM_ENTRY(__libm_ldexp)
 }
 
 GLOBAL_LIBM_END(__libm_ldexp)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 LDEXP_OVERFLOW: 
 LDEXP_UNDERFLOW: 
--- sysdeps/ia64/fpu/s_libm_ldexpf.S.munwind	2005-01-06 03:29:22.000000000 -0800
+++ sysdeps/ia64/fpu/s_libm_ldexpf.S	2005-02-03 15:57:07.000000000 -0800
@@ -294,7 +294,7 @@ GLOBAL_LIBM_ENTRY(__libm_ldexpf)
 }
 
 GLOBAL_LIBM_END(__libm_ldexpf)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 LDEXPF_OVERFLOW: 
 LDEXPF_UNDERFLOW: 
--- sysdeps/ia64/fpu/s_libm_ldexpl.S.munwind	2005-01-06 03:29:22.000000000 -0800
+++ sysdeps/ia64/fpu/s_libm_ldexpl.S	2005-02-03 15:55:21.000000000 -0800
@@ -295,7 +295,7 @@ GLOBAL_LIBM_ENTRY(__libm_ldexpl)
 }
 
 GLOBAL_LIBM_END(__libm_ldexpl)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 LDEXPL_OVERFLOW: 
 LDEXPL_UNDERFLOW: 
--- sysdeps/ia64/fpu/s_libm_scalbn.S.munwind	2005-01-06 03:29:22.000000000 -0800
+++ sysdeps/ia64/fpu/s_libm_scalbn.S	2005-02-03 16:00:49.000000000 -0800
@@ -295,7 +295,7 @@ GLOBAL_LIBM_ENTRY(__libm_scalbn)
 }
 
 GLOBAL_LIBM_END(__libm_scalbn)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 SCALBN_OVERFLOW: 
 SCALBN_UNDERFLOW: 
--- sysdeps/ia64/fpu/s_libm_scalbnf.S.munwind	2005-01-06 03:29:22.000000000 -0800
+++ sysdeps/ia64/fpu/s_libm_scalbnf.S	2005-02-03 16:00:53.000000000 -0800
@@ -295,7 +295,7 @@ GLOBAL_LIBM_ENTRY(__libm_scalbnf)
 }
 
 GLOBAL_LIBM_END(__libm_scalbnf)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 SCALBNF_OVERFLOW: 
 SCALBNF_UNDERFLOW: 
--- sysdeps/ia64/fpu/s_libm_scalbnl.S.munwind	2005-01-06 03:29:22.000000000 -0800
+++ sysdeps/ia64/fpu/s_libm_scalbnl.S	2005-02-03 16:01:07.000000000 -0800
@@ -295,7 +295,7 @@ GLOBAL_LIBM_ENTRY(__libm_scalbnl)
 }
 
 GLOBAL_LIBM_END(__libm_scalbnl)
-__libm_error_region:
+LOCAL_LIBM_ENTRY(__libm_error_region)
 
 SCALBNL_OVERFLOW: 
 SCALBNL_UNDERFLOW: 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: The new ia64 assembler is incompatible with glibc
  2005-02-14  6:32 The new ia64 assembler is incompatible with glibc H. J. Lu
@ 2005-02-14  8:35 ` H. J. Lu
  2005-02-14  9:36   ` PATCH: Add an ia64 gas testcase for @nat|@qnan H. J. Lu
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2005-02-14  8:35 UTC (permalink / raw)
  To: jbeulich; +Cc: wilson, binutils

On Sun, Feb 13, 2005 at 09:18:34AM -0800, H. J. Lu wrote:
> After applied 2 patches enclosed here, I can compile glibc in CVS. But
> I got so many failures in "make check":
> 
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/math/basic-test.out]
> Error 1
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-double.out]
> Error 1
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-float.out]
> Error 1
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-idouble.out]
> Error 1
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ifloat.out]
> Error 1
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ldouble.out]
> Error 1
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ildoubl.out]
> Error 1
> make[3]: *** [math/xtests] Error 2
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/stdio-common/tstscanf.out]
> Error 1
> make[4]: ***
> [/export/build/gnu/glibc-nptl/build-ia64-linux/stdio-common/tstdiomisc.out]
> Error 1
> 
> It looks like the math functions are wrong. Replacing the new assembler
> with the old one fixes the problem.
> 

The problem is caused by

http://sourceware.org/ml/binutils/2005-02/msg00122.html

Gas no longer handles

fclass.m p6, p7 = farg0, @inf|@pos

correctly. Jan, could you please fix it?

Thanks.


H.J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* PATCH: Add an ia64 gas testcase for @nat|@qnan
  2005-02-14  8:35 ` H. J. Lu
@ 2005-02-14  9:36   ` H. J. Lu
  2005-02-15  0:00     ` James E Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2005-02-14  9:36 UTC (permalink / raw)
  To: jbeulich; +Cc: wilson, binutils

On Sun, Feb 13, 2005 at 10:42:15AM -0800, H. J. Lu wrote:
> On Sun, Feb 13, 2005 at 09:18:34AM -0800, H. J. Lu wrote:
> > After applied 2 patches enclosed here, I can compile glibc in CVS. But
> > I got so many failures in "make check":
> > 
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/math/basic-test.out]
> > Error 1
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-double.out]
> > Error 1
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-float.out]
> > Error 1
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-idouble.out]
> > Error 1
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ifloat.out]
> > Error 1
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ldouble.out]
> > Error 1
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/math/test-ildoubl.out]
> > Error 1
> > make[3]: *** [math/xtests] Error 2
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/stdio-common/tstscanf.out]
> > Error 1
> > make[4]: ***
> > [/export/build/gnu/glibc-nptl/build-ia64-linux/stdio-common/tstdiomisc.out]
> > Error 1
> > 
> > It looks like the math functions are wrong. Replacing the new assembler
> > with the old one fixes the problem.
> > 
> 
> The problem is caused by
> 
> http://sourceware.org/ml/binutils/2005-02/msg00122.html
> 
> Gas no longer handles
> 
> fclass.m p6, p7 = farg0, @inf|@pos
> 
> correctly. Jan, could you please fix it?
> 

I am going to check in this testcase to catch the error.


H.J.
----
2005-02-13  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/ia64/ia64.exp: Add "operand-or".

	* gas/ia64/operand-or.d: New file.
	* gas/ia64/operand-or.s: Likewise.

--- gas/testsuite/gas/ia64/ia64.exp.or	2005-02-11 13:21:20.000000000 -0800
+++ gas/testsuite/gas/ia64/ia64.exp	2005-02-13 11:18:23.604690961 -0800
@@ -72,4 +72,6 @@ if [istarget "ia64-*"] then {
     run_list_test "unwind-err" "-munwind-check=error"
     run_list_test "hint.b-err" ""
     run_list_test "hint.b-warn" "-mhint.b=warning"
+
+    run_dump_test "operand-or"
 }
--- gas/testsuite/gas/ia64/operand-or.d.or	2005-02-13 11:18:23.604690961 -0800
+++ gas/testsuite/gas/ia64/operand-or.d	2005-02-13 11:18:23.604690961 -0800
@@ -0,0 +1,29 @@
+# objdump: -d --disassemble-zeroes
+# name: ia64 operand-or
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+000 <_start>:
+   0:	1c 00 00 00 01 00 	\[MFB\]       nop\.m 0x0
+   6:	30 20 80 09 28 00 	            fclass\.m p3,p4=f4,0x180
+   c:	00 00 00 20       	            nop\.b 0x0
+  10:	1c 00 00 00 01 00 	\[MFB\]       nop\.m 0x0
+  16:	30 20 c0 09 28 00 	            fclass\.m p3,p4=f4,0x1c0
+  1c:	00 00 00 20       	            nop\.b 0x0
+  20:	1c 00 00 00 01 00 	\[MFB\]       nop\.m 0x0
+  26:	30 20 c0 89 28 00 	            fclass\.m p3,p4=f4,0x1c1
+  2c:	00 00 00 20       	            nop\.b 0x0
+  30:	1c 00 00 00 01 00 	\[MFB\]       nop\.m 0x0
+  36:	30 20 c0 89 29 00 	            fclass\.m p3,p4=f4,0x1c3
+  3c:	00 00 00 20       	            nop\.b 0x0
+  40:	1c 00 00 00 01 00 	\[MFB\]       nop\.m 0x0
+  46:	30 20 c8 89 29 00 	            fclass\.m p3,p4=f4,0x1cb
+  4c:	00 00 00 20       	            nop\.b 0x0
+  50:	1c 00 00 00 01 00 	\[MFB\]       nop\.m 0x0
+  56:	30 20 d8 89 29 00 	            fclass\.m p3,p4=f4,0x1db
+  5c:	00 00 00 20       	            nop\.b 0x0
+  60:	1d 00 00 00 01 00 	\[MFB\]       nop\.m 0x0
+  66:	30 20 f8 89 29 00 	            fclass\.m p3,p4=f4,0x1fb
+  6c:	00 00 00 20       	            nop\.b 0x0;;
--- gas/testsuite/gas/ia64/operand-or.s.or	2005-02-13 11:18:23.605690831 -0800
+++ gas/testsuite/gas/ia64/operand-or.s	2005-02-13 11:18:23.605690831 -0800
@@ -0,0 +1,11 @@
+.text
+	.type _start,@function
+_start:
+
+	fclass.m p3, p4 = f4, @nat|@qnan
+	fclass.m p3, p4 = f4, @nat|@qnan|@snan
+	fclass.m p3, p4 = f4, @nat|@qnan|@snan|@pos
+	fclass.m p3, p4 = f4, @nat|@qnan|@snan|@pos|@neg
+	fclass.m p3, p4 = f4, @nat|@qnan|@snan|@pos|@neg|@unorm
+	fclass.m p3, p4 = f4, @nat|@qnan|@snan|@pos|@neg|@unorm|@norm
+	fclass.m p3, p4 = f4, @nat|@qnan|@snan|@pos|@neg|@unorm|@norm|@inf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: Add an ia64 gas testcase for @nat|@qnan
  2005-02-14  9:36   ` PATCH: Add an ia64 gas testcase for @nat|@qnan H. J. Lu
@ 2005-02-15  0:00     ` James E Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: James E Wilson @ 2005-02-15  0:00 UTC (permalink / raw)
  To: H. J. Lu; +Cc: jbeulich, binutils

On Sun, 2005-02-13 at 11:22, H. J. Lu wrote:
> 	* gas/ia64/ia64.exp: Add "operand-or".
> 	* gas/ia64/operand-or.d: New file.
> 	* gas/ia64/operand-or.s: Likewise.

Thanks for finding the problem and adding a testcase for it.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-02-14 19:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-14  6:32 The new ia64 assembler is incompatible with glibc H. J. Lu
2005-02-14  8:35 ` H. J. Lu
2005-02-14  9:36   ` PATCH: Add an ia64 gas testcase for @nat|@qnan H. J. Lu
2005-02-15  0:00     ` James E Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).