Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2016 00:33:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 214862] head -r309197 clang 3.9.0 vs. TARGET_ARCH=powerpc: fsck_ufs and "df -m" are example failures: __floatdidf gets SIGSEGV's in both of them
Message-ID:  <bug-214862-8-mQMGBi4ipz@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-214862-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-214862-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214862

--- Comment #1 from Mark Millard <markmi@dsl-only.net> ---
(In reply to Mark Millard from comment #0)

Looking around in gdb there seem to be two __floatdidf routines with differ=
ing
code.

First showing the one that was used and failed:

(gdb) x/50i 0x0181afc0
. . .
0x181afcc <__floatdidf>:        mflr    r0
0x181afd0 <__floatdidf+4>:      stw     r0,4(r1)
0x181afd4 <__floatdidf+8>:      stwu    r1,-32(r1)
0x181afd8 <__floatdidf+12>:     stw     r31,28(r1)
0x181afdc <__floatdidf+16>:     stw     r30,24(r1)
0x181afe0 <__floatdidf+20>:     bl      0x182e96c <.got+20>
0x181afe4 <__floatdidf+24>:     mr      r31,r1
0x181afe8 <__floatdidf+28>:     xoris   r3,r3,32768
0x181afec <__floatdidf+32>:     lis     r5,17200
0x181aff0 <__floatdidf+36>:     mflr    r30
0x181aff4 <__floatdidf+40>:     stw     r3,12(r31)
0x181aff8 <__floatdidf+44>:     stw     r5,8(r31)
0x181affc <__floatdidf+48>:     lwz     r3,-16(r30)
0x181b000 <__floatdidf+52>:     lwz     r6,-20(r30)
0x181b004 <__floatdidf+56>:     lfd     f1,8(r31)
0x181b008 <__floatdidf+60>:     stw     r4,20(r31)
0x181b00c <__floatdidf+64>:     stw     r5,16(r31)
0x181b010 <__floatdidf+68>:     lfd     f13,16(r31)
0x181b014 <__floatdidf+72>:     lwz     r0,36(r1)
0x181b018 <__floatdidf+76>:     lwz     r31,28(r1)
0x181b01c <__floatdidf+80>:     lwz     r30,24(r1)
0x181b020 <__floatdidf+84>:     lfs     f2,0(r3)
0x181b024 <__floatdidf+88>:     lwz     r3,-12(r30)
0x181b028 <__floatdidf+92>:     lfs     f0,0(r6)
0x181b02c <__floatdidf+96>:     lfs     f12,0(r3)
0x181b030 <__floatdidf+100>:    fsub    f0,f1,f0
0x181b034 <__floatdidf+104>:    fmul    f0,f0,f2
0x181b038 <__floatdidf+108>:    fadd    f0,f0,f12
0x181b03c <__floatdidf+112>:    fadd    f1,f13,f0
0x181b040 <__floatdidf+116>:    addi    r1,r1,32
0x181b044 <__floatdidf+120>:    mtlr    r0
0x181b048 <__floatdidf+124>:    blr
. . .

Then showing the one that was not used that I found:

(gdb) disass __floatdidf
Dump of assembler code for function __floatdidf:
0x4199fc8c <__floatdidf+0>:     mflr    r0
0x4199fc90 <__floatdidf+4>:     stw     r0,4(r1)
0x4199fc94 <__floatdidf+8>:     stwu    r1,-32(r1)
0x4199fc98 <__floatdidf+12>:    stw     r31,28(r1)
0x4199fc9c <__floatdidf+16>:    stw     r30,24(r1)
0x4199fca0 <__floatdidf+20>:    mr      r31,r1
0x4199fca4 <__floatdidf+24>:    srawi   r5,r3,31
0x4199fca8 <__floatdidf+28>:    bl      0x41a0a288 <.got+14428>
0x4199fcac <__floatdidf+32>:    cmpwi   r3,0
0x4199fcb0 <__floatdidf+36>:    addc    r6,r4,r5
0x4199fcb4 <__floatdidf+40>:    adde    r6,r3,r5
0x4199fcb8 <__floatdidf+44>:    lis     r3,17200
0x4199fcbc <__floatdidf+48>:    xor     r5,r6,r5
0x4199fcc0 <__floatdidf+52>:    mflr    r30
0x4199fcc4 <__floatdidf+56>:    bge-    0x4199fccc <__floatdidf+64>
0x4199fcc8 <__floatdidf+60>:    neg     r4,r4
0x4199fccc <__floatdidf+64>:    lwz     r12,-3124(r30)
0x4199fcd0 <__floatdidf+68>:    stw     r5,20(r31)
0x4199fcd4 <__floatdidf+72>:    stw     r4,12(r31)
0x4199fcd8 <__floatdidf+76>:    lwz     r4,-3120(r30)
0x4199fcdc <__floatdidf+80>:    stw     r3,16(r31)
0x4199fce0 <__floatdidf+84>:    stw     r3,8(r31)
0x4199fce4 <__floatdidf+88>:    lfd     f1,16(r31)
0x4199fce8 <__floatdidf+92>:    lfd     f3,8(r31)
0x4199fcec <__floatdidf+96>:    lfs     f0,0(r12)
0x4199fcf0 <__floatdidf+100>:   lfs     f2,0(r4)
0x4199fcf4 <__floatdidf+104>:   fsub    f1,f1,f0
0x4199fcf8 <__floatdidf+108>:   fsub    f0,f3,f0
0x4199fcfc <__floatdidf+112>:   fmul    f1,f1,f2
0x4199fd00 <__floatdidf+116>:   fadd    f1,f0,f1
0x4199fd04 <__floatdidf+120>:   bge-    0x4199fd0c <__floatdidf+128>
0x4199fd08 <__floatdidf+124>:   fneg    f1,f1
0x4199fd0c <__floatdidf+128>:   lwz     r0,36(r1)
0x4199fd10 <__floatdidf+132>:   lwz     r31,28(r1)
0x4199fd14 <__floatdidf+136>:   lwz     r30,24(r1)
0x4199fd18 <__floatdidf+140>:   addi    r1,r1,32
0x4199fd1c <__floatdidf+144>:   mtlr    r0
0x4199fd20 <__floatdidf+148>:   blr
End of assembler dump.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214862-8-mQMGBi4ipz>