[M3devel] scan_float

Jay jay.krell at cornell.edu
Wed Feb 25 18:30:36 CET 2009


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/20090225/79dfb56e/attachment-0001.html>


More information about the M3devel mailing list