mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Add scouts honor escape hatch for source embedding
This commit is contained in:
parent
c91b3c5006
commit
b4269930f7
547 changed files with 1516 additions and 944 deletions
|
@ -4,19 +4,20 @@
|
|||
COSMOPOLITAN_C_START_
|
||||
|
||||
uint64_t tpenc(int32_t) pureconst;
|
||||
uint64_t tpenc2(int32_t) pureconst;
|
||||
|
||||
#define tpenc(CODE) \
|
||||
({ \
|
||||
unsigned long Buf; \
|
||||
int Di, Code = (CODE); \
|
||||
if (0 <= Code && Code <= 127) { \
|
||||
Buf = Code; \
|
||||
} else { \
|
||||
asm("call\ttpenc" : "=a"(Buf), "=D"(Di) : "1"(CODE) : "cc"); \
|
||||
} \
|
||||
Buf; \
|
||||
#ifndef __STRICT_ANSI__
|
||||
#define tpenc(CODE) \
|
||||
({ \
|
||||
long Buf; \
|
||||
int32_t Code = (CODE); \
|
||||
if (0 <= Code && Code <= 127) { \
|
||||
Buf = Code; \
|
||||
} else { \
|
||||
asm("call\ttpenc" : "=a"(Buf), "+D"(Code) : /* inputs */ : "cc"); \
|
||||
} \
|
||||
Buf; \
|
||||
})
|
||||
#endif
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue