From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p5T8bkvn004266 for ; Wed, 29 Jun 2011 10:37:46 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApcCANLjCk7RVaC2kGdsb2JhbAA8AQMSp0wIFAEBAQEJCQ0HFAQhiHijUIwagkuEUTmIaAIDBoYqBIcwimeJQYJXPINb X-IronPort-AV: E=Sophos;i="4.65,442,1304287200"; d="scan'208";a="97642855" Received: from mail-gy0-f182.google.com ([209.85.160.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 29 Jun 2011 10:37:41 +0200 Received: by gyf3 with SMTP id 3so613361gyf.27 for ; Wed, 29 Jun 2011 01:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=p18pFxizZYCwduoidgAdH7TL9SUPI1WzH+H+M1m8u7M=; b=a84PS1zvcIY/Lvu1K5o+P5e5nN8WmM4NsU5hqPNwvI+8ieg9Blwx1f2o8FXgU7NOvu RvKK8E/GBpFpMImDa1l4SYam4aJrYwKxzfSR5SBRrxYBop2/cCX+trlvpLyIYadKX9f/ NW37mNnZngcOmCVKLVZxy5oFWsxBWZTdynuQg= MIME-Version: 1.0 Received: by 10.236.144.226 with SMTP id n62mr472118yhj.477.1309336659373; Wed, 29 Jun 2011 01:37:39 -0700 (PDT) Received: by 10.236.157.73 with HTTP; Wed, 29 Jun 2011 01:37:39 -0700 (PDT) In-Reply-To: References: <20110628153058.GC18321@ccellier.rd.happyleptic.org> Date: Wed, 29 Jun 2011 12:37:39 +0400 Message-ID: From: SerP To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=20cf303f6934792d8c04a6d5b257 Subject: Re: [Caml-list] ocaml arm eabi --20cf303f6934792d8c04a6d5b257 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It's very strange. I'am disassembled binary. ocaml "__fixdfsi" call resovled to "__aeabi_d2iz" and this function are the same as in ios binary. But on android floating point does not work! =3D=3D=3D disassemly code: aeabi_d2iz from android libc 0002da7c <__aeabi_d2iz>: 2da7c: e1a02081 lsl r2, r1, #1 2da80: e2922602 adds r2, r2, #2097152 ; 0x200000 2da84: 2a00000c bcs 2dabc <__aeabi_d2iz+0x40> 2da88: 5a000009 bpl 2dab4 <__aeabi_d2iz+0x38> 2da8c: e3e03e3e mvn r3, #992 ; 0x3e0 2da90: e0532ac2 subs r2, r3, r2, asr #21 2da94: 9a00000a bls 2dac4 <__aeabi_d2iz+0x48> 2da98: e1a03581 lsl r3, r1, #11 2da9c: e3833102 orr r3, r3, #-2147483648 ; 0x80000000 2daa0: e1833aa0 orr r3, r3, r0, lsr #21 2daa4: e3110102 tst r1, #-2147483648 ; 0x80000000 2daa8: e1a00233 lsr r0, r3, r2 2daac: 12600000 rsbne r0, r0, #0 ; 0x0 2dab0: e12fff1e bx lr 2dab4: e3a00000 mov r0, #0 ; 0x0 2dab8: e12fff1e bx lr 2dabc: e1900601 orrs r0, r0, r1, lsl #12 2dac0: 1a000002 bne 2dad0 <__aeabi_d2iz+0x54> 2dac4: e2110102 ands r0, r1, #-2147483648 ; 0x80000000 2dac8: 03e00102 mvneq r0, #-2147483648 ; 0x80000000 2dacc: e12fff1e bx lr 2dad0: e3a00000 mov r0, #0 ; 0x0 2dad4: e12fff1e bx lr =3D=3D=3D=3D=3D On Tue, Jun 28, 2011 at 10:40 PM, Wojciech Meyer < wojciech.meyer@googlemail.com> wrote: > SerP writes: > > > Yes. it seems that the problem in android libc, but it is not clear > > where exactly > > Did you try to disassemble/trace the program in the debugger of what > possibly from libc is being inlined/called? Maybe it's some > initialisation problem or most likely a wrong target. You compile for a > none floating point capable hardware, try to write a simple program in > gcc and see what happens. You can tell Gcc to compile for Cortex-A8 or > ARM7 and that's a big difference the second one has no floating point > unit built in. Could you post `gas' compile command line options? > > Cheers; > Wojciech > > > > > On Tue, Jun 28, 2011 at 10:02 PM, Pierre-Alexandre Voye > > wrote: > > > > Maybe an issue with android's libc which manage float in certain > > circumstance ? > > > > Le 28 juin 2011 19:52, "SerP" a =E9crit : > > > > ocaml 3.12.0 > > > > On iphone it's work's too. But on android - gcc-4.4 it's not > > working. > > > > > > > > > > On Tue, Jun 28, 2011 at 7:30 PM, > > wrote: > > > > > > > > -[ Tue, Jun 28, 2011 at 07:22:... > > > > > > > --20cf303f6934792d8c04a6d5b257 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It's very strange. I'am disassembled binary.
ocaml "__fixd= fsi" call resovled to "__aeabi_d2iz" and this function are t= he same as in ios binary. But on android floating point does not work!


=3D=3D=3D disassemly code: aeabi_d2iz fr= om android libc
0002da7c <__aeabi_d2iz>:
=A0= =A02da7c: =A0 =A0 =A0 e1a02081 =A0 =A0 =A0 =A0lsl =A0 =A0 r2, r1, #1
=
=A0 =A02da80: =A0 =A0 =A0 e2922602 =A0 =A0 =A0 =A0adds =A0 =A0r2, r2, = #2097152 =A0 =A0 =A0 =A0; 0x200000
=A0 =A02da84: =A0 =A0 =A0 2a00000c =A0 =A0 =A0 =A0bcs =A0 =A0 2dabc &l= t;__aeabi_d2iz+0x40>
=A0 =A02da88: =A0 =A0 =A0 5a000009 =A0 = =A0 =A0 =A0bpl =A0 =A0 2dab4 <__aeabi_d2iz+0x38>
=A0 =A02da= 8c: =A0 =A0 =A0 e3e03e3e =A0 =A0 =A0 =A0mvn =A0 =A0 r3, #992 =A0 =A0 =A0 = =A0; 0x3e0
=A0 =A02da90: =A0 =A0 =A0 e0532ac2 =A0 =A0 =A0 =A0subs =A0 =A0r2, r3, = r2, asr #21
=A0 =A02da94: =A0 =A0 =A0 9a00000a =A0 =A0 =A0 =A0bls= =A0 =A0 2dac4 <__aeabi_d2iz+0x48>
=A0 =A02da98: =A0 =A0 = =A0 e1a03581 =A0 =A0 =A0 =A0lsl =A0 =A0 r3, r1, #11
=A0 =A02da9c:= =A0 =A0 =A0 e3833102 =A0 =A0 =A0 =A0orr =A0 =A0 r3, r3, #-2147483648 =A0 = =A0; 0x80000000
=A0 =A02daa0: =A0 =A0 =A0 e1833aa0 =A0 =A0 =A0 =A0orr =A0 =A0 r3, r3, = r0, lsr #21
=A0 =A02daa4: =A0 =A0 =A0 e3110102 =A0 =A0 =A0 =A0tst= =A0 =A0 r1, #-2147483648 =A0 =A0 =A0 =A0; 0x80000000
=A0 =A02daa= 8: =A0 =A0 =A0 e1a00233 =A0 =A0 =A0 =A0lsr =A0 =A0 r0, r3, r2
=A0 =A02daac: =A0 =A0 =A0 12600000 =A0 =A0 =A0 =A0rsbne =A0 r0, r0, #0 =A0 = =A0 =A0; 0x0
=A0 =A02dab0: =A0 =A0 =A0 e12fff1e =A0 =A0 =A0 =A0bx= =A0 =A0 =A0lr
=A0 =A02dab4: =A0 =A0 =A0 e3a00000 =A0 =A0 =A0 =A0= mov =A0 =A0 r0, #0 =A0; 0x0
=A0 =A02dab8: =A0 =A0 =A0 e12fff1e = =A0 =A0 =A0 =A0bx =A0 =A0 =A0lr
=A0 =A02dabc: =A0 =A0 =A0 e1900601 =A0 =A0 =A0 =A0orrs =A0 =A0r0, r0, = r1, lsl #12
=A0 =A02dac0: =A0 =A0 =A0 1a000002 =A0 =A0 =A0 =A0bne= =A0 =A0 2dad0 <__aeabi_d2iz+0x54>
=A0 =A02dac4: =A0 =A0 = =A0 e2110102 =A0 =A0 =A0 =A0ands =A0 =A0r0, r1, #-2147483648 =A0 =A0; 0x800= 00000
=A0 =A02dac8: =A0 =A0 =A0 03e00102 =A0 =A0 =A0 =A0mvneq =A0 r0, #-2147= 483648 =A0 =A0 =A0 =A0; 0x80000000
=A0 =A02dacc: =A0 =A0 =A0 e12f= ff1e =A0 =A0 =A0 =A0bx =A0 =A0 =A0lr
=A0 =A02dad0: =A0 =A0 =A0 e3= a00000 =A0 =A0 =A0 =A0mov =A0 =A0 r0, #0 =A0; 0x0
=A0 =A02dad4: = =A0 =A0 =A0 e12fff1e =A0 =A0 =A0 =A0bx =A0 =A0 =A0lr
=3D=3D=3D=3D=3D

On Tue, Jun 28, 20= 11 at 10:40 PM, Wojciech Meyer <wojciech.meyer@googlemail.com<= /a>> wrote:
SerP <serp25= 6@gmail.com> writes:

> Yes. it seems that the problem in android libc, but it is not clear
> where exactly

Did you try to disassemble/trace the program in the debugger of what<= br> possibly from libc is being inlined/called? Maybe it's some
initialisation problem or most likely a wrong target. You compile for a
none floating point capable hardware, try to write a simple program in
gcc and see what happens. You can tell Gcc to compile for Cortex-A8 or
ARM7 and that's a big difference the second one has no floating point unit built in. Could you post `gas' compile command line options?

Cheers;
Wojciech

>
> On Tue, Jun 28, 2011 at 10:02 PM, Pierre-Alexandre Voye
> <ontologi= ae@gmail.com> wrote:
>
> =A0 =A0 Maybe an issue with android's libc which manage float in c= ertain
> =A0 =A0 circumstance ?
>
> =A0 =A0 =A0 =A0 Le=A028 juin 2011 19:52, "SerP" <serp256@gmail.com>= =A0a =E9crit=A0:
>
> =A0 =A0 =A0 =A0 ocaml 3.12.0
>
> =A0 =A0 =A0 =A0 On iphone it's work's too. But on android - gc= c-4.4 it's not
> =A0 =A0 =A0 =A0 working.=A0
>
>
>
>
> =A0 =A0 =A0 =A0 On Tue, Jun 28, 2011 at 7:30 PM, <rixed@happyleptic.org>
> =A0 =A0 =A0 =A0 wrote:
> =A0 =A0 =A0 =A0 >
>
> =A0 =A0 =A0 =A0 > -[ Tue, Jun 28, 2011 at 07:22:...
>
>
>

--20cf303f6934792d8c04a6d5b257--