This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: BUG with libio/dbz/rdbz test case on m88k-motorola-sysv3


On Wed, 12 August 1998, 09:31:51, manfred@s-direktnet.de wrote:

 > On Wed, 12 August 1998, 01:27:18, law@hurl.cygnus.com wrote:
 > 
 >  > 
 >  >   In message <13777.15630.61036.161546@slsvhmt>you write:
 >  >   > Running the test with
 >  >   > 
 >  >   >   $ gmake check CFLAGS="-O9 -fno-gcse -g"
 >  >   > 
 >  >   > makes  the error go   away, too!  If this is   actually a GCSE related
 >  >   > problem, does anybody of you GCSE experts know, where to look at?
 >  > I'm "mr gcse" :-)
 > 
 > Thought that already ;-)
 > 
 >  > 
 >  > Any chance you could narrow this down to a specific function that is
 >  > being mis-compiled?  I don't have an m88k box :-)
 > 
 > I'll try that; unfortunately I  just wiped out  the build tree since I
 > thought I'd give another update a try (always low on disk space here);
 > s%#t, this system is so damn slow :-(
 > 

It's   function      "bytemap"  in   libio/dbz/dbz.c    which    get's
mis-compiled. Fortunately, the diffs in  the generated assembler  code
are quite small (note,  the no-gcse stuff works  OK); perhaps it'll be
an indication for you.

manfred


*** rdbz2.s-O9-no-gcse	Fri Aug 14 10:32:22 1998
--- rdbz2.s-O9-gcse	Fri Aug 14 10:31:17 1998
***************
*** 16,23 ****
  	subu	 r31,r31,16
  @Ltb0:
  	or	 r6,r0,0
! 	or	 r12,r0,r31
! 	addu	 r13,r31,4
  	st	 r2,r31,4
  @L5:
  	ld	 r9,r3[r6]
--- 16,24 ----
  	subu	 r31,r31,16
  @Ltb0:
  	or	 r6,r0,0
! 	subu	 r11,r31,8
! 	or	 r12,r11,8
! 	or	 r13,r11,12
  	st	 r2,r31,4
  @L5:
  	ld	 r9,r3[r6]


/*
 - bytemap - transform an off_t from byte ordering map1 to map2
 */
static off_t			/* transformed result */
bytemap(ino, map1, map2)
off_t ino;
int *map1;
int *map2;
{
	union oc {
		off_t o;
		char c[SOF];
	};
	union oc in;
	union oc out;
	register int i;

	in.o = ino;
	for (i = 0; i < SOF; i++)
		out.c[map2[i]] = in.c[map1[i]];
	return(out.o);
}

# This file is working OK: compiled with "-O9 -fno-gcse"
	file	 "rdbz2.c"
data
gcc2_compiled.:
___gnu_compiled_c:
	ident	 "@(#)types.h	10.8"
	ident	 "@(#)string.h	1.6 (Motorola VA Base)"
	ident	 "@(#)types.h	10.8"
	ident	 "@(#)ctype.h	1.3 (Motorola VA Base)"
	ident	 "@(#)errno.h	1.1 (Motorola VA Base)"
	ident	 "@(#)errno.h	10.4	(Motorola VA Base)"
	ident	 "@(#)baker:errno.h	3.14 9/20/89 10:32:27 Copyright 1988 UniSoft Corp. AT&T 3.2"
text
	align	 8
	global	 _bytemap
_bytemap:
	subu	 r31,r31,16
@Ltb0:
	or	 r6,r0,0
	or	 r12,r0,r31
	addu	 r13,r31,4
	st	 r2,r31,4
@L5:
	ld	 r9,r3[r6]
	ld	 r7,r4[r6]
	ld.bu	 r8,r9,r13
	addu	 r6,r6,1
	cmp	 r9,r6,3
	bb1.n	 ls,r9,@L5
	st.b	 r8,r7,r12
	ld	 r2,r0,r31
@Lte0:
	jmp.n	 r1
	addu	 r31,r31,16

section	 .tdesc,"x"
	word	 66,1,@Ltb0,@Lte0,0x100001f,0x10,0x1,0xfffffff0
text

# This doesn't work OK: compiled with "-O9"
	file	 "rdbz2.c"
data
gcc2_compiled.:
___gnu_compiled_c:
	ident	 "@(#)types.h	10.8"
	ident	 "@(#)string.h	1.6 (Motorola VA Base)"
	ident	 "@(#)types.h	10.8"
	ident	 "@(#)ctype.h	1.3 (Motorola VA Base)"
	ident	 "@(#)errno.h	1.1 (Motorola VA Base)"
	ident	 "@(#)errno.h	10.4	(Motorola VA Base)"
	ident	 "@(#)baker:errno.h	3.14 9/20/89 10:32:27 Copyright 1988 UniSoft Corp. AT&T 3.2"
text
	align	 8
	global	 _bytemap
_bytemap:
	subu	 r31,r31,16
@Ltb0:
	or	 r6,r0,0
	subu	 r11,r31,8
	or	 r12,r11,8
	or	 r13,r11,12
	st	 r2,r31,4
@L5:
	ld	 r9,r3[r6]
	ld	 r7,r4[r6]
	ld.bu	 r8,r9,r13
	addu	 r6,r6,1
	cmp	 r9,r6,3
	bb1.n	 ls,r9,@L5
	st.b	 r8,r7,r12
	ld	 r2,r0,r31
@Lte0:
	jmp.n	 r1
	addu	 r31,r31,16

section	 .tdesc,"x"
	word	 66,1,@Ltb0,@Lte0,0x100001f,0x10,0x1,0xfffffff0
text


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]