We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7650c0a commit 059640bCopy full SHA for 059640b
include/deadbeef/fastftoi.h
@@ -157,6 +157,27 @@ static __inline void fpu_restore(fpu_control fpu){
157
158
#endif /* Special MSVC x64 implementation */
159
160
+#if defined(__aarch64__)
161
+
162
+# define FPU_CONTROL
163
164
+#include <arm_neon.h>
165
166
+typedef int16_t fpu_control;
167
168
+static inline int ftoi(float f) {
169
+ float32x2_t fvec = vld1_f32(&f);
170
+ int32x2_t ivec = vcvt_s32_f32(fvec);
171
+ return vget_lane_s32(ivec, 0);
172
+}
173
174
+static inline void fpu_setround(fpu_control *fpu){
175
176
177
+static inline void fpu_restore(fpu_control fpu){
178
179
180
+#endif
181
182
/* If no special implementation was found for the current compiler / platform,
183
use the default implementation here: */
0 commit comments