------- Comment #4 from pinskia at gcc dot gnu dot org  2006-10-05 04:38 -------
Actually the reason why it uses cvttsd2si is two fold, first cvttsd2si does not
need to act on a SSE register which is where the argument is passed in.
In fact we use cvttsd2si for 32bit also which actually simplifies the code a
lot.
Compare:
convert:
        cvttsd2si       4(%esp), %eax
        ret

To:
convert:
        subl    $8, %esp
        fnstcw  6(%esp)
        fldl    12(%esp)
        movzwl  6(%esp), %eax
        movb    $12, %ah
        movw    %ax, 4(%esp)
        fldcw   4(%esp)
        fistpl  (%esp)
        fldcw   6(%esp)
        movl    (%esp), %eax
        addl    $8, %esp
        ret


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29337

Reply via email to