From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32868 invoked by alias); 4 Nov 2016 10:28:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 32841 invoked by uid 89); 4 Nov 2016 10:28:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=larson, Larson, H*c:ISO-8859-1, sparcv9 X-HELO: mx6.bahnhof.se X-Spam-Score: 0.659 Message-ID: <581C62A2.8050204@gaisler.com> Date: Fri, 04 Nov 2016 10:28:00 -0000 From: Andreas Larsson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: David Miller , triegel@redhat.com CC: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org, carlos@redhat.com, software@gaisler.com Subject: Re: [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware References: <1478125983.7146.733.camel@localhost.localdomain> <20161102.225245.471656475226254205.davem@davemloft.net> <1478187561.7146.742.camel@localhost.localdomain> <20161103.132213.598669006383889263.davem@davemloft.net> In-Reply-To: <20161103.132213.598669006383889263.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00141.txt.bz2 On 2016-11-03 18:22, David Miller wrote: > From: Torvald Riegel > Date: Thu, 03 Nov 2016 16:39:21 +0100 > >> Is there any difference between the additional CAS on a v8 and the CAS >> on a v9? If there should be none (eg, same instruciton encoding etc.), >> we wouldn't need a runtime check for this, would we? > > A quick look at binutils shows that the encoding appears to be the same. The general encoding of the CASA instruction is the same, but on sparcv9 the ASI to use is the primary address space ASI 0x80 and on LEON the ASI to use is the user data space ASI 0xa. So different instruction encodings needs to be used. Unfortunately there is no way general way short of trying to use the CASA instruction and taking a care of a possible illegal instruction to detect if a LEON3 system has CAS or not. But CAS support is implied by the the -mcpu=leon3 flag, and LEON3 systems without CAS can use -mcpu=v8. -- Best regards, Andreas Larson