This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: code generation puzzle on alpha
- To: gcc at gcc dot gnu dot org, lucier at math dot purdue dot edu
- Subject: Re: code generation puzzle on alpha
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Wed, 29 Sep 1999 14:30:32 -0500 (EST)
- Cc: hosking at cs dot purdue dot edu, staff at math dot purdue dot edu
Maybe I don't have to look through all those rtl dumps; when compiled
on the sparc with
polya-3% gcc -mcpu=ultrasparc -fno-math-errno -fPIC -O2 -S -D___DYNAMIC -D___SINGLE_HOST -save-temps -da crap.c
there are no extraneous moves or float-to-int conversions. Is there
something wrong with the alpha.md file that perhaps gives incorrect
costs to certain instructions?
Brad Lucier
Assembler on sparc:
.file "crap.c"
gcc2_compiled.:
.section ".text"
.align 4
.LLGETPC0:
retl
add %o7,%l7,%l7
.align 4
.align 32
.type ___H__20_test_2d_alpha2,#function
.proc 04
___H__20_test_2d_alpha2:
!#PROLOGUE# 0
save %sp, -112, %sp
sethi %hi(___glo_tbl), %o0
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7
call .LLGETPC0
add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7
or %o0, %lo(___glo_tbl), %o0
mov %i0, %o4
ld [%l7+%o0], %o7
ld [%o4+40], %o1
ld [%o7+12], %o0
ld [%o1+35], %l1
ld [%o0], %o2
ldd [%l1+11], %f18
ldd [%o2+3], %f2
ld [%o4+44], %o3
ld [%o1+19], %o2
fmuld %f2, %f18, %f2
ld [%o3+35], %l0
ld [%o3+3], %o5
ldd [%l0+11], %f16
ld [%o1+3], %o1
ldd [%o5+3], %f4
fmuld %f2, %f16, %f18
ldd [%o1+11], %f10
ldd [%o1+19], %f8
ldd [%o5+19], %f14
ldd [%o5+11], %f2
ldd [%o1+3], %f16
fsubd %f8, %f14, %f8
ldd [%o2+3], %f12
fsubd %f10, %f2, %f10
ld [%o7+8], %o1
fsubd %f16, %f4, %f16
ld [%o3+19], %o3
ld [%o1], %o0
fmuld %f8, %f8, %f14
fmuld %f10, %f10, %f2
ldd [%o0+3], %f6
fmuld %f16, %f16, %f4
ld [%o4+116], %o0
faddd %f4, %f2, %f2
faddd %f14, %f2, %f14
fsqrtd %f14, %f4
fmuld %f6, %f14, %f6
fmuld %f6, %f4, %f14
fdivd %f18, %f14, %f18
fmuld %f16, %f18, %f16
fmuld %f18, %f10, %f14
fmuld %f8, %f18, %f8
fsubd %f12, %f16, %f12
std %f12, [%o2+3]
ldd [%o2+11], %f12
fsubd %f12, %f14, %f12
std %f12, [%o2+11]
ldd [%o2+19], %f12
fsubd %f12, %f8, %f12
std %f12, [%o2+19]
ldd [%o3+3], %f2
faddd %f2, %f16, %f2
std %f2, [%o3+3]
ldd [%o3+11], %f2
faddd %f2, %f14, %f2
std %f2, [%o3+11]
ldd [%o3+19], %f2
st %o5, [%o4+64]
st %o3, [%o4+44]
faddd %f8, %f2, %f8
st %o2, [%o4+48]
st %l1, [%o4+56]
st %l0, [%o4+60]
std %f8, [%o3+19]
st %o3, [%o4+40]
ret
restore %g0, %o0, %o0
.LLfe1:
.size ___H__20_test_2d_alpha2,.LLfe1-___H__20_test_2d_alpha2
.local ___lp
.common ___lp,4,4
.local ___glo_tbl
.common ___glo_tbl,16,4
.ident "GCC: (GNU) 2.96 19990922 (experimental)"