Get codebase completely working with LLVM

You can now build Cosmopolitan with Clang:

    make -j8 MODE=llvm
    o/llvm/examples/hello.com

The assembler and linker code is now friendly to LLVM too.
So it's not needed to configure Clang to use binutils under
the hood. If you love LLVM then you can now use pure LLVM.
This commit is contained in:
Justine Tunney 2021-02-08 09:19:00 -08:00
parent 0e36cb3ac4
commit e75ffde09e
4528 changed files with 7776 additions and 11640 deletions

View file

@ -2,68 +2,68 @@
#define COSMOPOLITAN_LIBC_NT_STATUS_H_
/* high two bits = {success,informational,warning,error} */
#define kNtStatusSuccess 0x00000000u /* success statuses */
#define kNtStatusWait0 0x00000000u
#define kNtStatusAbandonedWait0 0x00000080u
#define kNtStatusUserApc 0x000000C0u
#define kNtStatusTimeout 0x00000102u
#define kNtStatusPending 0x00000103u
#define kNtStatusGuardPageViolation 0x80000001u /* warning statuses */
#define kNtStatusDatatypeMisalignment 0x80000002u
#define kNtStatusBreakpoint 0x80000003u
#define kNtStatusSingleStep 0x80000004u
#define kNtStatusLongjump 0x80000026u
#define kNtStatusUnwindConsolidate 0x80000029u
#define kNtStatusAccessViolation 0xC0000005u /* error statuses */
#define kNtStatusInPageError 0xC0000006u
#define kNtStatusInvalidHandle 0xC0000008u
#define kNtStatusInvalidParameter 0xC000000Du
#define kNtStatusNoMemory 0xC0000017u
#define kNtStatusIllegalInstruction 0xC000001Du
#define kNtStatusNoncontinuableException 0xC0000025u
#define kNtStatusInvalidDisposition 0xC0000026u
#define kNtStatusArrayBoundsExceeded 0xC000008Cu
#define kNtStatusFloatDenormalOperand 0xC000008Du
#define kNtStatusFloatDivideByZero 0xC000008Eu
#define kNtStatusFloatInexactResult 0xC000008Fu
#define kNtStatusFloatInvalidOperation 0xC0000090u
#define kNtStatusFloatOverflow 0xC0000091u
#define kNtStatusFloatStackCheck 0xC0000092u
#define kNtStatusFloatUnderflow 0xC0000093u
#define kNtStatusIntegerDivideBYZero 0xC0000094u
#define kNtStatusIntegerOverflow 0xC0000095u
#define kNtStatusPrivilegedInstruction 0xC0000096u
#define kNtStatusStackOverflow 0xC00000FDu
#define kNtStatusDllNotFound 0xC0000135u
#define kNtStatusOrdinalNotFound 0xC0000138u
#define kNtStatusEntrypointNotFound 0xC0000139u
#define kNtStatusControlCExit 0xC000013Au
#define kNtStatusDllInitFailed 0xC0000142u
#define kNtStatusFloatMultipleFaults 0xC00002B4u
#define kNtStatusFloatMultipleTraps 0xC00002B5u
#define kNtStatusRegNatConsumption 0xC00002C9u
#define kNtStatusHeapCorruption 0xC0000374u
#define kNtStatusStackBufferOverrun 0xC0000409u
#define kNtStatusInvalidCruntimeParameter 0xC0000417u
#define kNtStatusAssertionFailure 0xC0000420u
#define kNtStatusEnclaveViolation 0xC00004A2u
#define kNtStatusSegmentNotification 0x40000005u
#define kNtStatusFatalAppExit 0x40000015u
#define kNtStatusNotFound 0xC0000225u
#define kNtStatusCancelled 0xC0000120u
#define kNtStatusSuccess 0x00000000 /* success statuses */
#define kNtStatusWait0 0x00000000
#define kNtStatusAbandonedWait0 0x00000080
#define kNtStatusUserApc 0x000000C0
#define kNtStatusTimeout 0x00000102
#define kNtStatusPending 0x00000103
#define kNtStatusGuardPageViolation 0x80000001 /* warning statuses */
#define kNtStatusDatatypeMisalignment 0x80000002
#define kNtStatusBreakpoint 0x80000003
#define kNtStatusSingleStep 0x80000004
#define kNtStatusLongjump 0x80000026
#define kNtStatusUnwindConsolidate 0x80000029
#define kNtStatusAccessViolation 0xC0000005 /* error statuses */
#define kNtStatusInPageError 0xC0000006
#define kNtStatusInvalidHandle 0xC0000008
#define kNtStatusInvalidParameter 0xC000000D
#define kNtStatusNoMemory 0xC0000017
#define kNtStatusIllegalInstruction 0xC000001D
#define kNtStatusNoncontinuableException 0xC0000025
#define kNtStatusInvalidDisposition 0xC0000026
#define kNtStatusArrayBoundsExceeded 0xC000008C
#define kNtStatusFloatDenormalOperand 0xC000008D
#define kNtStatusFloatDivideByZero 0xC000008E
#define kNtStatusFloatInexactResult 0xC000008F
#define kNtStatusFloatInvalidOperation 0xC0000090
#define kNtStatusFloatOverflow 0xC0000091
#define kNtStatusFloatStackCheck 0xC0000092
#define kNtStatusFloatUnderflow 0xC0000093
#define kNtStatusIntegerDivideBYZero 0xC0000094
#define kNtStatusIntegerOverflow 0xC0000095
#define kNtStatusPrivilegedInstruction 0xC0000096
#define kNtStatusStackOverflow 0xC00000FD
#define kNtStatusDllNotFound 0xC0000135
#define kNtStatusOrdinalNotFound 0xC0000138
#define kNtStatusEntrypointNotFound 0xC0000139
#define kNtStatusControlCExit 0xC000013A
#define kNtStatusDllInitFailed 0xC0000142
#define kNtStatusFloatMultipleFaults 0xC00002B4
#define kNtStatusFloatMultipleTraps 0xC00002B5
#define kNtStatusRegNatConsumption 0xC00002C9
#define kNtStatusHeapCorruption 0xC0000374
#define kNtStatusStackBufferOverrun 0xC0000409
#define kNtStatusInvalidCruntimeParameter 0xC0000417
#define kNtStatusAssertionFailure 0xC0000420
#define kNtStatusEnclaveViolation 0xC00004A2
#define kNtStatusSegmentNotification 0x40000005
#define kNtStatusFatalAppExit 0x40000015
#define kNtStatusNotFound 0xC0000225
#define kNtStatusCancelled 0xC0000120
#define kNtDbgExceptionHandled 0x00010001u
#define kNtDbgContinue 0x00010002u
#define kNtDbgReplyLater 0x40010001u
#define kNtDbgTerminateThread 0x40010003u
#define kNtDbgTerminateProcess 0x40010004u
#define kNtDbgControlC 0x40010005u
#define kNtDbgPrintexceptionC 0x40010006u
#define kNtDbgRipexception 0x40010007u
#define kNtDbgControlBreak 0x40010008u
#define kNtDbgCommandException 0x40010009u
#define kNtDbgPrintexceptionWideC 0x4001000Au
#define kNtDbgExceptionNotHandled 0x80010001u
#define kNtDbgExceptionHandled 0x00010001
#define kNtDbgContinue 0x00010002
#define kNtDbgReplyLater 0x40010001
#define kNtDbgTerminateThread 0x40010003
#define kNtDbgTerminateProcess 0x40010004
#define kNtDbgControlC 0x40010005
#define kNtDbgPrintexceptionC 0x40010006
#define kNtDbgRipexception 0x40010007
#define kNtDbgControlBreak 0x40010008
#define kNtDbgCommandException 0x40010009
#define kNtDbgPrintexceptionWideC 0x4001000A
#define kNtDbgExceptionNotHandled 0x80010001
#define kNtStillActive kNtStatusPending
#if !(__ASSEMBLER__ + __LINKER__ + 0)