------- Comment #9 from ubizjak at gmail dot com 2006-11-29 21:05 ------- (In reply to comment #8) > The patch doesn't like me ;) > > [EMAIL PROTECTED]:~/src/trunk/gcc/config/i386$ patch -p0 < /tmp/p > patching file i386.md > Hunk #1 succeeded at 3892 (offset -49 lines). > Hunk #2 succeeded at 3919 (offset -47 lines). > Hunk #3 succeeded at 3990 (offset -47 lines). > Hunk #4 succeeded at 4017 (offset -45 lines). > Hunk #5 FAILED at 15622. > patch: **** unexpected end of file in patch
That is because I have 4 open projects in one branch. In about an hour, the regression test will finish and I'll post clean patch to gcc-patches. > > what does it generate for > > double foo(double a, double b) > { > double x = fmod(a, 1.1); > return x + b; > } > > does it do the truncation as part of the x87 -> SSE register move or > is there extra operations involved? If we can get all variants optimal > (store to memory comes to my mind as well) it would be nice! > movsd %xmm0, -16(%rsp) fldl -16(%rsp) fldl .LC0(%rip) fxch %st(1) .L2: fprem fnstsw %ax testb $4, %ah jne .L2 fstp %st(1) fstpl -8(%rsp) movsd -8(%rsp), %xmm0 addsd %xmm1, %xmm0 ret The x87 store represents the truncation. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29852