Let me convert both 32-bit and 64-bit unsigned integers to floating-point values The requirement is that x86 registers have x86 instructions to convert signed integers to single and double exact floating-point values, but there is nothing for unsigned integer Bonus: Float-point value in 32-bit and 64-bit signed integer How to convert MM registers? with the response of Jane's < Code> GCC -march = root-o3 I7, so it is with it and it contains -mavx
uint2float and vice versa, long conversions There is only special case for more than 1 number in 2 63 .
0000000000000000 & lt; Ulong2double>: 0: 48 85 FF Test% RDI;% RDI 3: 78 0JJ10; Ulong2double + 0x10 & gt; 5: C4E1FB2AC7 vcvtsi2sd% rdi,% xmm0,% xmm0a: c3 rtc b: 0f1f44 00 00nopl 0x0 (% rx,% rx, 1) 10: 48 89 fo Mov% rdi,% rex 13: 83 e 7 01 and $ 0 x 1,% adi 16: 48 d 1 e 8 lion% rex 19: 48 09 f8 or% rdi,% rx 1c: c4i1 FB2ACVVVTS2SD% Rx,% x MMT,% xMM21: C5FB 58C0 vaddsd% xmm0,% xmm0,% xmm0 25: c3 retq 0000000000000030 & lt; Ulong2float>: 30: 48 85 FF Test% RDI,% RDI 33: 78 0JJ40 & lt; Ulong2float + 0x10 & gt; 35: C4E1F2AC7 vcvtsi2ss% rdi,% xmm0,% xmm03a: c3 rtc 3b: 0f1f44 00 00nopl 0x0 (% rx,% rx, 1) 40: 48 89 F8 MUV% RDI,% Rex 43: 83 E7 01 and $ 0x1,% EDI 46: 48 d1 e8 SHR% Rax 49: 48 09 F8 or% RDI,% Rax 4c: C4 E1 Father 2a c0 vcvtsi2ss% Rax, % Xmm0,% xmm0 51: C5 Father 58 c0 vaddss% xmm0,% xmm0,% xmm0 55: c3 retq 0000000000000060 & lt; Uint2double & gt ;: 60: 89f% mov% edi% edi 62: c4i1fb plan2ac7vcvtsi2sd% rdi,% xmm0,% xmm0 67: c3 retq 0000000000000070 & lt; Uint2float>: 70: 89fF% MOE% EDI% EDI 72: C4 E1 Father 2Acc 7 vcvtsi2ss% RDI,% xmm0,% xmm0 77: C3 retq
Comments
Post a Comment