File: src-core-matrix

package info (click to toggle)
ctffind 4.1.14-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,152 kB
  • sloc: cpp: 20,464; sh: 11,443; makefile: 117
file content (20 lines) | stat: -rw-r--r-- 819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Don't use inline assembly on non-x86 architectures
Date: Thu, 8 Jun 2023 12:54:11 +0100
From: Danilo Egea Gondolfo <danilo.egea.gondolfo@gmail.com>
Bug-Ubuntu: https://launchpad.net/bugs/2023288
Bug-Debian: https://bugs.debian.org/1037227

--- a/src/core/matrix.cpp
+++ b/src/core/matrix.cpp
@@ -4,7 +4,11 @@
 // think i got it from a book i had about game programming in c.. it's probably slower than what the compiler would do these days.
 
 #define AL_PI        3.14159265358979323846
+#if defined(__i386__) || defined(__x86_64__)
 #define _AL_SINCOS(x, s, c)  __asm__ ("fsincos" : "=t" (c), "=u" (s) : "0" (x))
+#else
+#define _AL_SINCOS(x, s, c) s = sinf(x); c = cosf(x)
+#endif
 #define FLOATSINCOS(x, s, c)  _AL_SINCOS((x) * AL_PI / 128.0, s ,c)
 
 #define MAKE_ROTATION_f(x, y, z)                \