diff options
author | 2025-08-03 15:29:48 +0100 | |
---|---|---|
committer | 2025-08-03 15:29:48 +0100 | |
commit | b11cf48853bc4eccde60bc82180025f0797fa823 (patch) | |
tree | 7244ab889590066ff2a26ba3c1f475e7dae79130 /src/wincrt.c | |
parent | 9853d19b4de3e66138da8b3e66ccdaea356ea35b (diff) | |
download | sst-b11cf48853bc4eccde60bc82180025f0797fa823.tar.gz sst-b11cf48853bc4eccde60bc82180025f0797fa823.zip |
Use shorter spellings of __asm and __attribute
Turns out, there's no need for the trailing underscores. Plus, glibc
does some stupid stuff with __attribute__ for non-GCC compilers. Not
that that matters here, but it seems like a good practice just to use
the forms that never have such problems. And it's shorter too.
Diffstat (limited to 'src/wincrt.c')
-rw-r--r-- | src/wincrt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wincrt.c b/src/wincrt.c index 566b272..9e8b9f5 100644 --- a/src/wincrt.c +++ b/src/wincrt.c @@ -13,7 +13,7 @@ int memcmp(const void *restrict x, const void *restrict y, unsigned int sz) { #if defined(__GNUC__) || defined(__clang__) int a, b; - __asm__ volatile ( + __asm volatile ( "xor eax, eax\n" "repz cmpsb\n" : "+D" (x), "+S" (y), "+c" (sz), "=@cca"(a), "=@ccb"(b) @@ -34,7 +34,7 @@ int memcmp(const void *restrict x, const void *restrict y, unsigned int sz) { void *memcpy(void *restrict x, const void *restrict y, unsigned int sz) { #if defined(__GNUC__) || defined(__clang__) void *r = x; - __asm__ volatile ( + __asm volatile ( "rep movsb\n" : "+D" (x), "+S" (y), "+c" (sz) : @@ -51,7 +51,7 @@ void *memcpy(void *restrict x, const void *restrict y, unsigned int sz) { void *memset(void *x, int c, unsigned int sz) { #if defined(__GNUC__) || defined(__clang__) void *r = x; - __asm__ volatile ( + __asm volatile ( "rep stosb\n" : "+D" (x), "+c" (sz) : "a"(c) @@ -71,7 +71,7 @@ int __stdcall _DllMainCRTStartup(void *inst, unsigned int reason, } #ifdef __clang__ -__attribute__((used)) +__attribute((used)) #endif int _fltused = 1; |