SH4ZAM! 0.1.0
Fast math library for the Sega Dreamcast's SH4 CPU
Loading...
Searching...
No Matches
shz_cdefs.h File Reference
#include <stdint.h>
#include <assert.h>
Include dependency graph for shz_cdefs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SHZ_SH4
 
#define SHZ_PPC
 
#define SHZ_MIPS
 
#define SHZ_ARM
 
#define SHZ_X86
 
#define SHZ_WASM
 
#define SHZ_SW
 
#define SHZ_BACKEND
 
Utilities

Miscellaneous function-like macros

#define SHZ_STRINGIFY_LITERAL(a)
 
#define SHZ_STRINGIFY(a)
 
#define SHZ_COUNT_OF(array)
 
#define SHZ_CONTAINER_OF(ptr, type, member)
 
#define SHZ_SWAP(a, b)
 
#define SHZ_DECLARE_STRUCT(n, t)
 
#define SHZ_DECLARE_STRUCT_ALIGNED(n, t, a)
 

Typedefs

Aliasing Types

Types which may break C/C++'s strict aliasing rules

typedef SHZ_ALIASING int16_t shz_alias_int16_t
 
typedef SHZ_ALIASING uint16_t shz_alias_uint16_t
 
typedef SHZ_ALIASING int32_t shz_alias_int32_t
 
typedef SHZ_ALIASING uint32_t shz_alias_uint32_t
 
typedef SHZ_ALIASING float shz_alias_float_t
 
typedef SHZ_ALIASING int64_t shz_alias_int64_t
 
typedef SHZ_ALIASING uint64_t shz_alias_uint64_t
 
typedef SHZ_ALIASING double shz_alias_double_t
 

Detailed Description

Preprocessor definitions and macro utilities.

This file contains commonly used preprocessor definitions used throughout the project:

  • Compiler attributes
  • Miscellaneous utilities
Author
2025, 2026 Falco Girgis

Definition in file shz_cdefs.h.

Macro Definition Documentation

◆ SHZ_SH4

#define SHZ_SH4

Definition at line 23 of file shz_cdefs.h.

◆ SHZ_PPC

#define SHZ_PPC

Definition at line 24 of file shz_cdefs.h.

◆ SHZ_MIPS

#define SHZ_MIPS

Definition at line 25 of file shz_cdefs.h.

◆ SHZ_ARM

#define SHZ_ARM

Definition at line 26 of file shz_cdefs.h.

◆ SHZ_X86

#define SHZ_X86

Definition at line 27 of file shz_cdefs.h.

◆ SHZ_WASM

#define SHZ_WASM

Definition at line 28 of file shz_cdefs.h.

◆ SHZ_SW

#define SHZ_SW

Definition at line 29 of file shz_cdefs.h.

◆ SHZ_BACKEND

#define SHZ_BACKEND

Definition at line 35 of file shz_cdefs.h.

◆ SHZ_STRINGIFY_LITERAL

#define SHZ_STRINGIFY_LITERAL ( a)

Stringifies a literal expression.

Definition at line 44 of file shz_cdefs.h.

◆ SHZ_STRINGIFY

#define SHZ_STRINGIFY ( a)

Stringifies an expression after preprocessing, supporting macro expansion.

Definition at line 46 of file shz_cdefs.h.

◆ SHZ_COUNT_OF

#define SHZ_COUNT_OF ( array)

Returns the number of elements within a statically sized array.

Definition at line 48 of file shz_cdefs.h.

◆ SHZ_CONTAINER_OF

#define SHZ_CONTAINER_OF ( ptr,
type,
member )

Returns the containing structure from a pointer to one of its members.

Definition at line 50 of file shz_cdefs.h.

◆ SHZ_SWAP

#define SHZ_SWAP ( a,
b )

Macro which swaps the two values held by a and b.

Definition at line 52 of file shz_cdefs.h.

◆ SHZ_DECLARE_STRUCT

#define SHZ_DECLARE_STRUCT ( n,
t )

Macro which forward declares a struct and its typedef.

Definition at line 54 of file shz_cdefs.h.

◆ SHZ_DECLARE_STRUCT_ALIGNED

#define SHZ_DECLARE_STRUCT_ALIGNED ( n,
t,
a )

Macro which forward declares a manually aligned struct and its typedef.

Definition at line 56 of file shz_cdefs.h.

Typedef Documentation

◆ shz_alias_int16_t

typedef SHZ_ALIASING int16_t shz_alias_int16_t

int16_t type whose value may be aliased as another type.

Definition at line 164 of file shz_cdefs.h.

◆ shz_alias_uint16_t

typedef SHZ_ALIASING uint16_t shz_alias_uint16_t

uint16_t type whose value may be aliased as another type.

Definition at line 166 of file shz_cdefs.h.

◆ shz_alias_int32_t

typedef SHZ_ALIASING int32_t shz_alias_int32_t

int32_t type whose value may be aliased as another type.

Definition at line 168 of file shz_cdefs.h.

◆ shz_alias_uint32_t

typedef SHZ_ALIASING uint32_t shz_alias_uint32_t

uint32_t type whose value may be aliased as another type.

Definition at line 170 of file shz_cdefs.h.

◆ shz_alias_float_t

typedef SHZ_ALIASING float shz_alias_float_t

float type whose value may be aliased as another type.

Definition at line 172 of file shz_cdefs.h.

◆ shz_alias_int64_t

typedef SHZ_ALIASING int64_t shz_alias_int64_t

int64_t type whose value may be aliased as another type.

Definition at line 174 of file shz_cdefs.h.

◆ shz_alias_uint64_t

typedef SHZ_ALIASING uint64_t shz_alias_uint64_t

uint64_t type whose value may be aliased as another type.

Definition at line 176 of file shz_cdefs.h.

◆ shz_alias_double_t

typedef SHZ_ALIASING double shz_alias_double_t

double type whose value may be aliased as another type.

Definition at line 178 of file shz_cdefs.h.