This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Still fldl/fstpl use with fpmath=sse?


Hi!

Use of x87 has improved considerably with -mfpmath=sse, but
I still see a lot of double moves going through the fp stack,
like:

.L8350:
        fldl    (%esi)
        fstpl   -40(%ebp)
        movl    $0, 4(%esp)
        movl    %edi, (%esp)
        call    _ZNK11GuardLayersILi3EE5lowerEi
        cvtsi2sd        %eax, %xmm0
        mulsd   -40(%ebp), %xmm0
        movsd   %xmm0, -40(%ebp)
        fldl    -40(%ebp)
        fstpl   (%ebx)
        fldl    8(%esi)
        fstpl   -32(%ebp)
        movl    $1, 4(%esp)
        movl    %edi, (%esp)
        call    _ZNK11GuardLayersILi3EE5lowerEi

why are not memory-to-memory moves emitted for those
in case of -mfpmath=sse? Code above from (optimized tree dump):

  int temp.14011;
  int temp.14010;
  const double temp.14012;
  double * addr.14018;
  const double temp.14013;
...
  this = &v->engine_m;
  temp.14012 = *&this->x_m[0];
  temp.14010 = lower (g, 0);
  *addr.14018 = temp.14012 * (double) temp.14010;
  temp.14013 = *&this->x_m[1];
  temp.14011 = lower (g, 1);



fldl,fstpl are not used very often, but
alwazn:tmp> grep fldl tramp3d-v3.s | wc -l
     91
alwazn:tmp> grep fstpl tramp3d-v3.s | wc -l
    100

so it may be just an oversight somewhere?

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]