Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Data Structures | Macros | Functions | Variables
emutools_basicdefs.h File Reference
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <SDL_types.h>
#include <SDL_endian.h>
Include dependency graph for emutools_basicdefs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  RegPair
 

Macros

#define COPYRIGHT_YEARS   "2016-2022"
 
#define USE_REGPARM
 
#define ARCH_64BIT
 
#define ARCH_BITS   64
 
#define ARCH_BITS_AS_TEXT   "64"
 
#define CC_TYPE   "UNKNOWN-COMPILER"
 
#define XEMU_UNREACHABLE_FATAL_ERROR()   do { fprintf(stderr, "*** Unreachable code point hit in function %s\n", __func__); exit(1); } while(0)
 
#define XEMU_LIKELY(__x__)   (__x__)
 
#define XEMU_UNLIKELY(__x__)   (__x__)
 
#define XEMU_INLINE   inline
 
#define XEMU_UNREACHABLE()   XEMU_UNREACHABLE_FATAL_ERROR()
 
#define REGPARM(__n__)
 
#define O_BINARY   0
 
#define DIRSEP_STR   "/"
 
#define DIRSEP_CHR   '/'
 
#define NL   "\n"
 
#define NL_LENGTH   1
 
#define PRINTF_LLD   "%lld"
 
#define PRINTF_LLU   "%llu"
 
#define MKDIR(__n)   mkdir((__n), 0777)
 
#define NULL_DEVICE   "/dev/null"
 
#define DEBUG(...)
 
#define DEBUGPRINT(...)
 
#define __BIGGEST_ALIGNMENT__   16
 
#define XEMU_MISSING_BIGGEST_ALIGNMENT_WORKAROUND
 
#define ALIGNED(n)   __attribute__ ((aligned (n)))
 
#define MAXALIGNED   ALIGNED(__BIGGEST_ALIGNMENT__)
 
#define ENDIAN_NAME   "LE"
 
#define ENDIAN_GOOD
 
#define ENDIAN_CHECKER_BYTE_L   0x01
 
#define ENDIAN_CHECKER_BYTE_H   0x23
 
#define ENDIAN_CHECKER_WORD   0x2301
 
#define ENDIAN_CHECKER_DWORD   0x67452301
 
#define XEMUEXIT(n)   exit(n)
 
#define BOOLEAN_VALUE(n)   (!!(n))
 
#define VOIDPTR_TO_INT(x)   ((int)(intptr_t)(void*)(x))
 
#define VOIDPTR_TO_UINT(x)   ((unsigned int)(uintptr_t)(void*)(x))
 
#define TO_STR_LEVEL1_(x)   #x
 
#define STRINGIFY(x)   TO_STR_LEVEL1_(x)
 

Functions

void xemu_dump_version (FILE *fp, const char *slogan)
 
int xemu_is_official_build (void)
 

Variables

FILE * debug_fp
 
int chatty_xemu
 
const char XEMU_BUILDINFO_ON []
 
const char XEMU_BUILDINFO_AT []
 
const char XEMU_BUILDINFO_GIT []
 
const char XEMU_BUILDINFO_CC []
 
const char XEMU_BUILDINFO_TARGET []
 
const char XEMU_BUILDINFO_CDATE []
 
const char emulators_disclaimer []
 

Macro Definition Documentation

◆ __BIGGEST_ALIGNMENT__

#define __BIGGEST_ALIGNMENT__   16

Definition at line 179 of file emutools_basicdefs.h.

◆ ALIGNED

#define ALIGNED (   n)    __attribute__ ((aligned (n)))

Definition at line 187 of file emutools_basicdefs.h.

◆ ARCH_64BIT

#define ARCH_64BIT

Definition at line 88 of file emutools_basicdefs.h.

◆ ARCH_BITS

#define ARCH_BITS   64

Definition at line 89 of file emutools_basicdefs.h.

◆ ARCH_BITS_AS_TEXT

#define ARCH_BITS_AS_TEXT   "64"

Definition at line 90 of file emutools_basicdefs.h.

◆ BOOLEAN_VALUE

#define BOOLEAN_VALUE (   n)    (!!(n))

Definition at line 249 of file emutools_basicdefs.h.

◆ CC_TYPE

#define CC_TYPE   "UNKNOWN-COMPILER"

Definition at line 104 of file emutools_basicdefs.h.

◆ COPYRIGHT_YEARS

#define COPYRIGHT_YEARS   "2016-2022"

Definition at line 24 of file emutools_basicdefs.h.

◆ DEBUG

#define DEBUG (   ...)
Value:
do { \
fprintf(debug_fp, __VA_ARGS__); \
} while (0)

Definition at line 167 of file emutools_basicdefs.h.

◆ DEBUGPRINT

#define DEBUGPRINT (   ...)
Value:
do { \
if (chatty_xemu) \
printf(__VA_ARGS__); \
DEBUG(__VA_ARGS__); \
} while (0)

Definition at line 171 of file emutools_basicdefs.h.

◆ DIRSEP_CHR

#define DIRSEP_CHR   '/'

Definition at line 142 of file emutools_basicdefs.h.

◆ DIRSEP_STR

#define DIRSEP_STR   "/"

Definition at line 141 of file emutools_basicdefs.h.

◆ ENDIAN_CHECKER_BYTE_H

#define ENDIAN_CHECKER_BYTE_H   0x23

Definition at line 202 of file emutools_basicdefs.h.

◆ ENDIAN_CHECKER_BYTE_L

#define ENDIAN_CHECKER_BYTE_L   0x01

Definition at line 201 of file emutools_basicdefs.h.

◆ ENDIAN_CHECKER_DWORD

#define ENDIAN_CHECKER_DWORD   0x67452301

