2020-06-15 14:18:57 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_STR_TPENC_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_STR_TPENC_H_
|
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
2022-09-13 06:10:38 +00:00
|
|
|
uint64_t _tpenc(int32_t) pureconst;
|
2020-06-15 14:18:57 +00:00
|
|
|
|
2021-10-15 02:36:49 +00:00
|
|
|
#if defined(__MNO_RED_ZONE__) && defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
2022-09-13 06:10:38 +00:00
|
|
|
#define _tpenc(CODE) \
|
2021-02-03 04:21:06 +00:00
|
|
|
({ \
|
|
|
|
long Edi, Buf; \
|
2022-09-13 06:10:38 +00:00
|
|
|
asm("call\t_tpenc" \
|
2021-02-03 04:21:06 +00:00
|
|
|
: "=a"(Buf), "=D"(Edi) \
|
2021-05-01 12:11:35 +00:00
|
|
|
: "1"((int)(CODE)) \
|
2021-02-03 04:21:06 +00:00
|
|
|
: "rcx", "rdx", "cc"); \
|
|
|
|
Buf; \
|
2020-06-15 14:18:57 +00:00
|
|
|
})
|
2020-06-16 02:01:28 +00:00
|
|
|
#endif
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_STR_TPENC_H_ */
|