lib/libm: Use __asm__ instead of asm.
`asm` is not part of the C standard and causes a complier error when `-std=c99` is used. `__asm__` is the recommended alternative. https://gcc.gnu.org/onlinedocs/gcc/extensions-to-the-c-language-family/alternate-keywords.html Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
parent
71881116e6
commit
0eead94181
@ -3,7 +3,7 @@
|
||||
#include <math.h>
|
||||
|
||||
float sqrtf(float x) {
|
||||
asm volatile (
|
||||
__asm__ volatile (
|
||||
"vsqrt.f32 %[r], %[x]\n"
|
||||
: [r] "=t" (x)
|
||||
: [x] "t" (x));
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
double sqrt(double x) {
|
||||
double ret;
|
||||
asm volatile (
|
||||
__asm__ volatile (
|
||||
"vsqrt.f64 %P0, %P1\n"
|
||||
: "=w" (ret)
|
||||
: "w" (x));
|
||||
|
Loading…
Reference in New Issue
Block a user