Created attachment 948 [details] patch struct Value { uint a, b; } double mul(Value val, double fac) { return val.a * fac; } int main() { auto a = mul(Value(10), 10.0); // seems to work as val.b == 0 auto b = mul(Value(10, 20), 10.0); // loads the 20 in the fpu return a == b ? 0 : 1; } -- What happens is that the complete rdi register gets pushed and a 64 bit integer is loaded from that address to the FPU. Maybe I'm missing something but loading an 32 bit simplifies even the 32-bit code. See attached patch.
Created attachment 988 [details] new fix The proposed patch was wrong. FILD m64int needs to be used as there are no unsigned->fpu load instructions. The new patch explicitly zeros the upper 4 bytes.
https://github.com/D-Programming-Language/dmd/commit/64a24b9276fd45c3040b5c726452a28add714cb7 https://github.com/D-Programming-Language/dmd/commit/bb40a40b6f804614ffc76ec79e10e7e1881b4c38
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル