Re: Atlas: Help with s390 ASM
Hello,
Le jeudi 28 janvier 2010 à 08:55 +0100, Bastian Blank a écrit :
> On Thu, Jan 28, 2010 at 12:39:31AM +0100, Sylvestre Ledru wrote:
> > Atlas is an auto-optimized library. At the beginning of the script,
> > atlas launch a script to check what is the CPU architecture, the
> > optimisation available, etc.
>
> Which different optimizations are available for s390?
I don't think there is any. It is mainly about x86 and amd64.
>
> > One of the first check is the CPU. It is done in ASM.
>
> Why does it need to be done in assembler?
I don't know. It is the way it is currently done with Atlas.
> > For example, the code for x86 is:
> > --------
> > movl 4(%esp), %eax
> > movl %eax, %ecx
> > shl $1, %eax
> > addl %ecx, %eax
>
> This code does nothing really usefull except for the stack access, why
> is it written in assembler at all? But this does not in any way help
> with detecting the CPU type.
>
> > I would like to know if someone could translate that for me to s390 ?
>
> Why does this tool not have a common implementation in a common language
> like C to start with?
Good question... I can try to do that. I was just trying to match the
current upstream behavior first.
Sylvestre
Reply to: