From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 08 Sep 2014 10:12:06 +0200 (CEST) Received: from plane.gmane.org ([80.91.229.3]:45826 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27008399AbaIHIMEyXvEO (ORCPT ); Mon, 8 Sep 2014 10:12:04 +0200 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XQu3P-0002O6-PH for linux-mips@linux-mips.org; Mon, 08 Sep 2014 10:12:03 +0200 Received: from V10K3.bull.fr ([129.184.84.13]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Sep 2014 10:12:03 +0200 Received: from miod by V10K3.bull.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Sep 2014 10:12:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: linux-mips@linux-mips.org From: Miod Vallat Subject: Re: gcc-4.8+ and R10000+ Date: Mon, 8 Sep 2014 08:11:51 +0000 (UTC) Message-ID: References: <540C165F.7030307@gentoo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 129.184.84.13 (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0) 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: 42466 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: miod@online.fr 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 > 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. Miod