mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Add minor improvements and cleanup
This commit is contained in:
parent
9e3e985ae5
commit
feed0d2b0e
163 changed files with 2286 additions and 2245 deletions
|
@ -26,27 +26,12 @@
|
|||
|
||||
hidden extern const uint32_t kSha256Tab[64];
|
||||
|
||||
extern const struct TpEncode {
|
||||
uint8_t mark;
|
||||
uint8_t len;
|
||||
} kTpDecoderRing[32];
|
||||
|
||||
forceinline struct TpEncode UseTpDecoderRing(wint_t c) {
|
||||
unsigned msb;
|
||||
if (c) {
|
||||
asm("bsr\t%1,%0" : "=r"(msb) : "rm"(c) : "cc");
|
||||
} else {
|
||||
msb = 0;
|
||||
}
|
||||
return kTpDecoderRing[msb];
|
||||
}
|
||||
|
||||
nodebuginfo forceinline bool32 ismoar(wint_t c) {
|
||||
return (c & 0b11000000) == 0b11000000;
|
||||
return (c & 0300) == 0300;
|
||||
}
|
||||
|
||||
nodebuginfo forceinline bool32 iscont(wint_t c) {
|
||||
return (c & 0b11000000) == 0b10000000;
|
||||
return (c & 0300) == 0200;
|
||||
}
|
||||
|
||||
char *strstr$sse42(const char *, const char *) strlenesque hidden;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue