caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: rixed@happyleptic.org
To: rixed@happyleptic.org
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Native compilation for today's MIPS
Date: Tue, 11 Aug 2009 18:38:58 +0200	[thread overview]
Message-ID: <20090811163858.GA871@fp-desktop.fr.evistel.com> (raw)
In-Reply-To: <20090811101100.GA3238@happyleptic.org>

First, correcting myself, since I managed to confuse true and false :

-[ Tue, Aug 11, 2009 at 12:11:00PM +0200, rixed@happyleptic.org ]----
> 1004b670:	24010001 	li	at,1	; a1 = true

No, 1 is false. True would be 3. Thus :

> 1004b674:	10410051 	beq	v0,at,1004b7bc <$173>	; cmp previous return value with true, and if so goto $173 where we left

Of course, we break out of this sequence of "&&"s if the test is false.

> 1004b6a4:	24010001 	li	at,1	; true
> 1004b6a8:	10410041 	beq	v0,at,1004b7b0 <$174>	; if both stamps are eq, goto $174 which is equivalent to $147.

Same remark as above.

> ; The end when dataUnchanged is true. We could have reused $174 or $173.
> ; So each time you write a && b && c you end up with 3 different true(s) ?

So here at the end, dataUnchanged is false.

But this does change much to the problem.

So, After this little training, deciphering the second code (the one whithout FPU code
which happen to work) is a piece of cake. Basically, instead of the FP registers comparison
we have this :


1004b718 <$180>:
1004b718:   8fa5000c    lw a1,12(sp)   ; a1 = [sp+12], aka t0
1004b71c:   3c18100c    lui   t8,0x100c   ; t8 = 0x100c+2244 -> same C function than before (equality test)
1004b720:   0c033a9e    jal   100cea78 <caml_c_call>  ; call it...
1004b724:   271808c4    addiu t8,t8,2244

Ie the added function "is_same a b = a = b" had the (well known) consequence to replace
the inline equality testing by the generic C version.

So, the bug lies in the inline equality function for float values.

Stay tunned !

:-)


  reply	other threads:[~2009-08-11 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10 17:34 rixed
2009-08-10 23:08 ` [Caml-list] " rixed
2009-08-11 10:11   ` rixed
2009-08-11 16:38     ` rixed [this message]
2009-08-11 18:06     ` rixed
2009-08-12 12:12       ` David MENTRE
2009-08-12 13:46         ` rixed
2009-08-21 20:20 ` rixed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090811163858.GA871@fp-desktop.fr.evistel.com \
    --to=rixed@happyleptic.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).