Message246252
People have posted the asm now:
https://mail.python.org/pipermail/python-list/2015-July/693509.html
The fmull result appears to be the same. The good gcc versions set
the control word to "truncate" and then use fistpl (single rounding
with the correct mode):
fmull -0x10(%ebp)
fnstcw -0x1a(%ebp)
movzwl -0x1a(%ebp),%eax
mov $0xc,%ah
mov %ax,-0x1c(%ebp)
fldcw -0x1c(%ebp)
fistpl -0x20(%ebp)
The bad versions dump the result of fmull to memory, using
"round-to-nearest" and *then* attempt to truncate with
cvttsd2si, which is too late.
fmull 0x18(%esp)
fstpl 0x8(%esp)
cvttsd2si 0x8(%esp),%eax
I suspect that there are passages in various standards that allow
both behaviors. ;) |
|
Date |
User |
Action |
Args |
2015-07-04 12:17:41 | skrah | set | recipients:
+ skrah, tim.peters, rhettinger, mark.dickinson, vstinner, steven.daprano, r.david.murray, serhiy.storchaka, Serge Anuchin |
2015-07-04 12:17:41 | skrah | set | messageid: <1436012261.72.0.317914045691.issue24546@psf.upfronthosting.co.za> |
2015-07-04 12:17:41 | skrah | link | issue24546 messages |
2015-07-04 12:17:41 | skrah | create | |
|