mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
fa20edc44d
- Remove most __ASSEMBLER__ __LINKER__ ifdefs - Rename libc/intrin/bits.h to libc/serialize.h - Block pthread cancelation in fchmodat() polyfill - Remove `clang-format off` statements in third_party
18 lines
642 B
C
18 lines
642 B
C
#ifndef COSMOPOLITAN_LIBC_NEXGEN32E_TRAMPOLINE_H_
|
|
#define COSMOPOLITAN_LIBC_NEXGEN32E_TRAMPOLINE_H_
|
|
|
|
#define TRAMPOLINE(FUNCTION, THUNK) \
|
|
({ \
|
|
typeof(FUNCTION) *Tramp; \
|
|
asm(".section .text.trampoline\n" \
|
|
"183:\n\t" \
|
|
"mov\t%1,%%eax\n\t" \
|
|
"jmp\t" #THUNK "\n\t" \
|
|
".previous\n\t" \
|
|
"mov\t$183b,%k0" \
|
|
: "=r"(Tramp) \
|
|
: "i"(FUNCTION)); \
|
|
Tramp; \
|
|
})
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_NEXGEN32E_TRAMPOLINE_H_ */
|