From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Sep 2014 11:45:01 +0200 (CEST) Received: from qmta10.westchester.pa.mail.comcast.net ([76.96.62.17]:35046 "EHLO qmta10.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27008413AbaIHJo6nYPcQ (ORCPT ); Mon, 8 Sep 2014 11:44:58 +0200 Received: from omta16.westchester.pa.mail.comcast.net ([76.96.62.88]) by qmta10.westchester.pa.mail.comcast.net with comcast id oZh91o0031uE5Es5AZkqzB; Mon, 08 Sep 2014 09:44:50 +0000 Received: from [192.168.1.13] ([50.190.84.14]) by omta16.westchester.pa.mail.comcast.net with comcast id oZkq1o0090JZ7Re3cZkqTK; Mon, 08 Sep 2014 09:44:50 +0000 Message-ID: <540D7A7B.9090905@gentoo.org> Date: Mon, 08 Sep 2014 05:44:27 -0400 From: Joshua Kinard User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: linux-mips@linux-mips.org Subject: Re: gcc-4.8+ and R10000+ References: <540C165F.7030307@gentoo.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1410169490; bh=5JfAYezYu5h39bX5XSaLCOpHMxyuPAm6FsvOUnHjeOY=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=pFps2JO8elxl84WZ/TBVvxoxUIQWq6jL+PzkND0Cr6y0fLEIqEkHwZOpjfnaZDYRm NOh7b93saA+dAW1kAgy8ddzqlGph7CM6/gGfy2qPMO0NrNdHRDdO9ufc5m4uj/Wh7X P7o7A87NxvJsX+cCX7W3kmgopWmaiU40KhNQix/FFg7EdRWGfvEEidBZmSz3uuErLr LhaqjSuIfRQ5vY5XBnhN+IL4Q8fWnkdKGhlBMVqxuG/Fj4tVo7KtMBM71lRQZfeYiw IKhA03EohzwAJcat3ogrVEwov/8JmGnSeSNM6ih/OBE8/p53l+WEJotQn6SK+dlNOe 4CKujdq4HQTbw== Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 42469 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: kumba@gentoo.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On 09/08/2014 04:11, Miod Vallat wrote: >> Disassembling a statically-built copy of the "sln" binary generated by >> glibc's compile phase, there are slight differences in how gcc-4.7 and >> gcc-4.8 are compiling the __lll_lock_wait_private function. The key >> differences in the output asm are >> this: > > [...] > >> gcc-4.8: >> x+4 >> ... >> x+24 bne v1,v0, >> ... >> x+32 0x7c03e83b /* rdhwr */ >> x+36 li a2,2 >> x+40 lw a1,-29832(v1) >> x+44 move a3,zero >> x+48 li v0,4238 >> x+52 syscall >> * x+56 ll v0,0(s0) >> * x+60 li at,2 >> * x+64 sc at,0 > > Note how the sc address is no longer 0(s0). Since the address does > not match the address used in the ll instruction, sc will always > fail on the R10k. That would be a typo on my part. I typed that out by hand and just missed it. It should read: gcc-4.8: x+4 ... x+24 bne v1,v0, ... x+32 0x7c03e83b /* rdhwr */ x+36 li a2,2 x+40 lw a1,-29832(v1) x+44 move a3,zero x+48 li v0,4238 x+52 syscall * x+56 ll v0,0(s0) * x+60 li at,2 * x+64 sc at,0(s0) x+68 beqzl at, x+72 nop x+76 sync x+80 bnez v0, Thanks!, -- Joshua Kinard Gentoo/MIPS kumba@gentoo.org 4096R/D25D95E3 2011-03-28 "The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between." --Emperor Turhan, Centauri Republic