This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][PATCH 0/2] Make sparcv8 work again on cas enabled hardware


From: Andreas Larsson <andreas@gaisler.com>
Date: Fri, 04 Nov 2016 11:27:46 +0100

> On 2016-11-03 18:22, David Miller wrote:
>> From: Torvald Riegel <triegel@redhat.com>
>> 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.

This really should be advertised in the _dl_hwcaps.  We should try as
hard as possible to allow dynamic discovery of this.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]