Skip to content

Commit 0eead94

Browse files
dlechdpgeorge
authored andcommitted
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 <[email protected]>
1 parent 7188111 commit 0eead94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/libm/thumb_vfp_sqrtf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <math.h>
44

55
float sqrtf(float x) {
6-
asm volatile (
6+
__asm__ volatile (
77
"vsqrt.f32 %[r], %[x]\n"
88
: [r] "=t" (x)
99
: [x] "t" (x));

lib/libm_dbl/thumb_vfp_sqrt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
double sqrt(double x) {
44
double ret;
5-
asm volatile (
5+
__asm__ volatile (
66
"vsqrt.f64 %P0, %P1\n"
77
: "=w" (ret)
88
: "w" (x));

0 commit comments

Comments
 (0)