From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108257 invoked by alias); 30 Nov 2015 13:55:08 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 108241 invoked by uid 89); 30 Nov 2015 13:55:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_20,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_LOW,SPF_PASS,TBC,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: BLU004-OMC1S7.hotmail.com Received: from blu004-omc1s7.hotmail.com (HELO BLU004-OMC1S7.hotmail.com) (65.55.116.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Mon, 30 Nov 2015 13:55:04 +0000 Received: from BLU436-SMTP221 ([65.55.116.8]) by BLU004-OMC1S7.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 30 Nov 2015 05:55:02 -0800 X-TMN: [vBMBhfyWjcpvEFJwogcBQhYh0HnVFH7X] Message-ID: Date: Mon, 30 Nov 2015 13:55:00 -0000 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Chris Metcalf , "walt@tilera.com" CC: Jeff Law , gcc-help , Mike Stump , Richard Henderson , Peter Maydell , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , "rth@twiddle.net" Subject: Re: [Consult] tile: How to construct testsuite for tile architecture without hardware. References: <54BA30F3.4080202@sunrus.com.cn> <54BD2C5E.1070804@ezchip.com>,<54BDB71D.90703@sunrus.com.cn> <54C39ECA.3000603@sunrus.com.cn>,,,<55E27DB9.6050606@hotmail.com>,,<560CB2C0.7000107@hotmail.com>, <56232CE1.6050405@hotmail.com> In-Reply-To: <56232CE1.6050405@hotmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-11/txt/msg00217.txt.bz2 Hello all: This month, I rewrite floating point instructions implementation, and send related patches to qemu members (it was really not easy to me, it spent me much free time resources). At present, current gcc summary is below (a little better than before). =3D=3D=3D gcc Summary =3D=3D=3D =20=20 # of expected passes 78530 # of unexpected failures 84 # of unexpected successes 1 # of expected failures 121 # of unresolved testcases 2 # of unsupported tests 1391 I am just analyzing and fixing one issue, it looks like a gcc's issue. It is about __builtin_mul_overflow(). After comparing with the x86_64 output, tilegx should only check the lower 32 bits: objdump for tilegx: if (__builtin_mul_overflow (x, y, &r)) 10918: 180ee685d1483000 { addi r11, r52, -36 } 10920: 180ec68651483000 { addi r12, r52, -40 } 10928: 180807e6d1483000 { movei r13, 0 } 10930: 9c76400034cc3000 { ld4s r14, r12 } 10938: 9c56400034bc3000 { ld4s r10, r11 } 10940: 286a300050f0a38a { mul_ls_ls r10, r14, r10 } 10948: 3009014751483000 { shrsi r14, r10, 32 } 10950: 3008f947d1483000 { shrsi r15, r10, 31 } 10958: 280a71e751483000 { cmpeq r14, r15, r14 } 10960: 17c001c151483000 { bnez r14, 10970 } 10968: 18080fe6d1483000 { movei r13, 1 } 10970: 9c76400034bc3000 { ld4s r14, r11 } 10978: 14c001c5d1483000 { bgez r14, 109d0 = } 10980: 18080fe6d1483000 { movei r13, 1 } 10988: 9c76400034cc3000 { ld4s r14, r12 } 10990: 144001c3d1483000 { beqz r14, 109c8 = } 10998: 9c66400034cc3000 { ld4s r12, r12 } 109a0: 1827f98651483000 { cmpeqi r12, r12, -1 } 109a8: 14400182d1483000 { beqz r12, 109d0 = } /* It should only check the lower 32 bits, but it checks 64 bits */ 109b0: 9c5e400034bc3000 { ld4s r11, r11 } /* ld4u instead o= f */ /* need "and r10, r10 0xffffffff" */ 109b8: 280a5165d1483000 { cmpeq r11, r11, r10 }=20 109c0: 1440016151483000 { beqz r11, 109d0 = } 109c8: 180807e6d1483000 { movei r13, 0 } 109d0: 283bf945d1483000 { move r11, r10 } ... objdump for x86_64: if (__builtin_mul_overflow (x, y, &r)) 400662: ba 00 00 00 00 mov $0x0,%edx 400667: 8b 45 e8 mov -0x18(%rbp),%eax 40066a: 0f af 45 ec imul -0x14(%rbp),%eax 40066e: 71 05 jno 400675 400670: ba 01 00 00 00 mov $0x1,%edx 400675: 83 7d ec 00 cmpl $0x0,-0x14(%rbp) 400679: 79 1b jns 400696 40067b: ba 01 00 00 00 mov $0x1,%edx 400680: 83 7d e8 00 cmpl $0x0,-0x18(%rbp) 400684: 74 0b je 400691 400686: 83 7d e8 ff cmpl $0xffffffff,-0x18(%rbp) 40068a: 75 0a jne 400696 /* it only checks the lower 32 bits */ 40068c: 39 45 ec cmp %eax,-0x14(%rbp) 40068f: 75 05 jne 400696 400691: ba 00 00 00 00 mov $0x0,%edx 400696: 89 45 fc mov %eax,-0x4(%rbp) 400699: 89 d0 mov %edx,%eax ... Thanks. On 10/18/15 13:23, Chen Gang wrote: > Hello all: >=20 > After fix one qemu issue about floating point insns, correct the related > environments (make some symbol links), and reconfig building options (so > support g++), the current gcc testsuite result are: >=20 > =3D=3D=3D gcc Summary =3D=3D=3D >=20 > # of expected passes 78156 > # of unexpected failures 98 > # of unexpected successes 1 > # of expected failures 120 > # of unresolved testcases 1 > # of unsupported tests 1384 >=20 > =3D=3D=3D g++ Summary =3D=3D=3D >=20 > # of expected passes 83999 > # of unexpected failures 78 > # of unexpected successes 2 > # of expected failures 277 > # of unsupported tests 3568 >=20 > [root@localhost build-gcc-tile]# gcc/xgcc -v > Using built-in specs. > COLLECT_GCC=3Dgcc/xgcc > Target: tilegx-gchen-linux > Configured with: ../gcc/configure --target=3Dtilegx-gchen-linux --disable= -nls --enable-languages=3Dc,c++ --enable-threads --enable-shared --enable-l= ibssp --prefix=3D/upstream/release-tile --with-headers=3D/upstream/release-= tile/include --with-sysroot=3D/upstream/release-tile --disable-multilib --d= isable-libquadmath --disable-libgomp --disable-libatomic > Thread model: posix > gcc version 6.0.0 20151012 (experimental) (GCC)=20 > [root@localhost build-gcc-tile]# gcc/xg++ -v > Using built-in specs. > COLLECT_GCC=3Dgcc/xg++ > Target: tilegx-gchen-linux > Configured with: ../gcc/configure --target=3Dtilegx-gchen-linux --disable= -nls --enable-languages=3Dc,c++ --enable-threads --enable-shared --enable-l= ibssp --prefix=3D/upstream/release-tile --with-headers=3D/upstream/release-= tile/include --with-sysroot=3D/upstream/release-tile --disable-multilib --d= isable-libquadmath --disable-libgomp --disable-libatomic > Thread model: posix > gcc version 6.0.0 20151012 (experimental) (GCC) >=20 >=20 >=20 > Welcome any ideas, suggestions, and completions. >=20 > Thanks. >=20 >=20 > On 10/17/15 14:39, Chen Gang wrote: >> >> After rebuild gcc/binutils with the latest code and correct the building >> config parameters, the gcc testsuite result is: >> >> =3D=3D=3D gcc Summary =3D=3D=3D >> >> # of expected passes 77855 >> # of unexpected failures 162 >> # of unexpected successes 1 >> # of expected failures 120 >> # of unresolved testcases 131 >> # of unsupported tests 1477 >> >> root@localhost tile]# /upstream/release-tile/bin/tilegx-gchen-linux-gcc = -v >> Using built-in specs. >> COLLECT_GCC=3D/upstream/release-tile/bin/tilegx-gchen-linux-gcc >> COLLECT_LTO_WRAPPER=3D/upstream/release-tile/libexec/gcc/tilegx-gchen-li= nux/6.0.0/lto-wrapper >> Target: tilegx-gchen-linux >> Configured with: ../gcc/configure --target=3Dtilegx-gchen-linux --disabl= e-nls --enable-languages=3Dc --enable-threads --enable-shared --enable-libs= sp --prefix=3D/upstream/release-tile --with-headers=3D/upstream/release-til= e/include --with-sysroot=3D/upstream/release-tile --disable-multilib >> Thread model: posix >> gcc version 6.0.0 20151012 (experimental) (GCC)=20 >> >> Welcome any members' ideas, suggestions, and completions. >> >> >> Thanks. >> >> >> On 10/5/15 19:59, Chen Gang wrote: >>> After fix the tillegx qemu's fsingle floating point insns issue, the gc= c test suite result is: >>> >>> =3D=3D=3D gcc Summary =3D=3D=3D >>> >>> # of expected passes 77272 >>> # of unexpected failures 365 >>> # of unexpected successes 7 >>> # of expected failures 113 >>> # of unresolved testcases 141 >>> # of unsupported tests 1476 >>> >>> And I shall continue to analyze the left issues, next. :-) >>> >>> >>> Thanks. >>> -- >>> Chen Gang >>> >>> Open, share, and attitude like air, water, and life which God blessed >>> >>> >>> ---------------------------------------- >>>> From: xili_gchen_5257@hotmail.com >>>> To: cmetcalf@ezchip.com; walt@tilera.com >>>> CC: law@redhat.com; gcc-help@gcc.gnu.org; mikestump@comcast.net; eager= @eagerm.com; rth@redhat.com; peter.maydell@linaro.org; afaerber@suse.de; rt= h@twiddle.net >>>> Subject: RE: [Consult] tile: How to construct testsuite for tile archi= tecture without hardware. >>>> Date: Sun, 4 Oct 2015 19:55:44 +0800 >>>> >>>> After finish additional 7 qemu patches, our tilegx qemu can test the g= cc >>>> testsuite successfully (no any unimplementation issues). The test resu= lt >>>> is: >>>> >>>> =3D=3D=3D gcc Summary =3D=3D=3D >>>> >>>> # of expected passes 77012 >>>> # of unexpected failures 622 >>>> # of unexpected successes 7 >>>> # of expected failures 113 >>>> # of unresolved testcases 143 >>>> # of unsupported tests 1476 >>>> >>>> >>>> For the 622 left issues: >>>> >>>> - Maybe still tilegx implementation issue, e.g. >>>> >>>> the floating point single mul instruction cann't get the result which >>>> tilegx gcc expected (it is only related with calculating: float32_mul >>>> calculation result is not match tilegx gcc expected). >>>> >>>> - Maybe envorintments configuration issues, e.g. >>>> >>>> for gcc guality_check, it may call gdb outside, so I need config the >>>> related gdb correctlly. >>>> >>>> - Maybe tilegx gcc issues, e.g. >>>> >>>> for some UNKNOWN instructions, probably generated by incorrect jump >>>> instructions, one sample is "-fpic -mcmodel=3Dlarge" for gcc nested-5 >>>> test. >>>> >>>> Next, I shall: >>>> >>>> - continue to fix the left 622 issues, and send related patches to >>>> qemu-devel mailing list or gcc-patches mailing list. >>>> >>>> - then rewrite floating point instructions, and try to let the related >>>> code merged into qemu mainline with qemu members' help (at present, >>>> floating point implementation is a temporary implementation). >>>> >>>> - at last, try to finish all left unimplemented instructions (there are >>>> still some unimplement insns left, but at present, gcc testsuite does >>>> not use them), and start tilegx qemu system mode, next. >>>> >>>> >>>> Welcome any members' ideas, suggestion, and completions. :-) >>>> >>>> >>>> Thanks. >>>> >>>> Chen Gang >>>> >>>> Open, share, and attitude like air, water, and life which God blessed >>>> >>>> >>>> ---------------------------------------- >>>>> Date: Thu, 1 Oct 2015 12:12:48 +0800 >>>>> From: xili_gchen_5257@hotmail.com >>>>> To: cmetcalf@ezchip.com; walt@tilera.com >>>>> CC: law@redhat.com; gcc-help@gcc.gnu.org; mikestump@comcast.net; eage= r@eagerm.com; rth@redhat.com; peter.maydell@linaro.org; afaerber@suse.de; r= th@twiddle.net >>>>> Subject: Re: [Consult] tile: How to construct testsuite for tile arch= itecture without hardware. >>>>> >>>>> >>>>> At present, tilegx is integrated into qemu master branch successfully >>>>> with the much help by qemu members. >>>>> >>>>> But sorry, I did not finish gcc testsuite in time, the main excuse is >>>>> >>>>> - I am busy on the normal work -- sometimes, have to do overtime work. >>>>> (my company started up an urgent project, but couldn't find suitable >>>>> persons for it in short time, so I have to do it during these days). >>>>> >>>>> Next, in Chinese National Day, I have enough free time resources on o= pen >>>>> source, hope I finish our gcc testsuite within Chinese National Day (= it >>>>> is from 2015-10-01 -- 2015-10-07). >>>>> >>>>> Thanks. >>>>> >>>>> On 8/30/15 11:50, Chen Gang wrote: >>>>>> >>>>>> Oh, sorry again, I did not finish qemu test within this month, again. >>>>>> Current status is: >>>>>> >>>>>> =3D=3D=3D gcc Summary =3D=3D=3D >>>>>> >>>>>> # of expected passes 76725 >>>>>> # of unexpected failures 790 >>>>>> # of unexpected successes 7 >>>>>> # of expected failures 113 >>>>>> # of unresolved testcases 142 >>>>>> # of unsupported tests 1483 >>>>>> >>>>>> >>>>>> My main excuses are: >>>>>> >>>>>> - We are lack of tilegx floating point insns related documents, we h= ave >>>>>> to 'guess' implementation details. At last, we found ways to process >>>>>> it (we spent more than a half month free time resources for it). >>>>>> >>>>>> - My related qemu code need be refactor before merging into qemu mas= ter >>>>>> tree. At present, we are refactoring and merging tilegx code to qemu >>>>>> master tree (mainly by qemu related members). >>>>>> >>>>>> Hope I can finish qemu tilegx gcc testsuite within next month (I gue= ss, >>>>>> it should be done in time). >>>>>> >>>>>> - Test the refactored and merged code again, based on it, I continue= to >>>>>> fix gcc testsuite related issues. >>>>>> >>>>>> - Fix all 700+ gcc testsuite issues (10+ for pending issues, and the >>>>>> others are for UN-implementation insns issues, I guess). >>>>>> >>>>>> >>>>>> Thanks. >>>>>> >>>>>> >>>>>> On 7/30/15 05:01, Chen Gang wrote: >>>>>>> On 7/20/15 06:26, Chen Gang wrote: >>>>>>>> Hello all: >>>>>>>> >>>>>>>> At present (after a half year), with the much help of QEMU members, >>>>>>>> tilegx linux-user can work (manually using busybox's sh, ls, cp, m= v, vi >>>>>>>> are OK). >>>>>>>> >>>>>>>> Next, I shall start gcc testsuite with qemu tilegx linux-user, hop= e I >>>>>>>> can finish within this month (2015-07-31). >>>>>>>> >>>>>>> >>>>>>> Sorry, I can not finish the qemu test within this month. The reason= is >>>>>>> my tilegx qemu is still lack of some instructions implementation, n= ext, >>>>>>> I should finish them firstly (I implemented most insns, but not all= ). >>>>>>> >>>>>>> =3D=3D=3D gcc Summary =3D=3D=3D >>>>>>> >>>>>>> # of expected passes 69830 >>>>>>> # of unexpected failures 4312 >>>>>>> # of unexpected successes 2 >>>>>>> # of expected failures 108 >>>>>>> # of unresolved testcases 1776 >>>>>>> # of unsupported tests 1567 >>>>>>> >>>>>>> More than 4K failures are because tilegx qemu lacks of instruction's >>>>>>> implementation, and also more than 10 issues are for TIMEOUT (I gue= ss, >>>>>>> my original tilegx qemu instruction's implementation still has bugs= ). >>>>>>> >>>>>>> I shall try to finish it within next month, although I am not quite= sure >>>>>>> (it needs enough time resources on it, but I am lack of time resour= ces: >>>>>>> I can only spend less 1 hour per work day and 2 hours per week end = day). >>>>>>> >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> On 1/24/15 21:31, Chen Gang S wrote: >>>>>>>>> Hello Maintainers: >>>>>>>>> >>>>>>>>> The result of gcc testsuite for tile without qemu is below, I gue= ss the >>>>>>>>> environments construction is OK: >>>>>>>>> >>>>>>>>> =3D=3D=3D gcc Summary =3D=3D=3D >>>>>>>>> >>>>>>>>> # of expected passes 66650 >>>>>>>>> # of unexpected failures 42 >>>>>>>>> # of unexpected successes 1 >>>>>>>>> # of expected failures 107 >>>>>>>>> # of unresolved testcases 16558 >>>>>>>>> # of unsupported tests 1771 >>>>>>>>> >>>>>>>>> Based on normal testsuite and microblaze testsuite configuration,= it is >>>>>>>>> easy to config gcc testsuite for tile. Thank gcc testsuit member = and >>>>>>>>> microblaze member very much. :-) >>>>>>>>> >>>>>>>>> - Copy the original microblaze exp file as tile exp file. Export = tile >>>>>>>>> ip to /etc/hosts. >>>>>>>>> >>>>>>>>> - Change the related compiler name and related patch to tile in t= ile >>>>>>>>> exp file. >>>>>>>>> >>>>>>>>> - Use tile cflag "-m64 -mcpu=3Dtilegx -mcmodel=3Dlarge -mlittle-e= ndian" >>>>>>>>> instead of the original microblaze cflag, in tile exp file. >>>>>>>>> >>>>>>>>> If OK, I shall try to make a tile patch within this month. Next m= onth, >>>>>>>>> I shall start tile qemu (I am preparing for it within this month)= . After >>>>>>>>> communicate with qemu members, I guess, it is possible to finish = it. >>>>>>>>> >>>>>>>>> >>>>>>>>> Welcome any ideas, suggestions, and completions. >>>>>>>>> >>>>>>>>> Thanks. >>>>>>>>> >>>>>>>>> On 1/20/15 10:02, Chen Gang S wrote: >>>>>>>>>> On 1/20/15 00:10, Chris Metcalf wrote: >>>>>>>>>>> On 1/17/2015 4:52 AM, Chen Gang S wrote: >>>>>>>>>>>> Hello Maintainers: >>>>>>>>>>>> >>>>>>>>>>>> I am trying to make gcc patches for tile, and need testsuite w= ithout >>>>>>>>>>>> related hardware, so I consult: >>>>>>>>>>> >>>>>>>>>>> Unfortunately, at the current time, the simulator is only avail= able as part of the commercial Multicore Development Environment package. A= qemu port for tile hardware would certainly be welcome, but to my knowledg= e, no one has completed such a port yet. ISA and ABI documentation for tile= gx are available at www.tilera.com/scm. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> OK, thank you very much, and the documentation is really valuabl= e to me. >>>>>>>>>> >>>>>>>>>> After finish gcc tile testsuite (hope I can finish within this m= onth), >>>>>>>>>> I shall continue for tile qemu, I should try my best for it, hop= e I can >>>>>>>>>> finish: "can run gcc testsuite with the tile qemu". >>>>>>>>>> >>>>>>>>>> At present, it is really very hard to me, but for me, it is my d= uty (I >>>>>>>>>> met it, and it was within my original boarder). >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> For me, nothing is impossible, if God blessed. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Thanks. >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> Chen Gang >>>>>> >>>>>> Open, share, and attitude like air, water, and life which God blessed >>>>>> >>>>>> >>>>> >>>>> -- >>>>> Chen Gang (=E9=99=88=E5=88=9A) >>>>> >>>>> Open, share, and attitude like air, water, and life which God blessed >>>> >>>=20=20=09=09=20=09=20=20=20=09=09=20=20 >>> >> >=20 --=20 Chen Gang (=E9=99=88=E5=88=9A) Open, share, and attitude like air, water, and life which God blessed