[#5922] gcc/g++ testcase regression in simulator test for Unhandled instruction
Submitted By: Mingquan Pan
Open Date
2010-02-22 22:22:20 Close Date
2010-04-20 07:59:08
Priority:
Medium Assignee:
Mike Frysinger
Robin Getz
Board:
N/A Silicon Revision:
Resolution:
Fixed Fixed In Release:
N/A
Processor:
BF548
Host Operating System:
suse
toolchain rev.:
trunk 4.3 head kernel rev.:
State:
Closed Found In Release:
2010R1
Is this bug repeatable?:
N/A
Summary: gcc/g++ testcase regression in simulator test for Unhandled instruction
Details:
gcc/g++ testcase regression in simulator test for Unhandled instruction.
Executing on host: bfin-elf-c++ /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/g++.old-deja/g++.robertl/eb120.C -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long -fno-show-column -msim -lm -o ./eb120.exe (timeout = 300)
spawn bfin-elf-c++ /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/g++.old-deja/g++.robertl/eb120.C -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long -fno-show-column -msim -lm -o ./eb120.exe^M
PASS: g++.old-deja/g++.robertl/eb120.C (test for excess errors)
spawn bfin-elf-run ./eb120.exe^M
Unhandled instruction at 0x00001bca"DIVQ (dregs , dregs)" ... aborting^M
FAIL: g++.old-deja/g++.robertl/eb120.C execution test
Executing on host: bfin-elf-gcc /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c -O2 -fpredictive-commoning -fdump-tree-pcom-details -fno-show-column -msim -lm -o ./predcom-2.exe (timeout = 300)
spawn bfin-elf-gcc /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.dg/tree-ssa/predcom-2.c -O2 -fpredictive-commoning -fdump-tree-pcom-details -fno-show-column -msim -lm -o ./predcom-2.exe^M
PASS: gcc.dg/tree-ssa/predcom-2.c (test for excess errors)
spawn bfin-elf-run ./predcom-2.exe^M
Unhandled instruction at 0x000002d2"DIVQ (dregs , dregs)" ... aborting^M
FAIL: gcc.dg/tree-ssa/predcom-2.c execution test
Executing on host: bfin-elf-gcc /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.c /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk-lib.c /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c -w -O1 -fno-show-column -msim -lm -o /home/test/work/cruise/temp/regtest_build4.3/gcc_build-4.3/gcc-test/memcpy-chk.x1 (timeout = 300)
spawn bfin-elf-gcc /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.c /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk-lib.c /home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c -w -O1 -fno-show-column -msim -lm -o /home/test/work/cruise/temp/regtest_build4.3/gcc_build-4.3/gcc-test/memcpy-chk.x1^M
PASS: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O1
spawn bfin-elf-run /home/test/work/cruise/temp/regtest_build4.3/gcc_build-4.3/gcc-test/memcpy-chk.x1^M
Unhandled instruction at 0x0000280e"DIVQ (dregs , dregs)" ... aborting^M
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution, -O1
passed version: toolchain 3945, uclinux 9458, linux 8327
failed version: toolchain 3947, uclinux 9459, linux 8333
Follow-ups
--- Mingquan Pan 2010-02-23 22:05:50
After doing reversion on latest toolchain trunk, it shows this issue is due to
the checkin [#3947].
And it looks this commit not only impact the simulator test, the built kernel
also shows strangely.
root:/> version
kernel: Linux release 2.6.32.8-ADI-2010R1-pre-svn8338, build #4 Tue Feb 23
23:44:03 CST 2010
toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3947)
user-dist: release svn-9462, build #2 Tue Feb 23 23:43:28 CST 2010
root:/> ls /lib/
;ssmld-uClibc.so.0 ;ssmlibgfortran.so.3 ;ssmlibnsl.so.0
;ssmlibstdc++.so.6
;ssmlibc.so.0 ;ssmlibgomp.so.1 ;ssmlibobjc.so.2
;ssmlibthread_db.so.1
;ssmlibcrypt.so.0 ;ssmlibm.so.0 ;ssmlibpthread.so.0
;ssmlibutil.so.0
;ssmlibdl.so.0 ;ssmlibmudflap.so.0 ;ssmlibresolv.so.0
;ssmmodules
;ssmlibgcc_s.so.1 ;ssmlibmudflapth.so.0 ;ssmlibrt.so.0
root:/>
root:/>
while :
root:/> version
kernel: Linux release 2.6.32.8-ADI-2010R1-pre-svn8338, build #10 Tue Feb 23
22:41:52 CST 2010
toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3946)
user-dist: release svn-9462, build #4 Tue Feb 23 22:41:14 CST 2010
root:/>
root:/> ls /lib/
ld-uClibc.so.0 libgfortran.so.3 libnsl.so.0 libstdc++.so.6
libc.so.0 libgomp.so.1 libobjc.so.2 libthread_db.so.1
libcrypt.so.0 libm.so.0 libpthread.so.0 libutil.so.0
libdl.so.0 libmudflap.so.0 libresolv.so.0 modules
libgcc_s.so.1 libmudflapth.so.0 librt.so.0
root:/>
--- Sonic Zhang 2010-02-23 22:20:28
I would revert Jie's commit 3947 "Use a new implementation for ___divsi3
and ___udivsi3". The patch is from Guolin Pan
<guolin.pan@analog.com> and reformated by Jie. It is attached here for
future tracking.
--- Robin Getz 2010-02-24 01:35:03
Was this just sim failures (due to the missing instructions), or was there
really hardware failures too?
It's easy to add instructions to the sim.
--- Mingquan Pan 2010-02-24 05:18:49
What I see is, in the testing with the revision 3947, the kernel shows
abnormally and block the hardware testing at gdb, so no results produced. While
with the previous version 3946, the toolchain testing is ok. So it needs to
solve the build kernel issue to know whether there is hardware failure in it.
--- Michael Hennerich 2010-02-24 08:20:31
I'm also getting all kind of weird errors after I updated my toolchain
yesterday.
root:/sys> ifconfig
eth0 Link encap:Ethernet HWaddr RR:RR:RR:RR:RR:RR
inet addr:... Bcast:... Mask:...
UP BROADCAST RUNNING MULTICAST MTU:ssss Metric:s
RX packets:sss errors:s dropped:s overruns:s frame:s
TX packets:s errors:s dropped:s overruns:s carrier:s
collisions:s txqueuelen:ssss
RX bytes:sssss (ss.s KiB) TX bytes:s (s.s B)
lo Link encap:Local Loopback
inet addr:... Mask:...
UP LOOPBACK RUNNING MTU:sssss Metric:s
RX packets:s errors:s dropped:s overruns:s frame:s
TX packets:s errors:s dropped:s overruns:s carrier:s
collisions:s txqueuelen:s
RX bytes:s (s.s B) TX bytes:s (s.s B)
root:/sys> ls
;ssmblock ;ssmclass ;ssmdevices ;ssmfs ;ssmmodule
;ssmbus ;ssmdev ;ssmfirmware ;ssmkernel ;ssmpower
root:/sys>
--- Robin Getz 2010-02-24 14:17:49
So -- the divs and divq are now in the sim.
Can we try again - or is this something that I should own?
-Robin
--- Mingquan Pan 2010-02-24 22:52:44
All right, I will try your new checkins with jie's 3947 patch. I would update
lator.
--- Mingquan Pan 2010-02-25 05:02:27
By using trunk head toolchain and Jie'3947, now the simulator result has been
better and have 46727 passes now, but there is still case error like:
Executing on host: bfin-elf-gcc
/home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/20040629-1.c
-w -O0 -fno-show-column -msim -lm -o
/home/test/work/cruise/temp/regtest_build4.3/gcc_build-4.3/gcc-test/20040629-1.x0
(timeout = 300)
spawn bfin-elf-gcc
/home/test/work/cruise/checkouts/toolchain/gcc-4.3/gcc/testsuite/gcc.c-torture/execute/20040629-1.c
-w -O0 -fno-show-column -msim -lm -o
/home/test/work/cruise/temp/regtest_build4.3/gcc_build-4.3/gcc-test/20040629-1.x0^M
PASS: gcc.c-torture/execute/20040629-1.c compilation, -O0
spawn bfin-elf-run
/home/test/work/cruise/temp/regtest_build4.3/gcc_build-4.3/gcc-test/20040629-1.x0^M
Unhandled dregs = dregs + dregs , dregs = dregs - dregs amod1 instruction at
0x00005002 ... aborting^M
FAIL: gcc.c-torture/execute/20040629-1.c execution, -O0
The detailed log is attached.
And the kernel built with this toolchain remain showing weird.
root:/> ls -l /bin/rcp /lib^M
-rwxr--r-- s root root sssss Feb 25 2010
^[[s;ssm/bin/rcp^[[0m^M
^M
/lib:^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmld-uClibc.so.0^[[0m^M
-rwxr-xr-x s root root ssssss Feb 25 2010
^[[s;ssmlibc.so.0^[[0m^M
-rwxr-xr-x s root root ssss Feb 25 2010
^[[s;ssmlibcrypt.so.0^[[0m^M
-rwxr-xr-x s root root ssss Feb 25 2010
^[[s;ssmlibdl.so.0^[[0m^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmlibgcc_s.so.1^[[0m^M
-rwxr-xr-x s root root ssssss Feb 25 2010
^[[s;ssmlibgfortran.so.3^[[0m^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmlibgomp.so.1^[[0m^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmlibm.so.0^[[0m^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmlibmudflap.so.0^[[0m^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmlibmudflapth.so.0^[[0m^M
-rwxr-xr-x s root root ssss Feb 25 2010
^[[s;ssmlibnsl.so.0^[[0m^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmlibobjc.so.2^[[0m^M
-rwxr-xr-x s root root sssss Feb 25 2010
^[[s;ssmlibpthread.so.0^[[0m^M
-rwxr-xr-x s root root ssss Feb 25 2010
^[[s;ssmlibresolv.so.0^[[0m^M
-rwxr-xr-x s root root ssss Feb 25 2010
^[[s;ssmlibrt.so.0^[[0m^M
-rwxr-xr-x s root root ssssss Feb 25 2010
^[[s;ssmlibstdc++.so.6^[[0m^M
-rwxr-xr-x s root root ssss Feb 25 2010
^[[s;ssmlibthread_db.so.1^[[0m^M
-rwxr-xr-x s root root ssss Feb 25 2010
^[[s;ssmlibutil.so.0^[[0m^M
drwxr-xr-x s root root s Feb 25 2010 ^[[s;ssmmodules^[[0m^M
--- Mike Frysinger 2010-03-13 00:07:56
robin has committed support for the new instructions to the sim
--- Sonic Zhang 2010-03-14 22:47:43
I don't see Robin's commits after Grace run the last testing.
Are you sure this bug is fixed?
--- Mike Frysinger 2010-03-14 23:07:23
divq.s is in testsuite/sim/bfin/ and passes fine. this has no bearing on the
bug in the kernel (since that is a different issue that people dumped into this
one).
--- Sonic Zhang 2010-03-15 23:05:03
OK. I add a new task to track the FDPIC runtime library issue.
http://blackfin.uclinux.org/gf/tracker/5969
--- Robin Getz 2010-04-20 07:57:24
Closing - since things work (the simulator is all fixed up), and we are working
on the FDPIC issue seperately...
-Robin
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
new_implemenataion_for_divsi3_udivsi3.patch application/octet-stream 4681 Sonic Zhang
gcc.log.gz application/x-gzip 708397 Mingquan Pan
memcpy-chk.x1 application/octet-stream 303630 Mingquan Pan
gcc_fail.diff text/x-patch 59948 Mingquan Pan