[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Atlas: Help with s390 ASM



Hello,

I am trying to port the new version of Atlas on all Debian architectures
[1]. 
I am starting to try to fix s390 which is one of the non-supported archs
of Atlas and I need your help to translate some x86 asm to s390.

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. 

One of the first check is the CPU. It is done in ASM.

For example, the code for x86 is:
--------
#include "atlas_asm.h"
#
# x86-32 assembler for:
# int asm_probe(int i)
# RETURNS: i*3
#
.text
.globl ATL_asmdecor(asm_probe)
ATL_asmdecor(asm_probe):
        movl    4(%esp), %eax
        movl    %eax, %ecx
        shl     $1, %eax
        addl    %ecx, %eax
        ret
---------

while the PPC is:
---------
#define ATL_GAS_PPC
#include "atlas_asm.h"
/*
 * Linux PPC assembler for:
 * int asm_probe(int i)
 * RETURNS: i*3
 */
.globl ATL_asmdecor(asm_probe)
ATL_asmdecor(asm_probe):
        add     r4, r3, r3
        add     r3, r3, r4
        blr
---------

I would like to know if someone could translate that for me to s390 ?

If someone needs it, the procedure to reproduce the failure with atlas
is:
$ apt-get source -t experimental atlas
$ cd atlas-*
$ gcc -I CONFIG/include/ -o xprobe_gas_s390
CONFIG/src/backend/probe_this_asm.c
CONFIG/src/backend/probe_gas_CHANGE_HERE.S

Many thanks!

Please C/C me.

Thanks
Sylvestre
[1]
https://buildd.debian.org/status/package.php?suite=experimental&p=atlas


Reply to: