Float point display in arm-elf-sid

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Float point display in arm-elf-sid

Harry Hsin-Hua Pan(潘欣華)
Hi,
 
I've tried to build a SID with --target=arm-elf
Then I ran a test to displaying a float point.
But I got an incorrect display like following:
 
<arm-elf-sid-dir>/bin
$arm-elf-gcc test.c -o test.arm
$ ./arm-elf-sid -EL test.arm
hello! world
i=2
f=-2589673925853444962162817833395304976613376.000000
j=125
 
While tracing this issue, I found the arm7.cxx seems to not support "rotate right with extend" (RRX).
(Readers could refer to ARM DDI 0100E page A-17)
So I updated my arm7.cxx then re-built again.
Now I got correct display like following:
 
$ ./arm-elf-sid -EL test.arm
hello! world
i=2
f=123.456001
j=125
 
This issue seems to explain the strange result in the SID screen shot here.
http://sources.redhat.com/sid/screenshots/run-dhrystone.jpg
 
I attached my patch which was generated with the CVS snapshot in 20060325.
I didn't verified it to check whether there is another side effect.
So, would somebody like to verify this patch?
 
Regards,
Harry.
 
 
 

sid-20060325-patch.diff (886 bytes) Download Attachment
test.c (386 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Float point display in arm-elf-sid

Frank Ch. Eigler
Hi -

> While tracing this issue, I found the arm7.cxx seems to not support
> "rotate right with extend" (RRX).  [...]  So I updated my arm7.cxx
> then re-built again.  Now I got correct display like following:
> [...]

Nice work thanks!  I committed your patch, after checking the ARM7TDMI
docs and GNU AS's encoding logic.

- FChE