And after some debugging, I found the following symptom:

the binary content of the double-precision float "3. 1415926535" is
correct, which is 0x400921fb54411744

and it's displayed correct on Android 2.2, while on Android 4.0 it
displayed as

d=<36.<2=2=3<<==<22=323


So, anything related with java println needs to be modified when porting
to new chip?

Thanks in advance for any clue

---
Regards,
WANG.Jiong

On 02/02/2012 06:04 PM, WANG.Jiong wrote:
> Hi all,
>
>   Currently, I am porting Android ICS to a new chip, now I am blocked
> by one Dalvik bug.
>
>   when I run dalvik unit test under dalvik/tests, several testcases
> failed, like 017-float.
>
>   After exploration, I found all of these failure are caused by the
> same reason: double-precision float are handled incorrectly.
>
>    For 017-float, the test result is:
>
> --- expected.txt    2011-12-31 19:14:46.000000000 +0800
> +++ output.txt    2012-02-02 17:57:07.881173911 +0800
> @@ -1,3 +1,3 @@
> -base values: d=3.1415926535 f=3.1415927
> -base values: d=3.1415926535 f=3.1415927
> -base values: f=3.1415927 d=3.1415926535
> +base values: d=<36.<2=2=3<<==<22=323 f=003.1415927
> +base values: d=<36.<2=2=3<<==<22=323 f=003.1415927
> +base values: f=003.1415927 d=<36.<2=2=3<<==<22=323
>
>   the value of d are incorrect, and the value of f are prefixed by two
> extra '0'.
>
>   while I print the value of 'f' only, it will get correct value
> "3.1415927"
>
>   currently, I only enabled c stub based interpreter
>
>   My question is:
>
>      when porting Dalvik to new chip, is there anything special I need
> to do to support double-precision? like I need to define any special
> macro, so something else
>
>   Thanks in advance
>
> ---
> Regards,
> WANG.Jiong
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to