swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 2.8.0 -- bug on sparc architecture


From: Matthias Klose
Subject: GCC 2.8.0 -- bug on sparc architecture
Date: Mon, 24 Nov 1997 11:23:12 +0100 (MET)

Scott Christley writes:
> 
> FSF has put a code freeze on GCC development in anticipation of a 2.8.0
> release; I encourage everybody to download the latest snapshot and test it
> with real applications as much as possible, especially ObjC code.
> 
> ftp://vger.rutgers.edu/pub/gcc/ss-971121.tar.gz
> 
> Note this is a snapshot, do not replace your system GCC with this snapshot!

On Solaris2.5 and Solaris2.6 the __builtin_apply expands to an
unimplemented instruction in the assembler code. Every program that
uses message forwarding doesn't work anymore ...
The incorrect code is produced with and wothout optimization turned
on. The bug is found in the following gcc versions:

- ss-971121
- egcs-971114
- gcc-2.7.3 with Fortran (f77) patches applied

gcc-2.7.3 is the last version which outputs correct assembler code.
In gcc-2.7.3 instead of the 'unimp' instruction, a 'nop' instruction
is generated.

*** apply.s.gcc-2.7.2.3 Mon Nov 24 11:20:23 1997
--- apply.s.ss-971121   Sun Nov 23 17:33:03 1997
***************
*** 65,71 ****
        ld [%g2+%lo(func)],%l1
        call %l1,0
        nop
!       nop
        std %o0,[%fp-72]
        std %f0,[%fp-64]
        mov %l0,%sp
--- 84,90 ----
        ld [%g2+%lo(func)],%l1
        call %l1,0
        nop
!       unimp 4095
        std %o0,[%fp-72]
        std %f0,[%fp-64]
        mov %l0,%sp

int (*func)(int, char *);

int apply(int x, char *s)
{
        void *args, *rv;

        args = __builtin_apply_args();

        rv = __builtin_apply(func, args, 8);

        return 0;
}

        .file   "apply.c"
! GNU C version testgcc-2.7.90 971121 experimental (sparc-sun-solaris2.6) 
compiled by GNU C version testgcc-2.7.90 971121 experimental.
! options passed: 
! options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
! -fpcc-struct-return -fexceptions -fcommon -fverbose-asm -fgnu-linker
! -mepilogue -mapp-regs

gcc2_compiled.:
.section        ".text"
        .align 4
        .global apply
        .type    apply,#function
        .proc   04
apply:
.LLFB1:
        !#PROLOGUE# 0
        save %sp,-168,%sp
.LLCFI0:
        !#PROLOGUE# 1
        st %i0,[%fp-48]
        st %i1,[%fp-44]
        st %i2,[%fp-40]
        st %i3,[%fp-36]
        st %i4,[%fp-32]
        st %i5,[%fp-28]
        add %fp,68,%o0
        st %o0,[%fp-56]
        ld [%fp+64],%o0
        st %o0,[%fp-52]
        add %fp,-56,%o0
        st %i0,[%fp+68]
        st %i1,[%fp+72]
        st %o0,[%fp-20]
        sethi %hi(func),%g2
        ld [%fp-20],%o1
        ld [%o1],%o0
        mov %sp,%l0
        add %sp,92,%o2
        sub %o2,%sp,%o1
        add %o1,15,%o2
        add %o2,7,%o1
        srl %o1,3,%o2
        mov %o2,%o1
        sll %o1,3,%o2
        sub %sp,%o2,%sp
        add %sp,92,%o1
        add %o1,7,%o2
        srl %o2,3,%o1
        mov %o1,%o2
        sll %o2,3,%o1
        ld [%o0],%o2
        st %o2,[%o1]
        ld [%o0+4],%o0
        st %o0,[%o1+4]
        mov 8,%o0
        ld [%fp-20],%o2
        add %o0,%o2,%o1
        ld [%o1],%o0
        mov 12,%o1
        ld [%fp-20],%o3
        add %o1,%o3,%o2
        ld [%o2],%o1
        mov 16,%o2
        ld [%fp-20],%o4
        add %o2,%o4,%o3
        ld [%o3],%o2
        mov 20,%o3
        ld [%fp-20],%o5
        add %o3,%o5,%o4
        ld [%o4],%o3
        mov 24,%o4
        ld [%fp-20],%g3
        add %o4,%g3,%o5
        ld [%o5],%o4
        mov 28,%o5
        ld [%fp-20],%o7
        add %o5,%o7,%g3
        ld [%g3],%o5
        mov 4,%g3
        ld [%fp-20],%l1
        add %g3,%l1,%o7
        ld [%o7],%g3
        st %g3,[%sp+64]
        ld [%g2+%lo(func)],%l1
        call %l1,0
        nop
        unimp 4095
        std %o0,[%fp-72]
        std %f0,[%fp-64]
        mov %l0,%sp
        add %fp,-72,%o0
        st %o0,[%fp-24]
        mov 0,%i0
        b .LL1
        nop
.LL1:
        ret
        restore
.LLFE1:
.LLfe1:
        .size    apply,.LLfe1-apply
        .common func,4,4

.section        ".eh_frame",#alloc,#write
__FRAME_BEGIN__:
        .uaword .LLECIE1-.LLSCIE1
.LLSCIE1:
        .uaword 0x0
        .byte   0x1
        .byte   0x0
        .byte   0x1
        .byte   0x7c
        .byte   0x65
        .byte   0xc
        .byte   0xe
        .byte   0x0
        .byte   0x9
        .byte   0x65
        .byte   0xf
        .align 4
.LLECIE1:
        .uaword .LLEFDE1-.LLSFDE1
.LLSFDE1:
        .uaword .LLSFDE1-__FRAME_BEGIN__
        .uaword .LLFB1
        .uaword .LLFE1-.LLFB1
        .byte   0x4
        .uaword .LLCFI0-.LLFB1
        .byte   0xd
        .byte   0x1e
        .byte   0x2d
        .byte   0x9
        .byte   0x65
        .byte   0x1f
        .align 4
.LLEFDE1:
        .ident  "GCC: (GNU) testgcc-2.7.90 971121 experimental"

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]