Definition at line 204 of file emutools_basicdefs.h.

◆ ENDIAN_CHECKER_WORD

#define ENDIAN_CHECKER_WORD   0x2301

Definition at line 203 of file emutools_basicdefs.h.

◆ ENDIAN_GOOD

#define ENDIAN_GOOD

Definition at line 200 of file emutools_basicdefs.h.

◆ ENDIAN_NAME

#define ENDIAN_NAME   "LE"

Definition at line 199 of file emutools_basicdefs.h.

◆ MAXALIGNED

#define MAXALIGNED   ALIGNED(__BIGGEST_ALIGNMENT__)

Definition at line 188 of file emutools_basicdefs.h.

◆ MKDIR

#define MKDIR (   __n)    mkdir((__n), 0777)

Definition at line 147 of file emutools_basicdefs.h.

◆ NL

#define NL   "\n"

Definition at line 143 of file emutools_basicdefs.h.

◆ NL_LENGTH

#define NL_LENGTH   1

Definition at line 144 of file emutools_basicdefs.h.

◆ NULL_DEVICE

#define NULL_DEVICE   "/dev/null"

Definition at line 148 of file emutools_basicdefs.h.

◆ O_BINARY

#define O_BINARY   0

Definition at line 140 of file emutools_basicdefs.h.

◆ PRINTF_LLD

#define PRINTF_LLD   "%lld"

Definition at line 145 of file emutools_basicdefs.h.

◆ PRINTF_LLU

#define PRINTF_LLU   "%llu"

Definition at line 146 of file emutools_basicdefs.h.

◆ REGPARM

#define REGPARM (   __n__)

Definition at line 133 of file emutools_basicdefs.h.

◆ STRINGIFY

#define STRINGIFY (   x)    TO_STR_LEVEL1_(x)

Definition at line 275 of file emutools_basicdefs.h.

◆ TO_STR_LEVEL1_

#define TO_STR_LEVEL1_ (   x)    #x

Definition at line 274 of file emutools_basicdefs.h.

◆ USE_REGPARM

#define USE_REGPARM

Definition at line 30 of file emutools_basicdefs.h.

◆ VOIDPTR_TO_INT

#define VOIDPTR_TO_INT (   x)    ((int)(intptr_t)(void*)(x))

Definition at line 270 of file emutools_basicdefs.h.

◆ VOIDPTR_TO_UINT

#define VOIDPTR_TO_UINT (   x)    ((unsigned int)(uintptr_t)(void*)(x))

Definition at line 271 of file emutools_basicdefs.h.

◆ XEMU_INLINE

#define XEMU_INLINE   inline

Definition at line 126 of file emutools_basicdefs.h.

◆ XEMU_LIKELY

#define XEMU_LIKELY (   __x__)    (__x__)

Definition at line 124 of file emutools_basicdefs.h.

◆ XEMU_MISSING_BIGGEST_ALIGNMENT_WORKAROUND

#define XEMU_MISSING_BIGGEST_ALIGNMENT_WORKAROUND

Definition at line 180 of file emutools_basicdefs.h.

◆ XEMU_UNLIKELY

#define XEMU_UNLIKELY (   __x__)    (__x__)

Definition at line 125 of file emutools_basicdefs.h.

◆ XEMU_UNREACHABLE

#define XEMU_UNREACHABLE ( )    XEMU_UNREACHABLE_FATAL_ERROR()

Definition at line 127 of file emutools_basicdefs.h.

◆ XEMU_UNREACHABLE_FATAL_ERROR

#define XEMU_UNREACHABLE_FATAL_ERROR ( )    do { fprintf(stderr, "*** Unreachable code point hit in function %s\n", __func__); exit(1); } while(0)

Definition at line 108 of file emutools_basicdefs.h.

◆ XEMUEXIT

#define XEMUEXIT (   n)    exit(n)

Definition at line 246 of file emutools_basicdefs.h.

Function Documentation

◆ xemu_dump_version()

void xemu_dump_version ( FILE *  fp,
const char *  slogan 
)

Definition at line 45 of file emutools_buildinfo.c.

Here is the caller graph for this function:

◆ xemu_is_official_build()

int xemu_is_official_build ( void  )

Definition at line 33 of file emutools_buildinfo.c.

Here is the caller graph for this function:

Variable Documentation

◆ chatty_xemu

int chatty_xemu

Definition at line 68 of file main.c.

◆ debug_fp

FILE* debug_fp

Definition at line 87 of file configuration.c.

◆ emulators_disclaimer

const char emulators_disclaimer[]

Definition at line 25 of file emutools_buildinfo.c.

◆ XEMU_BUILDINFO_AT

const char XEMU_BUILDINFO_AT[]

Definition at line 251 of file emutools_basicdefs.h.

◆ XEMU_BUILDINFO_CC

const char XEMU_BUILDINFO_CC[]

Definition at line 251 of file emutools_basicdefs.h.

◆ XEMU_BUILDINFO_CDATE

const char XEMU_BUILDINFO_CDATE[]

Definition at line 251 of file emutools_basicdefs.h.

◆ XEMU_BUILDINFO_GIT

const char XEMU_BUILDINFO_GIT[]

Definition at line 251 of file emutools_basicdefs.h.

◆ XEMU_BUILDINFO_ON

const char XEMU_BUILDINFO_ON[]

◆ XEMU_BUILDINFO_TARGET

const char XEMU_BUILDINFO_TARGET[]

Definition at line 251 of file emutools_basicdefs.h.

chatty_xemu
int chatty_xemu
Definition: main.c:68
debug_fp
FILE * debug_fp
Definition: configuration.c:87
XEMU_UNLIKELY
#define XEMU_UNLIKELY(__x__)
Definition: emutools_basicdefs.h:125