1
0
mirror of https://git.code.sf.net/p/mingw-w64/mingw-w64 synced 2025-04-18 17:44:18 +03:00

crt: Rename __ASM_NAKED_FUNC macro to __ASM_DEFINE_FUNC.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
Jacek Caban 2025-04-04 14:48:45 +02:00
parent cf2b16e2a3
commit 7bb76de344
6 changed files with 23 additions and 23 deletions

View File

@ -291,7 +291,7 @@ static inline unsigned int __mingw_statusfp(void)
* has broken behavior on x86_64 by emitting .seh_endprologue. */
#ifndef __clang__
#define __ASM_NAKED_FUNC(rettype, name, args, code) \
#define __ASM_DEFINE_FUNC(rettype, name, args, code) \
asm(".text\n\t" \
".p2align 2\n\t" \
".globl " __MINGW64_STRINGIFY(__MINGW_USYMBOL(name)) "\n\t" \
@ -301,7 +301,7 @@ static inline unsigned int __mingw_statusfp(void)
#else
#define __ASM_NAKED_FUNC(rettype, name, args, code) \
#define __ASM_DEFINE_FUNC(rettype, name, args, code) \
rettype __attribute__((naked)) name args { \
asm(code "\n\t"); \
}

View File

@ -7,8 +7,8 @@
#include <math.h>
#include <internal.h>
__ASM_NAKED_FUNC(double, nearbyint, (double x),
"mrs x1, fpcr\n\t"
"frintx d0, d0\n\t"
"msr fpcr, x1\n\t"
"ret")
__ASM_DEFINE_FUNC(double, nearbyint, (double x),
"mrs x1, fpcr\n\t"
"frintx d0, d0\n\t"
"msr fpcr, x1\n\t"
"ret")

View File

@ -7,8 +7,8 @@
#include <math.h>
#include <internal.h>
__ASM_NAKED_FUNC(float, nearbyintf, (float x),
"mrs x1, fpcr\n\t"
"frintx s0, s0\n\t"
"msr fpcr, x1\n\t"
"ret")
__ASM_DEFINE_FUNC(float, nearbyintf, (float x),
"mrs x1, fpcr\n\t"
"frintx s0, s0\n\t"
"msr fpcr, x1\n\t"
"ret")

View File

@ -7,8 +7,8 @@
#include <math.h>
#include <internal.h>
__ASM_NAKED_FUNC(long double, nearbyintl, (long double x),
"mrs x1, fpcr\n\t"
"frintx d0, d0\n\t"
"msr fpcr, x1\n\t"
"ret")
__ASM_DEFINE_FUNC(long double, nearbyintl, (long double x),
"mrs x1, fpcr\n\t"
"frintx d0, d0\n\t"
"msr fpcr, x1\n\t"
"ret")

View File

@ -7,6 +7,6 @@
#include <math.h>
#include <internal.h>
__ASM_NAKED_FUNC(double, trunc, (double x),
"frintz d0, d0\n\t"
"ret")
__ASM_DEFINE_FUNC(double, trunc, (double x),
"frintz d0, d0\n\t"
"ret")

View File

@ -7,6 +7,6 @@
#include <math.h>
#include <internal.h>
__ASM_NAKED_FUNC(float, truncf, (float x),
"frintz s0, s0\n\t"
"ret")
__ASM_DEFINE_FUNC(float, truncf, (float x),
"frintz s0, s0\n\t"
"ret")