[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gm2] Over-aggressive Optimizations with gcc 4.1.1
From: |
John O Goyo |
Subject: |
[Gm2] Over-aggressive Optimizations with gcc 4.1.1 |
Date: |
Tue, 24 Oct 2006 14:59:30 -0400 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060909) |
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
- [Gm2] Over-aggressive Optimizations with gcc 4.1.1,
John O Goyo <=