On 25/12/15 21:06, John Paul Adrian Glaubitz wrote:
> On 12/25/2015 09:51 PM, Bryce wrote:
>> eh wot? I built silo as pure 64bit, but since you can't 'chainload' from
>> 32bit silo to 64bit silo... 
> I tried building 64-bit natively but that failed with: gcc -Os -Wall -I.
> -I../include -fomit-frame-pointer -fno-strict-aliasing -DSMALL_RELOC=0x280000
> -DLARGE_RELOC=0x380000 -fno-stack-protector -c divdi3.S divdi3.S: Assembler
> messages: divdi3.S:105: Error: detected global register use not covered by
> .register pseudo-op

For a start I'll refer you to
http://docs.oracle.com/cd/E19620-01/805-6015/chap3-15/index.html

lesse,..

    [root@ca-qasparc10 ~]# cd /tmp; export PKG=silo  ; rm -rf /tmp/$PKG ; svn co
    http://ca-svn.us.oracle.com/svn/repos/rhel4/$PKG/branches-6/el6-u5-sparc64 
    $PKG ; cd /tmp/$PKG
    [root@ca-qasparc10 silo]# bs
    Wrote: /tmp/silo/silo-1.4.14-4.0.18.el6.src.rpm
    [root@ca-qasparc10 silo]# rpmbuild --recompile
    /tmp/silo/silo-1.4.14-4.0.18.el6.src.rpm
    ...

    gcc -static -Os -Wall -I. -I../include -fomit-frame-pointer 
-fno-strict-aliasing
     -DSMALL_RELOC=0x280000 -DLARGE_RELOC=0x380000 -fno-stack-protector -c ffs.c
    *gcc -static -Os -Wall -I. -I../include -fomit-frame-pointer
    -fno-strict-aliasing -DSMALL_RELOC=0x280000 -DLARGE_RELOC=0x380000
    -fno-stack-protector -c divdi3.S*
    gcc -static -Os -Wall -I. -I../include -fomit-frame-pointer
    -fno-strict-aliasing -DSMALL_RELOC=0x280000 -DLARGE_RELOC=0x380000
    -fno-stack-protector -c udivdi3.S
    gcc -static -Os -Wall -I. -I../include -fomit-frame-pointer
    -fno-strict-aliasing -DSMALL_RELOC=0x280000 -DLARGE_RELOC=0x380000
    -fno-stack-protector    bin2h.c   -o bin2h
    make[1]: Leaving directory `/root/rpmbuild/BUILD/silo-1.4.14/common'
    make[1]: Entering directory `/root/rpmbuild/BUILD/silo-1.4.14/first'
    gcc -static -Os -Wall -I. -I../include -fomit-frame-pointer
    -fno-strict-aliasing -DSMALL_RELOC=0x280000 -DLARGE_RELOC=0x380000
    -fno-stack-protector -c first.S -o first.o
    ld -m elf64_sparc -N -Ttext 0x4000 -o first first.o
    nm first | grep -v '*ABS*' | sort > first.map
    strip first
    elftoaout -o first.b first

    ...
    Wrote: /root/rpmbuild/RPMS/sparc64/silo-1.4.14-4.0.18.el6.sparc64.rpm

(Joy,.. still compiles 8) )

lets see your error message is about
divdi3.S around line 105...

I don't think we did any hacking in there, the only ref we have is

    [root@ca-qasparc10 silo]# grep /divdi3.S *patch
    silo-1.4.14-build-as-64bit.patch:diff -r -u silo-1.4.14/common/divdi3.S
    silo-1.4.14-bias/common/divdi3.S
    silo-1.4.14-build-as-64bit.patch:--- silo-1.4.14/common/divdi3.S 2012-12-06
    04:09:00.000000000 +0100
    silo-1.4.14-build-as-64bit.patch:+++ silo-1.4.14-bias/common/divdi3.S
    2013-05-22 15:09:47.457000000 +0200

Assuming that your src looks the same, is this around where it went wrong?


         97 ! Got carry from n.  Subtract next step to cancel this carry.
         98         bne     4b
         99          addcc  %o1,%o1,%o1     ! shift n1n0 and a 0-bit in lsb
        100         sub     %i0,%o4,%i0
        101 3:      xnor    %o1,0,%o1
        102         b .LL50
        103         mov 0,%o2
        104 .LL46:
        *105         cmp %o4,0*
        106         bne .LL85
        107         mov %i0,%o2
        108         mov 1,%o0
        109         call .udiv,0
        110         mov 0,%o1
        111         mov %o0,%o4
        112         mov %i0,%o2
        113 .LL85:
        114         mov 0,%g3
        115         mov     32,%g1
        116         subcc   %g3,%o4,%g0
        117 1:      bcs     5f
        118          addxcc %o2,%o2,%o2     ! shift n1n0 and a q-bit in lsb
        119         sub     %g3,%o4,%g3     ! this kills msb of n




Reply via email to