mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-06 17:06:23 +00:00
Change noinline to dontinline (#312)
We defined `noinline` as an abbreviation for the longer version `__attribute__((__noinline__))` which caused name clashes since third party codebases often write it as `__attribute__((noinline))`.
This commit is contained in:
parent
ca611efc43
commit
6f658f058b
59 changed files with 122 additions and 122 deletions
|
@ -739,7 +739,7 @@ static struct TtyRgb *CopyChunk(struct TtyRgb chunk[hasatleast 4],
|
|||
return chunk;
|
||||
}
|
||||
|
||||
static noinline char *CopyRun(char *v, size_t n,
|
||||
static dontinline char *CopyRun(char *v, size_t n,
|
||||
struct TtyRgb lastchunk[hasatleast 4],
|
||||
const struct TtyRgb **c, size_t *x,
|
||||
struct TtyRgb *bg, struct TtyRgb *fg,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/time/time.h"
|
||||
|
||||
noinline void dostuff(const char *s) {
|
||||
dontinline void dostuff(const char *s) {
|
||||
int i, us;
|
||||
srand(rand64()); /* seeds rand() w/ intel rdrnd, auxv, etc. */
|
||||
for (i = 0; i < 5; ++i) {
|
||||
|
|
|
@ -34,7 +34,7 @@ static uint32_t KnuthMultiplicativeHash32(const void *buf, size_t size) {
|
|||
return h;
|
||||
}
|
||||
|
||||
static textwindows noinline uint32_t GetUserNameHash(void) {
|
||||
static textwindows dontinline uint32_t GetUserNameHash(void) {
|
||||
char16_t buf[257];
|
||||
uint32_t size = ARRAYLEN(buf);
|
||||
GetUserName(&buf, &size);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "libc/nt/thread.h"
|
||||
#include "libc/str/str.h"
|
||||
|
||||
static textwindows noinline int sys_sched_setaffinity_nt(int pid,
|
||||
static textwindows dontinline int sys_sched_setaffinity_nt(int pid,
|
||||
uint64_t bitsetsize,
|
||||
const void *bitset) {
|
||||
int rc;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
static textwindows noinline int sys_ttyname_nt(int fd, char *buf, size_t size) {
|
||||
static textwindows dontinline int sys_ttyname_nt(int fd, char *buf, size_t size) {
|
||||
uint32_t mode;
|
||||
if (GetConsoleMode(g_fds.p[fd].handle, &mode)) {
|
||||
if (mode & kNtEnableVirtualTerminalInput) {
|
||||
|
|
|
@ -36,7 +36,7 @@ static struct HostsTxtInitialStaticMemory {
|
|||
char strings[64];
|
||||
} g_hoststxt_init;
|
||||
|
||||
static textwindows noinline char *GetNtHostsTxtPath(char *pathbuf,
|
||||
static textwindows dontinline char *GetNtHostsTxtPath(char *pathbuf,
|
||||
uint32_t size) {
|
||||
const char *const kWinHostsPath = "\\drivers\\etc\\hosts";
|
||||
uint32_t len = GetSystemDirectoryA(&pathbuf[0], size);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* @param p needs at least 12 bytes
|
||||
* @return pointer to nul byte
|
||||
*/
|
||||
noinline char *FormatUint32(char p[static 12], uint32_t x) {
|
||||
dontinline char *FormatUint32(char p[static 12], uint32_t x) {
|
||||
char t;
|
||||
size_t i, a, b;
|
||||
i = 0;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* @param p needs at least 21 bytes
|
||||
* @return pointer to nul byte
|
||||
*/
|
||||
noinline char *FormatUint64(char p[static 21], uint64_t x) {
|
||||
dontinline char *FormatUint64(char p[static 21], uint64_t x) {
|
||||
char t;
|
||||
size_t i, a, b;
|
||||
i = 0;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* @param p needs at least 21 bytes
|
||||
* @return pointer to nul byte
|
||||
*/
|
||||
noinline char *FormatUint64Thousands(char p[static 27], uint64_t x) {
|
||||
dontinline char *FormatUint64Thousands(char p[static 27], uint64_t x) {
|
||||
size_t i;
|
||||
char m[26];
|
||||
i = 0;
|
||||
|
|
|
@ -28,7 +28,7 @@ uint128_t __udivmodti4(uint128_t, uint128_t, uint128_t *);
|
|||
* @param a needs at least 40 bytes
|
||||
* @return bytes written w/o nul
|
||||
*/
|
||||
noinline size_t uint128toarray_radix10(uint128_t i, char *a) {
|
||||
dontinline size_t uint128toarray_radix10(uint128_t i, char *a) {
|
||||
size_t j;
|
||||
uint128_t rem;
|
||||
j = 0;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
|
||||
noinline size_t uint64toarray(uint64_t i, char *a, int r) {
|
||||
dontinline size_t uint64toarray(uint64_t i, char *a, int r) {
|
||||
size_t j;
|
||||
j = 0;
|
||||
do {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @param a needs at least 21 bytes
|
||||
* @return bytes written w/o nul
|
||||
*/
|
||||
noinline size_t uint64toarray_radix10(uint64_t i, char a[hasatleast 21]) {
|
||||
dontinline size_t uint64toarray_radix10(uint64_t i, char a[hasatleast 21]) {
|
||||
size_t j = 0;
|
||||
do {
|
||||
a[j++] = i % 10 + '0';
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* @param a needs at least 24 bytes
|
||||
* @return bytes written w/o nul
|
||||
*/
|
||||
noinline size_t uint64toarray_radix8(uint64_t i, char a[hasatleast 24]) {
|
||||
dontinline size_t uint64toarray_radix8(uint64_t i, char a[hasatleast 24]) {
|
||||
size_t j;
|
||||
j = 0;
|
||||
do {
|
||||
|
|
|
@ -241,13 +241,13 @@ typedef uint64_t uintmax_t;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef noinline
|
||||
#ifndef dontinline
|
||||
#if !defined(__STRICT_ANSI__) && \
|
||||
(__has_attribute(__noinline__) || \
|
||||
(__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 301)
|
||||
#define noinline __attribute__((__noinline__))
|
||||
#define dontinline __attribute__((__noinline__))
|
||||
#else
|
||||
#define noinline
|
||||
#define dontinline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -606,7 +606,7 @@ typedef uint64_t uintmax_t;
|
|||
} while (0)
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#define testonly noinline _Section(".test")
|
||||
#define testonly dontinline _Section(".test")
|
||||
#define textstartup _Section(".text.startup") noinstrument
|
||||
#define textexit _Section(".text.exit") noinstrument
|
||||
#define textreal _Section(".text.real")
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
typedef char xmm_t __attribute__((__vector_size__(16), __aligned__(1)));
|
||||
typedef long long xmm_a __attribute__((__vector_size__(16), __aligned__(16)));
|
||||
|
||||
noasan static noinline antiquity void bzero_sse(char *p, size_t n) {
|
||||
noasan static dontinline antiquity void bzero_sse(char *p, size_t n) {
|
||||
xmm_t v = {0};
|
||||
if (IsAsan()) __asan_verify(p, n);
|
||||
if (n <= 32) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
typedef char xmm_t __attribute__((__vector_size__(16), __aligned__(1)));
|
||||
|
||||
static noinline antiquity int memcmp_sse(const unsigned char *p,
|
||||
static dontinline antiquity int memcmp_sse(const unsigned char *p,
|
||||
const unsigned char *q, size_t n) {
|
||||
uint64_t w;
|
||||
unsigned u, u0, u1, u2, u3;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
typedef char xmm_t __attribute__((__vector_size__(16), __aligned__(1)));
|
||||
typedef long long xmm_a __attribute__((__vector_size__(16), __aligned__(16)));
|
||||
|
||||
noasan static noinline antiquity void *memset_sse(char *p, char c, size_t n) {
|
||||
noasan static dontinline antiquity void *memset_sse(char *p, char c, size_t n) {
|
||||
xmm_t v = {c, c, c, c, c, c, c, c, c, c, c, c, c, c, c, c};
|
||||
if (IsAsan()) __asan_verify(p, n);
|
||||
if (n <= 32) {
|
||||
|
|
|
@ -103,7 +103,7 @@ static size_t __arena_bulk_free(void *p[], size_t n) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static noinline bool __arena_grow(size_t offset, size_t request) {
|
||||
static dontinline bool __arena_grow(size_t offset, size_t request) {
|
||||
size_t greed;
|
||||
greed = __arena.size + 1;
|
||||
do {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
STATIC_YOINK("rdrand_init");
|
||||
|
||||
static noinline uint64_t rdrand_failover(void) {
|
||||
static dontinline uint64_t rdrand_failover(void) {
|
||||
int f;
|
||||
size_t i;
|
||||
ssize_t r;
|
||||
|
|
|
@ -111,7 +111,7 @@ static int arch_prctl_freebsd(int code, int64_t addr) {
|
|||
}
|
||||
}
|
||||
|
||||
static privileged noinline int arch_prctl_xnu(int code, int64_t addr) {
|
||||
static privileged dontinline int arch_prctl_xnu(int code, int64_t addr) {
|
||||
int ax;
|
||||
switch (code) {
|
||||
case ARCH_SET_GS:
|
||||
|
@ -129,7 +129,7 @@ static privileged noinline int arch_prctl_xnu(int code, int64_t addr) {
|
|||
}
|
||||
}
|
||||
|
||||
static privileged noinline int arch_prctl_openbsd(int code, int64_t addr) {
|
||||
static privileged dontinline int arch_prctl_openbsd(int code, int64_t addr) {
|
||||
int64_t rax;
|
||||
switch (code) {
|
||||
case ARCH_GET_FS:
|
||||
|
|
|
@ -32,7 +32,7 @@ struct clockinfo_netbsd {
|
|||
|
||||
static int clk_tck;
|
||||
|
||||
static noinline int __clk_tck_init(void) {
|
||||
static dontinline int __clk_tck_init(void) {
|
||||
int x;
|
||||
int cmd[2];
|
||||
size_t len;
|
||||
|
|
|
@ -59,7 +59,7 @@ static textwindows noasan char16_t *ParseInt(char16_t *p, int64_t *x) {
|
|||
return p;
|
||||
}
|
||||
|
||||
static noinline textwindows noasan bool ForkIo(int64_t h, void *buf, size_t n,
|
||||
static dontinline textwindows noasan bool ForkIo(int64_t h, void *buf, size_t n,
|
||||
bool32 (*f)()) {
|
||||
char *p;
|
||||
size_t i;
|
||||
|
@ -72,14 +72,14 @@ static noinline textwindows noasan bool ForkIo(int64_t h, void *buf, size_t n,
|
|||
return true;
|
||||
}
|
||||
|
||||
static noinline textwindows noasan void WriteAll(int64_t h, void *buf,
|
||||
static dontinline textwindows noasan void WriteAll(int64_t h, void *buf,
|
||||
size_t n) {
|
||||
if (!ForkIo(h, buf, n, WriteFile)) {
|
||||
SYSDEBUG("fork() WriteFile(%zu) failed %d\n", n, GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
static textwindows noinline noasan void ReadAll(int64_t h, void *buf,
|
||||
static textwindows dontinline noasan void ReadAll(int64_t h, void *buf,
|
||||
size_t n) {
|
||||
if (!ForkIo(h, buf, n, ReadFile)) {
|
||||
SYSDEBUG("fork() ReadFile(%zu) failed %d\n", n, GetLastError());
|
||||
|
|
|
@ -150,7 +150,7 @@ static noasan void *MapMemory(void *addr, size_t size, int prot, int flags,
|
|||
* This is useful on Windows since it allows us to partially unmap or
|
||||
* punch holes into existing mappings.
|
||||
*/
|
||||
static textwindows noinline noasan void *MapMemories(char *addr, size_t size,
|
||||
static textwindows dontinline noasan void *MapMemories(char *addr, size_t size,
|
||||
int prot, int flags,
|
||||
int fd, int64_t off, int f,
|
||||
int x, size_t n) {
|
||||
|
|
|
@ -1318,7 +1318,7 @@ static textwindows struct PortState *port_state_from_handle_tree_node(
|
|||
return CONTAINOF(tree_node, struct PortState, handle_tree_node);
|
||||
}
|
||||
|
||||
static textwindows noinline int sys_epoll_create1_nt(uint32_t flags) {
|
||||
static textwindows dontinline int sys_epoll_create1_nt(uint32_t flags) {
|
||||
int fd;
|
||||
int64_t ephnd;
|
||||
struct PortState *port_state;
|
||||
|
@ -1344,7 +1344,7 @@ static textwindows noinline int sys_epoll_create1_nt(uint32_t flags) {
|
|||
return fd;
|
||||
}
|
||||
|
||||
static textwindows noinline int sys_epoll_ctl_nt(int epfd, int op, int fd,
|
||||
static textwindows dontinline int sys_epoll_ctl_nt(int epfd, int op, int fd,
|
||||
struct epoll_event *ev) {
|
||||
int r;
|
||||
struct PortState *port_state;
|
||||
|
@ -1374,7 +1374,7 @@ static textwindows noinline int sys_epoll_ctl_nt(int epfd, int op, int fd,
|
|||
}
|
||||
}
|
||||
|
||||
static textwindows noinline int sys_epoll_wait_nt(int epfd,
|
||||
static textwindows dontinline int sys_epoll_wait_nt(int epfd,
|
||||
struct epoll_event *events,
|
||||
int maxevents,
|
||||
int timeoutms) {
|
||||
|
|
|
@ -134,7 +134,7 @@ static textwindows DIR *opendir_nt_impl(char16_t *name, size_t len) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static textwindows noinline DIR *opendir_nt(const char *path) {
|
||||
static textwindows dontinline DIR *opendir_nt(const char *path) {
|
||||
int len;
|
||||
DIR *res;
|
||||
char16_t *name;
|
||||
|
@ -149,7 +149,7 @@ static textwindows noinline DIR *opendir_nt(const char *path) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static textwindows noinline DIR *fdopendir_nt(int fd) {
|
||||
static textwindows dontinline DIR *fdopendir_nt(int fd) {
|
||||
DIR *res;
|
||||
char16_t *name;
|
||||
if (__isfdkind(fd, kFdFile)) {
|
||||
|
@ -189,7 +189,7 @@ static textwindows uint8_t GetNtDirentType(struct NtWin32FindData *w) {
|
|||
}
|
||||
}
|
||||
|
||||
static textwindows noinline struct dirent *readdir_nt(DIR *dir) {
|
||||
static textwindows dontinline struct dirent *readdir_nt(DIR *dir) {
|
||||
size_t i;
|
||||
if (!dir->isdone) {
|
||||
bzero(&dir->ent, sizeof(dir->ent));
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
typedef uint64_t xmm_t __attribute__((__vector_size__(16), __aligned__(1)));
|
||||
|
||||
static noinline antiquity int memcmp_sse(const char *p, const char *q,
|
||||
static dontinline antiquity int memcmp_sse(const char *p, const char *q,
|
||||
size_t n) {
|
||||
xmm_t a;
|
||||
while (n > 32) {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
void djbsort_avx2(int32_t *, long);
|
||||
|
||||
static noinline void intsort(int *x, size_t n, size_t t) {
|
||||
static dontinline void intsort(int *x, size_t n, size_t t) {
|
||||
int a, b, c;
|
||||
size_t i, p, q;
|
||||
for (p = t; p > 0; p >>= 1) {
|
||||
|
|
|
@ -25,7 +25,7 @@ size_t strclen(const char *s) {
|
|||
return strnclen(s, -1);
|
||||
}
|
||||
|
||||
noinline size_t strnclen(const char *s, size_t n) {
|
||||
dontinline size_t strnclen(const char *s, size_t n) {
|
||||
size_t r = 0;
|
||||
if (n) {
|
||||
while (n && *s && (*s & 0300) == 0200) ++s, --n;
|
||||
|
|
|
@ -26,7 +26,7 @@ size_t strclen16(const char16_t *s) {
|
|||
return strnclen16(s, -1ull);
|
||||
}
|
||||
|
||||
noinline size_t strnclen16(const char16_t *p, size_t n) {
|
||||
dontinline size_t strnclen16(const char16_t *p, size_t n) {
|
||||
size_t l = 0;
|
||||
if (n) {
|
||||
while (*p) {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
typedef uint64_t xmm_t __attribute__((__vector_size__(16), __aligned__(1)));
|
||||
|
||||
noasan static noinline antiquity unsigned timingsafe_bcmp_sse(const char *p,
|
||||
noasan static dontinline antiquity unsigned timingsafe_bcmp_sse(const char *p,
|
||||
const char *q,
|
||||
size_t n) {
|
||||
uint64_t w;
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
#include "libc/sysv/consts/rusage.h"
|
||||
#include "libc/time/time.h"
|
||||
|
||||
static noinline long ConvertMicros(struct timeval tv) {
|
||||
static dontinline long ConvertMicros(struct timeval tv) {
|
||||
return tv.tv_sec * CLK_TCK + tv.tv_usec / (1000000 / CLK_TCK);
|
||||
}
|
||||
|
||||
static noinline long times2(struct tms *out_times, struct rusage *ru) {
|
||||
static dontinline long times2(struct tms *out_times, struct rusage *ru) {
|
||||
struct timeval tv;
|
||||
struct NtFileTime CreationTime, ExitTime, KernelTime, UserTime;
|
||||
if (!IsWindows()) {
|
||||
|
|
|
@ -119,7 +119,7 @@ forceinline uint64_t Rando(void) {
|
|||
KnuthLinearCongruentialGenerator(&g_rando) >> 32;
|
||||
}
|
||||
|
||||
noinline void RngSet(void *mem, size_t size) {
|
||||
dontinline void RngSet(void *mem, size_t size) {
|
||||
uint64_t coin;
|
||||
DCHECK(size % 8 == 0);
|
||||
for (size >>= 3; size--;) {
|
||||
|
|
|
@ -76,12 +76,12 @@ TEST(gclongjmp, test) {
|
|||
free(x);
|
||||
}
|
||||
|
||||
noinline void F1(void) {
|
||||
dontinline void F1(void) {
|
||||
/* 3x slower than F2() but sooo worth it */
|
||||
gc(malloc(16));
|
||||
}
|
||||
|
||||
noinline void F2(void) {
|
||||
dontinline void F2(void) {
|
||||
void *volatile p;
|
||||
p = malloc(16);
|
||||
free(p);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
long i, j, n;
|
||||
char *b0, *b1, *b2;
|
||||
|
||||
noinline char *PosixMemmove(char *dst, const char *src, size_t n) {
|
||||
dontinline char *PosixMemmove(char *dst, const char *src, size_t n) {
|
||||
char *tmp;
|
||||
tmp = malloc(n);
|
||||
memcpy(tmp, src, n);
|
||||
|
|
|
@ -76,7 +76,7 @@ void ctrdrbg2(void *p, size_t n) {
|
|||
mbedtls_ctr_drbg_free(&rng);
|
||||
}
|
||||
|
||||
noinline uint64_t xorshift(void) {
|
||||
dontinline uint64_t xorshift(void) {
|
||||
static uint64_t s = 88172645463325252;
|
||||
uint64_t x = s;
|
||||
x ^= x << 13;
|
||||
|
@ -85,7 +85,7 @@ noinline uint64_t xorshift(void) {
|
|||
return (s = x);
|
||||
}
|
||||
|
||||
noinline void xorshifta(char *p, size_t n) {
|
||||
dontinline void xorshifta(char *p, size_t n) {
|
||||
static uint64_t s = 88172645463325252;
|
||||
uint64_t x = s;
|
||||
while (n >= 8) {
|
||||
|
@ -103,7 +103,7 @@ noinline void xorshifta(char *p, size_t n) {
|
|||
}
|
||||
}
|
||||
|
||||
noinline uint64_t knuth(void) {
|
||||
dontinline uint64_t knuth(void) {
|
||||
uint64_t a, b;
|
||||
static uint64_t x = 1;
|
||||
x *= 6364136223846793005;
|
||||
|
@ -115,7 +115,7 @@ noinline uint64_t knuth(void) {
|
|||
return a | b << 32;
|
||||
}
|
||||
|
||||
noinline void knutha(char *p, size_t n) {
|
||||
dontinline void knutha(char *p, size_t n) {
|
||||
static uint64_t s = 1;
|
||||
uint32_t u;
|
||||
uint64_t x = s;
|
||||
|
|
|
@ -50,7 +50,7 @@ TEST(crc32c, test) {
|
|||
EXPECT_EQ(0xecc9871d, crc32c(0, kHyperion, kHyperionSize));
|
||||
}
|
||||
|
||||
noinline uint64_t fnv_hash(char *s, int len) {
|
||||
dontinline uint64_t fnv_hash(char *s, int len) {
|
||||
uint64_t hash = 0xcbf29ce484222325;
|
||||
for (int i = 0; i < len; i++) {
|
||||
hash *= 0x100000001b3;
|
||||
|
|
|
@ -496,14 +496,14 @@ TEST(wcsncmp, testTwosComplementBane) {
|
|||
│ test/libc/str/strcmp_test.c § benchmarks ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
testonly noinline int strcmp_pure(const char *a, const char *b) {
|
||||
testonly dontinline int strcmp_pure(const char *a, const char *b) {
|
||||
for (; *a == *b; a++, b++) {
|
||||
if (!*a) break;
|
||||
}
|
||||
return (*a & 0xff) - (*b & 0xff);
|
||||
}
|
||||
|
||||
testonly noinline int strcasecmp_pure(const char *a, const char *b) {
|
||||
testonly dontinline int strcasecmp_pure(const char *a, const char *b) {
|
||||
for (; *a && *b; a++, b++) {
|
||||
if (!(*a == *b || tolower(*a & 0xff) == tolower(*b & 0xff))) {
|
||||
break;
|
||||
|
|
40
third_party/chibicc/as.c
vendored
40
third_party/chibicc/as.c
vendored
|
@ -2247,7 +2247,7 @@ static void OnMovslq(struct As *a, struct Slice s) {
|
|||
EmitModrm(a, reg, modrm, disp);
|
||||
}
|
||||
|
||||
static noinline void OpAluImpl(struct As *a, struct Slice opname, int op) {
|
||||
static dontinline void OpAluImpl(struct As *a, struct Slice opname, int op) {
|
||||
int reg, modrm, imm, disp;
|
||||
if (IsPunct(a, a->i, '$')) { // imm -> reg/modrm
|
||||
++a->i;
|
||||
|
@ -2270,11 +2270,11 @@ static noinline void OpAluImpl(struct As *a, struct Slice opname, int op) {
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void OpAlu(struct As *a, struct Slice opname, int op) {
|
||||
static dontinline void OpAlu(struct As *a, struct Slice opname, int op) {
|
||||
OpAluImpl(a, opname, op);
|
||||
}
|
||||
|
||||
static noinline void OpBsuImpl(struct As *a, struct Slice opname, int op) {
|
||||
static dontinline void OpBsuImpl(struct As *a, struct Slice opname, int op) {
|
||||
int reg, modrm, imm, disp;
|
||||
if (IsPunct(a, a->i, '$')) {
|
||||
++a->i;
|
||||
|
@ -2303,11 +2303,11 @@ static noinline void OpBsuImpl(struct As *a, struct Slice opname, int op) {
|
|||
EmitExpr(a, imm, R_X86_64_8, EmitByte);
|
||||
}
|
||||
|
||||
static noinline void OpBsu(struct As *a, struct Slice opname, int op) {
|
||||
static dontinline void OpBsu(struct As *a, struct Slice opname, int op) {
|
||||
OpBsuImpl(a, opname, op);
|
||||
}
|
||||
|
||||
static noinline int OpF6Impl(struct As *a, struct Slice s, int reg) {
|
||||
static dontinline int OpF6Impl(struct As *a, struct Slice s, int reg) {
|
||||
int modrm, imm, disp;
|
||||
modrm = ParseModrm(a, &disp);
|
||||
reg |= GetOpSize(a, s, modrm, 1) << 3;
|
||||
|
@ -2315,7 +2315,7 @@ static noinline int OpF6Impl(struct As *a, struct Slice s, int reg) {
|
|||
return reg;
|
||||
}
|
||||
|
||||
static noinline int OpF6(struct As *a, struct Slice s, int reg) {
|
||||
static dontinline int OpF6(struct As *a, struct Slice s, int reg) {
|
||||
return OpF6Impl(a, s, reg);
|
||||
}
|
||||
|
||||
|
@ -2516,7 +2516,7 @@ static bool IsSsePrefix(int c) {
|
|||
return c == 0x66 || c == 0xF2 || c == 0xF3; // must come before rex
|
||||
}
|
||||
|
||||
static noinline void OpSseImpl(struct As *a, int op) {
|
||||
static dontinline void OpSseImpl(struct As *a, int op) {
|
||||
int reg, modrm, disp;
|
||||
if (IsSsePrefix((op & 0xff000000) >> 24)) {
|
||||
EmitByte(a, (op & 0xff000000) >> 24);
|
||||
|
@ -2532,11 +2532,11 @@ static noinline void OpSseImpl(struct As *a, int op) {
|
|||
EmitRexOpModrm(a, op, reg, modrm, disp, 0);
|
||||
}
|
||||
|
||||
static noinline void OpSse(struct As *a, int op) {
|
||||
static dontinline void OpSse(struct As *a, int op) {
|
||||
OpSseImpl(a, op);
|
||||
}
|
||||
|
||||
static noinline void OpSseIbImpl(struct As *a, int op) {
|
||||
static dontinline void OpSseIbImpl(struct As *a, int op) {
|
||||
int imm;
|
||||
ConsumePunct(a, '$');
|
||||
imm = Parse(a);
|
||||
|
@ -2545,7 +2545,7 @@ static noinline void OpSseIbImpl(struct As *a, int op) {
|
|||
EmitExpr(a, imm, R_X86_64_8, EmitByte);
|
||||
}
|
||||
|
||||
static noinline void OpSseIb(struct As *a, int op) {
|
||||
static dontinline void OpSseIb(struct As *a, int op) {
|
||||
OpSseIbImpl(a, op);
|
||||
}
|
||||
|
||||
|
@ -2611,7 +2611,7 @@ static void OnRet(struct As *a, struct Slice s) {
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void OpCmovccImpl(struct As *a, int cc) {
|
||||
static dontinline void OpCmovccImpl(struct As *a, int cc) {
|
||||
int reg, modrm, disp;
|
||||
modrm = ParseModrm(a, &disp);
|
||||
ConsumeComma(a);
|
||||
|
@ -2619,17 +2619,17 @@ static noinline void OpCmovccImpl(struct As *a, int cc) {
|
|||
EmitRexOpModrm(a, 0x0F40 | cc, reg, modrm, disp, 0);
|
||||
}
|
||||
|
||||
static noinline void OpCmovcc(struct As *a, int cc) {
|
||||
static dontinline void OpCmovcc(struct As *a, int cc) {
|
||||
OpCmovccImpl(a, cc);
|
||||
}
|
||||
|
||||
static noinline void OpSetccImpl(struct As *a, int cc) {
|
||||
static dontinline void OpSetccImpl(struct As *a, int cc) {
|
||||
int modrm, disp;
|
||||
modrm = ParseModrm(a, &disp);
|
||||
EmitRexOpModrm(a, 0x0F90 | cc, 6, modrm, disp, 0);
|
||||
}
|
||||
|
||||
static noinline void OpSetcc(struct As *a, int cc) {
|
||||
static dontinline void OpSetcc(struct As *a, int cc) {
|
||||
OpSetccImpl(a, cc);
|
||||
}
|
||||
|
||||
|
@ -2662,7 +2662,7 @@ static void OnCall(struct As *a, struct Slice s) {
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void OpJmpImpl(struct As *a, int cc) {
|
||||
static dontinline void OpJmpImpl(struct As *a, int cc) {
|
||||
int modrm, disp;
|
||||
if (IsPunct(a, a->i, '*')) ++a->i;
|
||||
modrm = RemoveRexw(ParseModrm(a, &disp));
|
||||
|
@ -2682,17 +2682,17 @@ static noinline void OpJmpImpl(struct As *a, int cc) {
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void OpJmp(struct As *a, int cc) {
|
||||
static dontinline void OpJmp(struct As *a, int cc) {
|
||||
OpJmpImpl(a, cc);
|
||||
}
|
||||
|
||||
static noinline void OpFpu1Impl(struct As *a, int op, int reg) {
|
||||
static dontinline void OpFpu1Impl(struct As *a, int op, int reg) {
|
||||
int modrm, disp;
|
||||
modrm = ParseModrm(a, &disp);
|
||||
EmitRexOpModrm(a, op, reg, modrm, disp, 0);
|
||||
}
|
||||
|
||||
static noinline void OpFpu1(struct As *a, int op, int reg) {
|
||||
static dontinline void OpFpu1(struct As *a, int op, int reg) {
|
||||
OpFpu1Impl(a, op, reg);
|
||||
}
|
||||
|
||||
|
@ -2711,7 +2711,7 @@ static void OnBswap(struct As *a, struct Slice s) {
|
|||
EmitByte(a, 0310 | srm & 7);
|
||||
}
|
||||
|
||||
static noinline void OpFcomImpl(struct As *a, int op) {
|
||||
static dontinline void OpFcomImpl(struct As *a, int op) {
|
||||
int rm;
|
||||
if (IsSemicolon(a)) {
|
||||
rm = 1;
|
||||
|
@ -2727,7 +2727,7 @@ static noinline void OpFcomImpl(struct As *a, int op) {
|
|||
EmitVarword(a, op | rm & 7);
|
||||
}
|
||||
|
||||
static noinline void OpFcom(struct As *a, int op) {
|
||||
static dontinline void OpFcom(struct As *a, int op) {
|
||||
OpFcomImpl(a, op);
|
||||
}
|
||||
|
||||
|
|
2
third_party/chibicc/tokenize.c
vendored
2
third_party/chibicc/tokenize.c
vendored
|
@ -120,7 +120,7 @@ static Token *new_token(TokenKind kind, char *start, char *end) {
|
|||
|
||||
// Read an identifier and returns the length of it.
|
||||
// If p does not point to a valid identifier, 0 is returned.
|
||||
noinline int read_ident(char *start) {
|
||||
dontinline int read_ident(char *start) {
|
||||
uint32_t c;
|
||||
char *p = start;
|
||||
if (('a' <= *p && *p <= 'z') || ('A' <= *p && *p <= 'Z') || *p == '_') {
|
||||
|
|
2
third_party/dlmalloc/dlmalloc.c
vendored
2
third_party/dlmalloc/dlmalloc.c
vendored
|
@ -166,7 +166,7 @@ static void dlmalloc_add_segment(struct MallocState *m, char *tbase,
|
|||
/* ─────────────────────────── system integration ─────────────────────────── */
|
||||
|
||||
/* Return true if segment contains a segment link */
|
||||
noinline int has_segment_link(struct MallocState *m, msegmentptr ss) {
|
||||
dontinline int has_segment_link(struct MallocState *m, msegmentptr ss) {
|
||||
msegmentptr sp;
|
||||
assert(m);
|
||||
sp = &m->seg;
|
||||
|
|
2
third_party/mbedtls/aes.c
vendored
2
third_party/mbedtls/aes.c
vendored
|
@ -368,7 +368,7 @@ static uint32_t RCON[10];
|
|||
|
||||
static int aes_init_done;
|
||||
|
||||
static noinline void aes_gen_tables( void )
|
||||
static dontinline void aes_gen_tables( void )
|
||||
{
|
||||
int i, x, y, z;
|
||||
int pow[256];
|
||||
|
|
2
third_party/mbedtls/ecp.c
vendored
2
third_party/mbedtls/ecp.c
vendored
|
@ -3128,7 +3128,7 @@ int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp,
|
|||
* private key for the given curve.
|
||||
* \return Another negative error code on other kinds of failure.
|
||||
*/
|
||||
noinline int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp,
|
||||
dontinline int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp,
|
||||
const mbedtls_mpi *d )
|
||||
{
|
||||
ECP_VALIDATE_RET( grp );
|
||||
|
|
2
third_party/mbedtls/test/lib.c
vendored
2
third_party/mbedtls/test/lib.c
vendored
|
@ -794,7 +794,7 @@ static int convert_params(size_t cnt, char **params, int *int_params_store) {
|
|||
*
|
||||
* \return 0 for success else 1
|
||||
*/
|
||||
static noinline int test_snprintf(size_t n, const char *ref_buf, int ref_ret) {
|
||||
static dontinline int test_snprintf(size_t n, const char *ref_buf, int ref_ret) {
|
||||
int ret;
|
||||
char buf[10] = "xxxxxxxxx";
|
||||
const char ref[10] = "xxxxxxxxx";
|
||||
|
|
2
third_party/python/Objects/abstract.c
vendored
2
third_party/python/Objects/abstract.c
vendored
|
@ -2280,7 +2280,7 @@ PyObject_Call(PyObject *callable, PyObject *args, PyObject *kwargs)
|
|||
|
||||
/* Issue #29234: Inlining _PyStack_AsTuple() into callers increases their
|
||||
stack consumption, Disable inlining to optimize the stack consumption. */
|
||||
PyObject* noinline
|
||||
PyObject* dontinline
|
||||
_PyStack_AsTuple(PyObject **stack, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *args;
|
||||
|
|
2
third_party/python/Python/ceval.c
vendored
2
third_party/python/Python/ceval.c
vendored
|
@ -4210,7 +4210,7 @@ restore_and_clear_exc_state(PyThreadState *tstate, PyFrameObject *f)
|
|||
|
||||
/* Logic for the raise statement (too complicated for inlining).
|
||||
This *consumes* a reference count to each of its arguments. */
|
||||
static noinline int
|
||||
static dontinline int
|
||||
do_raise(PyObject *exc, PyObject *cause)
|
||||
{
|
||||
PyObject *type = NULL, *value = NULL;
|
||||
|
|
22
third_party/quickjs/libbf.c
vendored
22
third_party/quickjs/libbf.c
vendored
|
@ -85,7 +85,7 @@ typedef int bf_op2_func_t(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,
|
|||
#define FFT_MUL_R_OVERLAP_B (1 << 1)
|
||||
#define FFT_MUL_R_NORESIZE (1 << 2)
|
||||
|
||||
static noinline int fft_mul(bf_context_t *s,
|
||||
static dontinline int fft_mul(bf_context_t *s,
|
||||
bf_t *res, limb_t *a_tab, limb_t a_len,
|
||||
limb_t *b_tab, limb_t b_len, int mul_flags);
|
||||
static void fft_clear_cache(bf_context_t *s);
|
||||
|
@ -2192,7 +2192,7 @@ int bf_sqrt(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags)
|
|||
return BF_ST_MEM_ERROR;
|
||||
}
|
||||
|
||||
static noinline int bf_op2(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,
|
||||
static dontinline int bf_op2(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,
|
||||
bf_flags_t flags, bf_op2_func_t *func)
|
||||
{
|
||||
bf_t tmp;
|
||||
|
@ -7570,7 +7570,7 @@ static void ntt_free(BFNTTState *s, void *ptr)
|
|||
bf_aligned_free(s->ctx, ptr);
|
||||
}
|
||||
|
||||
static noinline int ntt_fft(BFNTTState *s,
|
||||
static dontinline int ntt_fft(BFNTTState *s,
|
||||
NTTLimb *out_buf, NTTLimb *in_buf,
|
||||
NTTLimb *tmp_buf, int fft_len_log2,
|
||||
int inverse, int m_idx)
|
||||
|
@ -7703,7 +7703,7 @@ static void ntt_vec_mul(BFNTTState *s,
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void mul_trig(NTTLimb *buf,
|
||||
static dontinline void mul_trig(NTTLimb *buf,
|
||||
limb_t n, limb_t c1, limb_t m, limb_t m_inv1)
|
||||
{
|
||||
limb_t i, c2, c3, c4;
|
||||
|
@ -7751,7 +7751,7 @@ static inline NTTLimb int_to_ntt_limb(slimb_t a, limb_t m)
|
|||
return a;
|
||||
}
|
||||
|
||||
static noinline int ntt_fft(BFNTTState *s, NTTLimb *out_buf, NTTLimb *in_buf,
|
||||
static dontinline int ntt_fft(BFNTTState *s, NTTLimb *out_buf, NTTLimb *in_buf,
|
||||
NTTLimb *tmp_buf, int fft_len_log2,
|
||||
int inverse, int m_idx)
|
||||
{
|
||||
|
@ -7833,7 +7833,7 @@ static void ntt_vec_mul(BFNTTState *s,
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void mul_trig(NTTLimb *buf,
|
||||
static dontinline void mul_trig(NTTLimb *buf,
|
||||
limb_t n, limb_t c_mul, limb_t m, limb_t m_inv)
|
||||
{
|
||||
limb_t i, c0, c_mul_inv;
|
||||
|
@ -7848,7 +7848,7 @@ static noinline void mul_trig(NTTLimb *buf,
|
|||
|
||||
#endif /* !AVX2 */
|
||||
|
||||
static noinline NTTLimb *get_trig(BFNTTState *s,
|
||||
static dontinline NTTLimb *get_trig(BFNTTState *s,
|
||||
int k, int inverse, int m_idx)
|
||||
{
|
||||
NTTLimb *tab;
|
||||
|
@ -8003,7 +8003,7 @@ static int ntt_conv(BFNTTState *s, NTTLimb *buf1, NTTLimb *buf2,
|
|||
}
|
||||
|
||||
|
||||
static noinline void limb_to_ntt(BFNTTState *s,
|
||||
static dontinline void limb_to_ntt(BFNTTState *s,
|
||||
NTTLimb *tabr, limb_t fft_len,
|
||||
const limb_t *taba, limb_t a_len, int dpl,
|
||||
int first_m_idx, int nb_mods)
|
||||
|
@ -8072,7 +8072,7 @@ typedef union {
|
|||
double d[4];
|
||||
} VecUnion;
|
||||
|
||||
static noinline void ntt_to_limb(BFNTTState *s, limb_t *tabr, limb_t r_len,
|
||||
static dontinline void ntt_to_limb(BFNTTState *s, limb_t *tabr, limb_t r_len,
|
||||
const NTTLimb *buf, int fft_len_log2, int dpl,
|
||||
int nb_mods)
|
||||
{
|
||||
|
@ -8176,7 +8176,7 @@ static noinline void ntt_to_limb(BFNTTState *s, limb_t *tabr, limb_t r_len,
|
|||
}
|
||||
}
|
||||
#else
|
||||
static noinline void ntt_to_limb(BFNTTState *s, limb_t *tabr, limb_t r_len,
|
||||
static dontinline void ntt_to_limb(BFNTTState *s, limb_t *tabr, limb_t r_len,
|
||||
const NTTLimb *buf, int fft_len_log2, int dpl,
|
||||
int nb_mods)
|
||||
{
|
||||
|
@ -8389,7 +8389,7 @@ int bf_get_fft_size(int *pdpl, int *pnb_mods, limb_t len)
|
|||
}
|
||||
|
||||
/* return 0 if OK, -1 if memory error */
|
||||
static noinline int fft_mul(bf_context_t *s1,
|
||||
static dontinline int fft_mul(bf_context_t *s1,
|
||||
bf_t *res, limb_t *a_tab, limb_t a_len,
|
||||
limb_t *b_tab, limb_t b_len, int mul_flags)
|
||||
{
|
||||
|
|
2
third_party/quickjs/quickjs.c
vendored
2
third_party/quickjs/quickjs.c
vendored
|
@ -3543,7 +3543,7 @@ JSProperty *add_property(JSContext *ctx, JSObject *p, JSAtom prop, int prop_flag
|
|||
|
||||
/* can be called on Array or Arguments objects. return < 0 if
|
||||
memory alloc error. */
|
||||
static noinline __exception int convert_fast_array_to_array(JSContext *ctx,
|
||||
static dontinline __exception int convert_fast_array_to_array(JSContext *ctx,
|
||||
JSObject *p)
|
||||
{
|
||||
JSProperty *pr;
|
||||
|
|
8
third_party/stb/stb_image.c
vendored
8
third_party/stb/stb_image.c
vendored
|
@ -2112,7 +2112,7 @@ static unsigned char *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y,
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void *stbi__jpeg_load(stbi__context *s, int *x, int *y,
|
||||
static dontinline void *stbi__jpeg_load(stbi__context *s, int *x, int *y,
|
||||
int *comp, int req_comp,
|
||||
stbi__result_info *ri) {
|
||||
unsigned char *result;
|
||||
|
@ -3413,7 +3413,7 @@ static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp,
|
|||
return result;
|
||||
}
|
||||
|
||||
static noinline void *stbi__png_load(stbi__context *s, int *x, int *y,
|
||||
static dontinline void *stbi__png_load(stbi__context *s, int *x, int *y,
|
||||
int *comp, int req_comp,
|
||||
stbi__result_info *ri) {
|
||||
stbi__png p;
|
||||
|
@ -3916,7 +3916,7 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void *stbi__gif_load(stbi__context *s, int *x, int *y,
|
||||
static dontinline void *stbi__gif_load(stbi__context *s, int *x, int *y,
|
||||
int *comp, int req_comp,
|
||||
stbi__result_info *ri) {
|
||||
unsigned char *u = 0;
|
||||
|
@ -3969,7 +3969,7 @@ static int stbi__pnm_test(stbi__context *s) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static noinline void *stbi__pnm_load(stbi__context *s, int *x, int *y,
|
||||
static dontinline void *stbi__pnm_load(stbi__context *s, int *x, int *y,
|
||||
int *comp, int req_comp,
|
||||
stbi__result_info *ri) {
|
||||
unsigned char *out;
|
||||
|
|
12
third_party/stb/stb_vorbis.c
vendored
12
third_party/stb/stb_vorbis.c
vendored
|
@ -480,7 +480,7 @@ static int error(vorb *f, enum STBVorbisError e) {
|
|||
|
||||
// given a sufficiently large block of memory, make an array of pointers to
|
||||
// subblocks of it
|
||||
static noinline void *make_block_array(void *mem, int count, int size) {
|
||||
static dontinline void *make_block_array(void *mem, int count, int size) {
|
||||
int i;
|
||||
void **p = (void **)mem;
|
||||
char *q = (char *)(p + count);
|
||||
|
@ -491,7 +491,7 @@ static noinline void *make_block_array(void *mem, int count, int size) {
|
|||
return p;
|
||||
}
|
||||
|
||||
static noinline void *setup_malloc(vorb *f, int sz) {
|
||||
static dontinline void *setup_malloc(vorb *f, int sz) {
|
||||
sz = (sz + 3) & ~3;
|
||||
f->setup_memory_required += sz;
|
||||
if (f->alloc.alloc_buffer) {
|
||||
|
@ -503,12 +503,12 @@ static noinline void *setup_malloc(vorb *f, int sz) {
|
|||
return sz ? malloc(sz) : NULL;
|
||||
}
|
||||
|
||||
static noinline void setup_free(vorb *f, void *p) {
|
||||
static dontinline void setup_free(vorb *f, void *p) {
|
||||
if (f->alloc.alloc_buffer) return; // do nothing; setup mem is a stack
|
||||
free(p);
|
||||
}
|
||||
|
||||
static noinline void *setup_temp_malloc(vorb *f, int sz) {
|
||||
static dontinline void *setup_temp_malloc(vorb *f, int sz) {
|
||||
sz = (sz + 3) & ~3;
|
||||
if (f->alloc.alloc_buffer) {
|
||||
if (f->temp_offset - sz < f->setup_offset) return NULL;
|
||||
|
@ -518,7 +518,7 @@ static noinline void *setup_temp_malloc(vorb *f, int sz) {
|
|||
return malloc(sz);
|
||||
}
|
||||
|
||||
static noinline void setup_temp_free(vorb *f, void *p, int sz) {
|
||||
static dontinline void setup_temp_free(vorb *f, void *p, int sz) {
|
||||
if (f->alloc.alloc_buffer) {
|
||||
f->temp_offset += (sz + 3) & ~3;
|
||||
return;
|
||||
|
@ -551,7 +551,7 @@ static float square(float x) {
|
|||
// log2(4) = 3 as required by the specification. fast(?) implementation from
|
||||
// stb.h
|
||||
// @OPTIMIZE: called multiple times per-packet with "constants"; move to setup
|
||||
static noinline int ilog(int32 n) {
|
||||
static dontinline int ilog(int32 n) {
|
||||
static signed char log2_4[16] = {0, 1, 2, 2, 3, 3, 3, 3,
|
||||
4, 4, 4, 4, 4, 4, 4, 4};
|
||||
if (n < 0) return 0; // signed n returns 0
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
|
||||
noinline bool IsPrime(int i) {
|
||||
dontinline bool IsPrime(int i) {
|
||||
int j, n;
|
||||
for (j = 3, n = VEIL("r", 3); j <= n; j += 2) {
|
||||
if (VEIL("r", i) % VEIL("r", j) == 0) {
|
||||
|
|
|
@ -318,7 +318,7 @@ static char *DisRegMem(struct Dis *d, uint32_t rde, char *p,
|
|||
}
|
||||
}
|
||||
|
||||
static noinline char *DisE(struct Dis *d, uint32_t rde, char *p,
|
||||
static dontinline char *DisE(struct Dis *d, uint32_t rde, char *p,
|
||||
char *f(struct Dis *, uint32_t, char *, bool, int)) {
|
||||
if (IsModrmRegister(rde)) {
|
||||
return f(d, rde, p, Rexb(rde), ModrmRm(rde));
|
||||
|
|
|
@ -53,7 +53,7 @@ static void DecodeInstruction(struct Machine *m, uint8_t *p, unsigned n) {
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void LoadInstructionSlow(struct Machine *m, uint64_t ip) {
|
||||
static dontinline void LoadInstructionSlow(struct Machine *m, uint64_t ip) {
|
||||
unsigned i;
|
||||
uint8_t *addr;
|
||||
uint8_t copy[15], *toil;
|
||||
|
|
|
@ -88,7 +88,7 @@ Keywords={
|
|||
"forcealignargpointer",
|
||||
"textexit",
|
||||
"externinline",
|
||||
"noinline",
|
||||
"dontinline",
|
||||
"noclone",
|
||||
"donothing",
|
||||
"printfesque",
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
"forcealignargpointer"
|
||||
"textexit"
|
||||
"externinline"
|
||||
"noinline"
|
||||
"dontinline"
|
||||
"noclone"
|
||||
"donothing"
|
||||
"printfesque"
|
||||
|
|
|
@ -346,7 +346,7 @@ cosmo_kws = frozenset([
|
|||
"nocallback",
|
||||
"nodebuginfo",
|
||||
"nodiscard",
|
||||
"noinline",
|
||||
"dontinline",
|
||||
"noinstrument",
|
||||
"nointerpose",
|
||||
"nooptimize",
|
||||
|
@ -409,7 +409,7 @@ cosmo_kws = frozenset([
|
|||
"nocallback",
|
||||
"nodebuginfo",
|
||||
"nodiscard",
|
||||
"noinline",
|
||||
"dontinline",
|
||||
"noinstrument",
|
||||
"nointerpose",
|
||||
"nooptimize",
|
||||
|
|
|
@ -4536,7 +4536,7 @@ static int LuaIsAcceptablePort(lua_State *L) {
|
|||
return LuaIsValid(L, IsAcceptablePort);
|
||||
}
|
||||
|
||||
static noinline int LuaCoderImpl(lua_State *L,
|
||||
static dontinline int LuaCoderImpl(lua_State *L,
|
||||
char *C(const char *, size_t, size_t *)) {
|
||||
void *p;
|
||||
size_t n;
|
||||
|
@ -4547,7 +4547,7 @@ static noinline int LuaCoderImpl(lua_State *L,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static noinline int LuaCoder(lua_State *L,
|
||||
static dontinline int LuaCoder(lua_State *L,
|
||||
char *C(const char *, size_t, size_t *)) {
|
||||
return LuaCoderImpl(L, C);
|
||||
}
|
||||
|
@ -4612,7 +4612,7 @@ static int LuaVisualizeControlCodes(lua_State *L) {
|
|||
return LuaCoder(L, VisualizeControlCodes);
|
||||
}
|
||||
|
||||
static noinline int LuaHasherImpl(lua_State *L, size_t k,
|
||||
static dontinline int LuaHasherImpl(lua_State *L, size_t k,
|
||||
int H(const void *, size_t, uint8_t *)) {
|
||||
void *p;
|
||||
size_t n;
|
||||
|
@ -4624,7 +4624,7 @@ static noinline int LuaHasherImpl(lua_State *L, size_t k,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static noinline int LuaHasher(lua_State *L, size_t k,
|
||||
static dontinline int LuaHasher(lua_State *L, size_t k,
|
||||
int H(const void *, size_t, uint8_t *)) {
|
||||
return LuaHasherImpl(L, k, H);
|
||||
}
|
||||
|
@ -4774,7 +4774,7 @@ static int LuaCrc32c(lua_State *L) {
|
|||
return LuaHash(L, crc32c);
|
||||
}
|
||||
|
||||
static noinline int LuaProgramInt(lua_State *L, void P(long)) {
|
||||
static dontinline int LuaProgramInt(lua_State *L, void P(long)) {
|
||||
P(luaL_checkinteger(L, 1));
|
||||
return 0;
|
||||
}
|
||||
|
@ -4809,7 +4809,7 @@ static int LuaProgramSslTicketLifetime(lua_State *L) {
|
|||
return LuaProgramInt(L, ProgramSslTicketLifetime);
|
||||
}
|
||||
|
||||
static noinline int LuaProgramString(lua_State *L, void P(const char *)) {
|
||||
static dontinline int LuaProgramString(lua_State *L, void P(const char *)) {
|
||||
P(luaL_checkstring(L, 1));
|
||||
return 0;
|
||||
}
|
||||
|
@ -4920,7 +4920,7 @@ static int LuaProgramRedirect(lua_State *L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static noinline int LuaProgramBool(lua_State *L, bool *b) {
|
||||
static dontinline int LuaProgramBool(lua_State *L, bool *b) {
|
||||
*b = lua_toboolean(L, 1);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ static void float2rgb(unsigned n, unsigned char *u, float *f) {
|
|||
* This makes subtraction look good by flattening out the bias curve
|
||||
* that PC display manufacturers like to use.
|
||||
*/
|
||||
static noinline void rgb2lin(unsigned n, float *f, const unsigned char *u) {
|
||||
static dontinline void rgb2lin(unsigned n, float *f, const unsigned char *u) {
|
||||
unsigned i;
|
||||
rgb2float(n, f, u);
|
||||
for (i = 0; i < n; ++i) f[i] = frgb2lin(f[i]);
|
||||
|
@ -194,7 +194,7 @@ static noinline void rgb2lin(unsigned n, float *f, const unsigned char *u) {
|
|||
/**
|
||||
* Converts linear RGB to standard RGB.
|
||||
*/
|
||||
static noinline void rgb2std(unsigned n, unsigned char *u, float *f) {
|
||||
static dontinline void rgb2std(unsigned n, unsigned char *u, float *f) {
|
||||
unsigned i;
|
||||
for (i = 0; i < n; ++i) f[i] = frgb2std(f[i]);
|
||||
float2rgb(n, u, f);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "libc/x/x.h"
|
||||
#include "tool/viz/lib/stringbuilder.h"
|
||||
|
||||
static noinline void StringBuilderGrow(size_t need, struct StringBuilder *sb) {
|
||||
static dontinline void StringBuilderGrow(size_t need, struct StringBuilder *sb) {
|
||||
size_t n2;
|
||||
n2 = MAX(16, sb->n);
|
||||
while (sb->i + need > n2) n2 += n2 >> 1;
|
||||
|
|
|
@ -464,7 +464,7 @@ static unsigned char Opacify2(unsigned yw, unsigned xw,
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void PrintImage2(unsigned yw, unsigned xw,
|
||||
static dontinline void PrintImage2(unsigned yw, unsigned xw,
|
||||
unsigned char img[4][yw][xw], unsigned yn,
|
||||
unsigned xn) {
|
||||
bool didhalfy;
|
||||
|
@ -500,7 +500,7 @@ static noinline void PrintImage2(unsigned yw, unsigned xw,
|
|||
printf("\e[0m\n");
|
||||
}
|
||||
|
||||
static noinline void *DeblinterlaceRgba2(unsigned yn, unsigned xn,
|
||||
static dontinline void *DeblinterlaceRgba2(unsigned yn, unsigned xn,
|
||||
unsigned char D[4][yn][xn],
|
||||
const unsigned char S[yn][xn][4]) {
|
||||
unsigned y, x;
|
||||
|
@ -587,7 +587,7 @@ void ProcessImageMagikarp(unsigned yn, unsigned xn,
|
|||
yn, xn, lround(r_));
|
||||
}
|
||||
|
||||
noinline void WithImageFile(const char *path,
|
||||
dontinline void WithImageFile(const char *path,
|
||||
void fn(unsigned yn, unsigned xn,
|
||||
unsigned char img[yn][xn][4])) {
|
||||
struct stat st;
|
||||
|
|
Loading…
Add table
Reference in a new issue