| 1 | //cxx . . $ `<file>/arch/x86_64/fpu/sub_64.h`/ |
| 2 | // arch/x86_64/fpu/sub_64.h |
| 3 | // |
| 4 | // This file is subject to the terms and conditions defined in |
| 5 | // 'LICENSE', which is part of this source code package. |
| 6 | // |
| 7 | |
| 8 | #include "common.h"cxx . . $ `<file>/build/common.h`/ |
| 9 | #include <emmintrin.h> |
| 10 | #include <string.h> |
| 11 | |
| 12 | static inline void fpu_sub_64cxx . . $ fpu_sub_64(dbcd37094579061a).( |
| 13 | const uint64_tcxx . . $ uint64_t# *fs, const uint64_tcxx . . $ uint64_t# *ft, uint64_tcxx . . $ uint64_t# *fd) { |
| 14 | double fs_double, ft_double, fd_double; |
| 15 | __m128dcxx . . $ __m128d# fs_reg, ft_reg, fd_reg; |
| 16 | |
| 17 | // Prevent aliasing. |
| 18 | memcpycxx . . $ memcpy(cc817cb175f282d).(&fs_double, fs, sizeof(fs_double)); |
| 19 | memcpycxx . . $ memcpy(cc817cb175f282d).(&ft_double, ft, sizeof(ft_double)); |
| 20 | |
| 21 | fs_reg = _mm_set_sdcxx . . $ _mm_set_sd(8f0e145680c0e317).(fs_double); |
| 22 | ft_reg = _mm_set_sdcxx . . $ _mm_set_sd(8f0e145680c0e317).(ft_double); |
| 23 | fd_reg = _mm_sub_sdcxx . . $ _mm_sub_sd(a27da52cef7cc9d8).(fs_reg, ft_reg); |
| 24 | fd_double = _mm_cvtsd_f64cxx . . $ _mm_cvtsd_f64(c81b9216048b8182).(fd_reg); |
| 25 | |
| 26 | // Prevent aliasing. |
| 27 | memcpycxx . . $ memcpy(cc817cb175f282d).(fd, &fd_double, sizeof(fd_double)); |
| 28 | } |
| 29 |