mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
feat: init 16-bit x86 support in zig.h
This commit is contained in:
parent
55c0693c4a
commit
9d3bd3c502
1 changed files with 6 additions and 1 deletions
|
|
@ -74,6 +74,9 @@
|
|||
#elif defined (__x86_64__) || (defined(zig_msvc) && defined(_M_X64))
|
||||
#define zig_x86_64
|
||||
#define zig_x86
|
||||
#elif defined(__I86__)
|
||||
#define zig_x86_16
|
||||
#define zig_x86
|
||||
#endif
|
||||
|
||||
#if defined(zig_msvc) || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
|
|
@ -400,6 +403,8 @@
|
|||
#define zig_trap() __asm__ volatile("j 0x2")
|
||||
#elif defined(zig_sparc)
|
||||
#define zig_trap() __asm__ volatile("illtrap")
|
||||
#elif defined(zig_x86_16)
|
||||
#define zig_trap() __asm__ volatile("int $0x3")
|
||||
#elif defined(zig_x86)
|
||||
#define zig_trap() __asm__ volatile("ud2")
|
||||
#else
|
||||
|
|
@ -4219,7 +4224,7 @@ static inline void zig_loongarch_cpucfg(uint32_t word, uint32_t* result) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#elif defined(zig_x86)
|
||||
#elif defined(zig_x86) && !defined(zig_x86_16)
|
||||
|
||||
static inline void zig_x86_cpuid(uint32_t leaf_id, uint32_t subid, uint32_t* eax, uint32_t* ebx, uint32_t* ecx, uint32_t* edx) {
|
||||
#if defined(zig_msvc)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue