This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs-2.92.02 19980905 (m68k-next-nextstep3): Address of hoisted loadclobbered
- To: egcs at cygnus dot com
- Subject: egcs-2.92.02 19980905 (m68k-next-nextstep3): Address of hoisted loadclobbered
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Tue, 8 Sep 98 19:20:25 +0200
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
Compile the following with flags:
/usr/snp/bin/g77 -g -O3 -funroll-loops -fforce-addr
-fomit-frame-pointer -S -funix-intrinsics-hide a.f
subroutine MXVA( A, IA, JA, X, INCX, Y, INCY, M, N )
implicit none
integer i, j, ia, ja, incx, incy, m, n
double precision a(*), x(*), y(*)
if ( m .le. 0 .or.
, n .le. 0 .or.
, ia .eq. 0 .or.
, ja .eq. 0 .or.
, incx .eq. 0 .or.
, incy .eq. 0 ) then
write(0,*)'MXVA - ARGUMENT ERROR; ABORT'
call abort
endif
do i = 1, m
y((i-1)*incy+1) = 0.0
do j = 1, n
y((i-1)*incy+1) = y((i-1)*incy+1) +
+ a((i-1)*ia+(j-1)*ja+1) * x((j-1)*incx+1)
enddo
enddo
end
An excerpt from the assmebly output, around the unrolled inner loop:
fmoved a4@,fp1 <-- Load hoisted
movel d4,d0
movel sp@(60),a4 <-- Bleeeccchhhh
mulsl a4@,d0
...
fmoved fp1,a4@ <-- Store sunk
which, of course, results in a Segmentation Violation.
Hope this is complete enough,
Toon.