gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] Over-aggressive Optimizations with gcc 4.1.1


From: Gaius Mulley
Subject: Re: [Gm2] Over-aggressive Optimizations with gcc 4.1.1
Date: 26 Oct 2006 09:42:54 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

John O Goyo <address@hidden> writes:

> Greetings:
> 
> I am trying gm2 with gcc 4.1.1 under Solaris 10 on Sparc (ilp32).  As
> Gaius said, gm2 builds, most of check-gm2 passes, gm2.paranoid fails,
> and it installs (except the man page).  However, optimization does
> some bizarre things.
> 
> Witness.
> 
> gcc-4.1.1-32: tst=> cat add.def
> DEFINITION MODULE add;
> 
> PROCEDURE Add(x,y :CARDINAL) :CARDINAL;
> 
> END add.
> gcc-4.1.1-32: tst=> cat add.mod
> IMPLEMENTATION MODULE add;
> 
> PROCEDURE Add(x,y :CARDINAL) :CARDINAL;
> BEGIN
>    RETURN x + y
> END Add;
> 
> END add.
> gcc-4.1.1-32: tst=> gm2 -S -I. add.mod
> gcc-4.1.1-32: tst=> cat add.s
>          .file   "add.mod"
>          .section        ".text"
>          .align 4
>          .global _M2_add_init
>          .type   _M2_add_init, #function
>          .proc   04
> _M2_add_init:
>          save    %sp, -112, %sp
>          restore
>          jmp     %o7+8
>           nop
>          .size   _M2_add_init, .-_M2_add_init
>          .align 4
>          .global add_Add
>          .type   add_Add, #function
>          .proc   016
> add_Add:
>          save    %sp, -120, %sp
>          st      %i0, [%fp+68]
>          st      %i1, [%fp+72]
>          ld      [%fp+68], %g2
>          ld      [%fp+72], %g1
>          add     %g2, %g1, %g1
>          st      %g1, [%fp-20]
>          ld      [%fp-20], %g1
>          mov     %g1, %i0
>          restore
>          jmp     %o7+8
>           nop
>          .size   add_Add, .-add_Add
>          .ident  "GCC: (GNU) 4.1.1"
> gcc-4.1.1-32: tst=> gm2 -S -I. -O2 add.mod
> gcc-4.1.1-32: tst=> cat add.s
>          .file   "add.mod"
>          .ident  "GCC: (GNU) 4.1.1"
> gcc-4.1.1-32: tst=>
> 
> Hhhmm..... #6-)
> john

Hi John,

thanks for the report - yes gm2 does perform some rather optimistic
transformations..  looks like we need another set of regression tests
which perform -O2 and a link and run.

Also thanks for reporting that 4.1.1 and gm2 builds on Solaris 10.
This is the first time I've heard this combination - and it gets as
far as my LP64 Athlon GNU/Linux (different endianness iirc).

regards,
Gaius




reply via email to

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