further raddbg_cons librarification

This commit is contained in:
Ryan Fleury
2024-02-12 20:32:20 -08:00
parent 2a85e1d37d
commit 440dcf21a2
7 changed files with 261 additions and 98 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
#if COMPILER_CL || (COMPILER_CLANG && OS_WINDOWS)
#if COMPILER_MSVC || (COMPILER_CLANG && OS_WINDOWS)
internal U64
count_bits_set16(U16 val)
+23 -3
View File
@@ -32,7 +32,27 @@
#elif defined(_MSC_VER)
# define COMPILER_CL 1
# define COMPILER_MSVC 1
# if _MSC_VER >= 1920
# define COMPILER_MSVC_YEAR 2019
# elif _MSC_VER >= 1910
# define COMPILER_MSVC_YEAR 2017
# elif _MSC_VER >= 1900
# define COMPILER_MSVC_YEAR 2015
# elif _MSC_VER >= 1800
# define COMPILER_MSVC_YEAR 2013
# elif _MSC_VER >= 1700
# define COMPILER_MSVC_YEAR 2012
# elif _MSC_VER >= 1600
# define COMPILER_MSVC_YEAR 2010
# elif _MSC_VER >= 1500
# define COMPILER_MSVC_YEAR 2008
# elif _MSC_VER >= 1400
# define COMPILER_MSVC_YEAR 2005
# else
# define COMPILER_MSVC_YEAR 0
# endif
# if defined(_WIN32)
# define OS_WINDOWS 1
@@ -110,8 +130,8 @@
#if !defined(ARCH_ARM32)
# define ARCH_ARM32 0
#endif
#if !defined(COMPILER_CL)
# define COMPILER_CL 0
#if !defined(COMPILER_MSVC)
# define COMPILER_MSVC 0
#endif
#if !defined(COMPILER_GCC)
# define COMPILER_GCC 0
+2 -2
View File
@@ -344,8 +344,8 @@ architecture_from_context(void){
internal Compiler
compiler_from_context(void){
Compiler compiler = Compiler_Null;
#if COMPILER_CL
compiler = Compiler_cl;
#if COMPILER_MSVC
compiler = Compiler_msvc;
#elif COMPILER_GCC
compiler = Compiler_gcc;
#elif COMPILER_CLANG
+6 -6
View File
@@ -31,7 +31,7 @@
#define global static
#define local_persist static
#if COMPILER_CL || (COMPILER_CLANG && OS_WINDOWS)
#if COMPILER_MSVC || (COMPILER_CLANG && OS_WINDOWS)
# pragma section(".rdata$", read)
# define read_only __declspec(allocate(".rdata$"))
#elif (COMPILER_CLANG && OS_LINUX)
@@ -84,7 +84,7 @@
////////////////////////////////
//~ rjf: Asserts
#if COMPILER_CL
#if COMPILER_MSVC
# define Trap() __debugbreak()
#elif COMPILER_CLANG || COMPILER_GCC
# define Trap() __builtin_trap()
@@ -180,7 +180,7 @@
# define zero_struct {0}
#endif
#if COMPILER_MSVC && COMPILER_MSVC_YEAR < 2015
#if COMPILER_MSVC && COMPILER_CL_YEAR < 2015
# define this_function_name "unknown"
#else
# define this_function_name __func__
@@ -196,7 +196,7 @@
# define C_LINKAGE
#endif
#if COMPILER_CL
#if COMPILER_MSVC
# define thread_static __declspec(thread)
#elif COMPILER_CLANG || COMPILER_GCC
# define thread_static __thread
@@ -211,7 +211,7 @@
////////////////////////////////
//~ ASAN
#if COMPILER_CL
#if COMPILER_MSVC
# if defined(__SANITIZE_ADDRESS__)
# define ASAN_ENABLED 1
# define NO_ASAN __declspec(no_sanitize_address)
@@ -345,7 +345,7 @@ Architecture;
typedef enum Compiler
{
Compiler_Null,
Compiler_cl,
Compiler_msvc,
Compiler_gcc,
Compiler_clang,
Compiler_COUNT,