res refactor progress
This commit is contained in:
parent
c0bad6e58b
commit
60793dbdf2
@ -82,7 +82,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//- Windows NTDDI version
|
//- Windows NTDDI version
|
||||||
/* FIXME: Remove this */
|
/* TODO: Remove this */
|
||||||
#if 0
|
#if 0
|
||||||
#if CompilerIsMsvc
|
#if CompilerIsMsvc
|
||||||
# define NTDDI_WIN11_DT 0x0C0A0000
|
# define NTDDI_WIN11_DT 0x0C0A0000
|
||||||
@ -315,27 +315,6 @@ void __asan_unpoison_memory_region(void const volatile *add, size_t);
|
|||||||
#define DllPushFront(f,l,n) DllPushFront_NPZ(0,f,l,n,next,prev)
|
#define DllPushFront(f,l,n) DllPushFront_NPZ(0,f,l,n,next,prev)
|
||||||
#define DllRemove(f,l,n) DllRemove_NPZ(0,f,l,n,next,prev)
|
#define DllRemove(f,l,n) DllRemove_NPZ(0,f,l,n,next,prev)
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ Struct alignment / padding macros
|
|
||||||
|
|
||||||
//- Pack
|
|
||||||
#if CompilerIsMsvc
|
|
||||||
# define Packed(s) __pragma(pack(push, 1)) s __pragma(pack(pop))
|
|
||||||
#elif CompilerIsClang
|
|
||||||
# define Packed(s) s __attribute((__packed__))
|
|
||||||
#elif LanguageIsGpu
|
|
||||||
# define Packed(s) s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//- alignas
|
|
||||||
#if (CompilerIsMsvc && LanguageIsC) || (LanguageIsC && __STDC_VERSION__ < 202311L)
|
|
||||||
# if CompilerIsMsvc
|
|
||||||
# define alignas(n) __declspec(align(n))
|
|
||||||
# else
|
|
||||||
# define alignas(n) __attribute__((aligned(n)))
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ Color helper macros
|
//~ Color helper macros
|
||||||
|
|
||||||
@ -378,16 +357,16 @@ void __asan_unpoison_memory_region(void const volatile *add, size_t);
|
|||||||
|
|
||||||
#if LanguageIsC
|
#if LanguageIsC
|
||||||
/* Intrinsic header info:
|
/* Intrinsic header info:
|
||||||
* <mmintrin.h" MMX
|
* mmintrin.h MMX
|
||||||
* <xmmintrin.h" SSE
|
* xmmintrin.h SSE
|
||||||
* <emmintrin.h" SSE2
|
* emmintrin.h SSE2
|
||||||
* <pmmintrin.h" SSE3
|
* pmmintrin.h SSE3
|
||||||
* <tmmintrin.h" SSSE3
|
* tmmintrin.h SSSE3
|
||||||
* <smmintrin.h" SSE4.1
|
* smmintrin.h SSE4.1
|
||||||
* <nmmintrin.h" SSE4.2
|
* nmmintrin.h SSE4.2
|
||||||
* <ammintrin.h" SSE4A
|
* ammintrin.h SSE4A
|
||||||
* <wmmintrin.h" AES
|
* wmmintrin.h AES
|
||||||
* <immintrin.h" AVX, AVX2, FMA
|
* immintrin.h AVX, AVX2, FMA
|
||||||
*/
|
*/
|
||||||
#include "intrin.h"
|
#include "intrin.h"
|
||||||
#include "nmmintrin.h" /* SSE4.2 */
|
#include "nmmintrin.h" /* SSE4.2 */
|
||||||
@ -429,6 +408,25 @@ void __asan_unpoison_memory_region(void const volatile *add, size_t);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//- Packed
|
||||||
|
#if CompilerIsMsvc
|
||||||
|
# define Packed(s) __pragma(pack(push, 1)) s __pragma(pack(pop))
|
||||||
|
#elif CompilerIsClang
|
||||||
|
# define Packed(s) s __attribute((__packed__))
|
||||||
|
#elif LanguageIsGpu
|
||||||
|
# define Packed(s) s
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//- alignas
|
||||||
|
#if (CompilerIsMsvc && LanguageIsC) || (LanguageIsC && __STDC_VERSION__ < 202311L)
|
||||||
|
# if CompilerIsMsvc
|
||||||
|
# define alignas(n) __declspec(align(n))
|
||||||
|
# else
|
||||||
|
# define alignas(n) __attribute__((aligned(n)))
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ Scalar types
|
//~ Scalar types
|
||||||
|
|
||||||
|
|||||||
@ -1009,9 +1009,9 @@ void StartupMeta(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- Compile C
|
//- Compile C
|
||||||
Echo(Lit("Compiling..."));
|
|
||||||
i32 ret = errors.count > 0;
|
i32 ret = errors.count > 0;
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
|
Echo(Lit("Compiling..."));
|
||||||
String cmd_str = msvc_cmd_str;
|
String cmd_str = msvc_cmd_str;
|
||||||
// String cmd_str = clang_cmd_str;
|
// String cmd_str = clang_cmd_str;
|
||||||
OS_CommandResult result = OS_RunCommand(arena, cmd_str);
|
OS_CommandResult result = OS_RunCommand(arena, cmd_str);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user