mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Reduce header complexity
- 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
This commit is contained in:
parent
96f979dfc5
commit
fa20edc44d
3057 changed files with 410 additions and 4398 deletions
2
third_party/xed/avx512.h
vendored
2
third_party/xed/avx512.h
vendored
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_XED_AVX512_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_XED_AVX512_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
union XedAvx512Payload1 {
|
||||
|
@ -40,5 +39,4 @@ union XedAvx512Payload3 {
|
|||
};
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_XED_AVX512_H_ */
|
||||
|
|
2
third_party/xed/private.h
vendored
2
third_party/xed/private.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_XED_PRIVATE_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_XED_PRIVATE_H_
|
||||
#include "third_party/xed/x86.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
typedef int xed_int_t;
|
||||
|
@ -12,5 +11,4 @@ typedef intptr_t xed_addr_t;
|
|||
typedef bool xed_bool_t;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_XED_PRIVATE_H_ */
|
||||
|
|
2
third_party/xed/x86.h
vendored
2
third_party/xed/x86.h
vendored
|
@ -42,7 +42,6 @@
|
|||
#define xed_sib_scale(M) (((M)&0xff) >> 6)
|
||||
#define xed_get_modrm_reg_field(M) (((M)&0x38) >> 3)
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define XED_MACHINE_MODE_REAL XED_MODE_REAL
|
||||
|
@ -246,5 +245,4 @@ int xed_instruction_length_decode(struct XedDecodedInst *, const void *,
|
|||
size_t);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_XED_X86_H_ */
|
||||
|
|
4
third_party/xed/x86features.c
vendored
4
third_party/xed/x86features.c
vendored
|
@ -36,7 +36,7 @@ asm(".include \"libc/disclaimer.inc\"");
|
|||
* example, 0x2800000ul was calculated as: 1UL<<(XED_ISA_SET_I86-64) |
|
||||
* 1UL<<(XED_ISA_SET_LAHF-64).
|
||||
*/
|
||||
const uint64_t kXedChipFeatures[XED_CHIP_LAST][3] /* clang-format off */ = {
|
||||
const uint64_t kXedChipFeatures[XED_CHIP_LAST][3] = {
|
||||
{0, 0, 0, },
|
||||
{0, 0x02800000, 0, }, /*I86*/
|
||||
{0, 0x02800000, 0x02000}, /*I86FP*/
|
||||
|
@ -89,4 +89,4 @@ const uint64_t kXedChipFeatures[XED_CHIP_LAST][3] /* clang-format off */ = {
|
|||
{0xfffffffc3f3fffec, 0xffffebff5fffdfb9, 0x7b79e}, /*ICEL..SERVER*/
|
||||
{0xfffffffc3f3fffec, 0xffdffbf75fffdfbb, 0x7a79e}, /*FUTURE*/
|
||||
{0xfffffffffffffffe, 0xffffffffffffffff, 0x7ffff} /*ALL*/
|
||||
} /* clang-format on */;
|
||||
};
|
||||
|
|
2
third_party/xed/x86ild.greg.c
vendored
2
third_party/xed/x86ild.greg.c
vendored
|
@ -18,7 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/serialize.h"
|
||||
#include "libc/intrin/bsr.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
2
third_party/xed/x86isa.h
vendored
2
third_party/xed/x86isa.h
vendored
|
@ -1,7 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_XED_X86ISA_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_XED_X86ISA_H_
|
||||
#include "third_party/xed/x86.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define XED_CHIP_INVALID 1
|
||||
|
@ -257,5 +256,4 @@ void xed_get_chip_features(struct XedChipFeatures *, int);
|
|||
bool xed_isa_set_is_valid_for_chip(int, int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_THIRD_PARTY_XED_X86ISA_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue