chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Chicken on Arm64


From: Peter Bex
Subject: Re: [Chicken-hackers] Chicken on Arm64
Date: Tue, 8 Apr 2014 08:40:54 +0200
User-agent: Mutt/1.4.2.3i

On Tue, Apr 08, 2014 at 02:57:42AM +0000, mike stiver wrote:
> Hello,
> 
> My name is Michael Stiver-Balla, and I'm part of a group in connection with 
> Linaro, looking at projects for porting and running on ARM64 hardware. 
> CHICKEN came up on the list or potential ports, and I've been looking it over.

Hello Michael,

This is pretty cool!

> My understanding is there are adequate C fallbacks so porting should be no 
> issue. So far I quickly built in an arm64 emulated enviroment successfully, 
> but the tests appear to fail afterwards:

Yeah, that's true.  If CHICKEN sees an unsupported architecture (or if
it's forcibly detected as such), it will fall back to a slightly more
limited C fallback.

> ===================================== library tests ...
> 
> Error: assertion failed: (inexact= 43.0 (fpround 42.5))
> 
>         Call history:
> 
>         <syntax>          (assert (inexact= 43.0 (fpround 42.5)))
>         <syntax>          (##core#if (##core#check (inexact= 43.0 (fpround 
> 42.5)                                              )) (##core#undefined) 
> (##sys#error "assertion ...
>         <syntax>          (##core#check (inexact= 43.0 (fpround 42.5)))
>         <syntax>          (inexact= 43.0 (fpround 42.5))
>         <syntax>          (fpround 42.5)
>         <syntax>          (##core#undefined)
>         <syntax>          (##sys#error "assertion failed" (##core#quote 
> (inexact                                              = 43.0 (fpround 42.5))))
>         <syntax>          (##core#quote (inexact= 43.0 (fpround 42.5)))
>         <eval>    (inexact= 43.0 (fpround 42.5))
>         <eval>    (fpround 42.5)
>         <eval>    [inexact=] (< (abs (- 1 (abs (/ a b)))) 1e-10)
>         <eval>    [inexact=] (abs (- 1 (abs (/ a b))))
>         <eval>    [inexact=] (- 1 (abs (/ a b)))
>         <eval>    [inexact=] (abs (/ a b))
>         <eval>    [inexact=] (/ a b)
>         <eval>    (##sys#error "assertion failed" (##core#quote (inexact= 
> 43.0 (fpround 42.5))))        <--
> 
> Might this be an issue with how I built/ran it, or am I to assume that some 
> aarch64 assembly might be needed for a successful port?

This seems to be an issue with the fpround implementation.  What does it
show when you type (fpround 42.5) at the interpreter's prompt?

fpround internally uses the round(3) C function from math.h, which should
indeed round upwards on halves.  In other words, I'd expect a simple C
program like this printf("%f\n", round(42.5)) to print something like "43".
Perhaps it's a libc or FPU issue?

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]