[M3devel] scan_float

Tony Hosking hosking at cs.purdue.edu
Thu Feb 26 00:07:35 CET 2009


I think you wrote the most recent version of that code.  Can you take  
a look?

On 26 Feb 2009, at 04:30, Jay wrote:

> Hm, scan_float is probably wrong, when crossing that changes  
> endianness.
> PA is big endian.
> Crossing from little endian Cygwin, in TimePosix.ms I have:
>
> L$C0003:
>  .word 0
>  .word 1093567616
>
> TimePosix__FromUtime
>  .PROC
>  .CALLINFO FRAME=64,NO_CALLS,SAVE_SP,ENTRY_GR=3
>  .ENTRY
>  copy %r3,%r1
>  copy %r30,%r3
>  stwm %r1,64(%r30)
>  stw %r3,-4(%r30)
>  stw %r19,-32(%r30)
>  stw %r26,-36(%r3)
> L$M0009:
>  ldw -36(%r3),%r28
>  fldws 0(%r28),%fr22L
>  fcnvxf,sgl,dbl %fr22L,%fr24
>  ldw -36(%r3),%r28
>  ldo 4(%r28),%r28
>  fldws 0(%r28),%fr22L
>  fcnvxf,sgl,dbl %fr22L,%fr23
>  addil LT'L$C0003,%r19
>  ldw RT'L$C0003(%r1),%r28
>  fldds 0(%r28),%fr22
>  fdiv,dbl %fr23,%fr22,%fr22
>  fadd,dbl %fr24,%fr22,%fr22
>
>
> and Utime_M3 hangs.
>
>
> Yet it I write the equivalent C code on the target system I get:
>
>
> L$C0000:
>         .word   1093567616
>         .word   0
>         .SPACE $TEXT$
>         .NSUBSPA $CODE$
>         .align 4
>         .EXPORT FromUtime,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=FU
> FromUtime:
>         .PROC
>         .CALLINFO FRAME=0,NO_CALLS
>         .ENTRY
>         fldws 4(%r26),%fr22L
>         fcnvxf,sgl,dbl %fr22L,%fr4
>         ldil LR'L$C0000,%r28
>         fldws 0(%r26),%fr23L
>         ldo RR'L$C0000(%r28),%r28
>         fldds 0(%r28),%fr22
>         fdiv,dbl %fr4,%fr22,%fr4
>         fcnvxf,sgl,dbl %fr23L,%fr24
>         bv %r0(%r2)
>         fadd,dbl %fr24,%fr4,%fr4
>
>
> I'll dig into it more later..
>
>
>  - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20090226/bb698e88/attachment-0002.html>


More information about the M3devel mailing list