This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: sh-elf-4_1-branch created


Joern RENNECKE <joern.rennecke@st.com> wrote:
> There are a few new regressions for SH64, but overall there are still 
> less regressions for
> SH64 in C than without these patches.

I've tried sh64-unknown-linux-gnu configuration and found all
executables segfault.  The exception occurs at PTABS insn in
__do_global_ctors_aux with the source register value -1.  This
function looks like:

typedef void (*func_ptr) (void);
static func_ptr __CTOR_END__[1];

void
__do_global_ctors_aux (void)
{
  func_ptr *p;
  for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
    (*p) ();
}

and sh-elf-4_1 compiler produces the assembler code below for it:

__do_global_ctors_aux:
	addi.l	r15, -24, r15
	st.l	r15, 12, r18
	st.l	r15, 8, r14
	st.l	r15, 4, r10
	add.l	r15, r63, r14
	movi	((datalabel __CTOR_END__ >> 16) & 65535), r1
	shori	(datalabel __CTOR_END__ & 65535), r1
	addi.l	r1, -4, r10
	ld.l	r1, -4, r1
	ptabs	r1, tr0
	pt	.L4, tr1
	beqi/u	r1, -1, tr1
.L5:
	blink	tr0, r18
	...

with -O1.  When *p is -1, it will load to R1 and the misalignment
exception is raised in the execution of PTABS instruction.

BTW, I've run "make check" with crt*.o which are compiled with -O0
and got FAILs with

: undefined reference to `__sdivsi3_1'

for some tests using -O0 and -Os.  It seems this is because linux
target uses -fpic to compile libgcc and __sdivsi3_1 is guarded with
#ifndef __pic__.  Which division strategy ought to be used in this
case?

I've appended the result of make check RUNTESTFLAGS="-mdiv=inv:minlat"
for c&c++ compilers.  It's the best result on sh64-unknown-linux-gnu
I've ever seen.

Regards,
	kaz
--
Target is sh64-unknown-linux-gnu
Host   is i686-pc-linux-gnu

		=== g++ tests ===


Running target unix
WARNING: Assuming target board is the local machine (which is probably wrong).
FAIL: g++.dg/abi/bitfield5.C  (test for warnings, line 11)
FAIL: g++.dg/eh/registers1.C execution test
FAIL: g++.dg/pch/pch.C (test for excess errors)
FAIL: g++.old-deja/g++.abi/cxa_vec.C execution test
XPASS: g++.old-deja/g++.jason/thunk3.C execution test
FAIL: g++.old-deja/g++.law/profile1.C (test for excess errors)
WARNING: g++.old-deja/g++.law/profile1.C compilation failed to produce executable

		=== g++ Summary ===

# of expected passes		10896
# of unexpected failures	5
# of unexpected successes	1
# of expected failures		66
# of untested testcases		1
# of unsupported tests		101
/ext3/suzaku/home/kkojima/xsh-gcc-shelf41/gcc/testsuite/../g++  version 4.1.0 20050405 (experimental)

Host   is i686-pc-linux-gnu

		=== gcc tests ===


Running target unix
WARNING: Assuming target board is the local machine (which is probably wrong).
FAIL: gcc.c-torture/compile/simd-4.c (test for excess errors)
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -O3 -fomit-frame-pointer 
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops 
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions 
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c execution,  -Os 
FAIL: tmpdir-gcc.dg-struct-layout-1/t011 c_compat_x_tst.o-c_compat_y_tst.o execute 
FAIL: tmpdir-gcc.dg-struct-layout-1/t021 c_compat_x_tst.o-c_compat_y_tst.o execute 
FAIL: tmpdir-gcc.dg-struct-layout-1/t026 c_compat_x_tst.o-c_compat_y_tst.o execute 
FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o-c_compat_y_tst.o execute 
FAIL: gcc.dg/20021014-1.c (test for excess errors)
WARNING: gcc.dg/20021014-1.c compilation failed to produce executable
FAIL: gcc.dg/20050321-1.c (test for excess errors)
FAIL: gcc.dg/align-2.c (test for excess errors)
FAIL: gcc.dg/nest.c (test for excess errors)
WARNING: gcc.dg/nest.c compilation failed to produce executable
FAIL: gcc.dg/simd-2.c (test for excess errors)
FAIL: gcc.dg/pch/save-temps-1.c (test for excess errors)
FAIL: gcc.dg/pch/save-temps-1.c (test for excess errors)
FAIL: gcc.dg/pch/save-temps-1.c (test for excess errors)
XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times link_error 0
FAIL: gcc.dg/tree-ssa/loop-1.c scan-assembler-times foo 5
XPASS: gcc.dg/tree-ssa/sra-2.c scan-tree-dump-times link_error 0

		=== gcc Summary ===

# of expected passes		33258
# of unexpected failures	22
# of unexpected successes	2
# of expected failures		73
# of untested testcases		31
# of unsupported tests		500
/ext3/suzaku/home/kkojima/xsh-gcc-shelf41/gcc/xgcc  version 4.1.0 20050405 (experimental)


Compiler version: 4.1.0 20050405 (experimental) 
Platform: sh64-unknown-linux-gnu
configure flags: --host=i686-pc-linux-gnu --target=sh64-unknown-linux-gnu --enable-shared --enable-threads --with-ld=/usr/local/bin/sh64-unknown-linux-gnu-ld --disable-checking --with-sysroot=/ext3/suzaku/ --disable-multilib --enable-languages=c,c++,java


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