SSBM Decomp
Loading...
Searching...
No Matches
m2c_macros.h File Reference

This header contains macros emitted by m2c in "valid syntax" mode, which can be enabled by passing --valid-syntax on the command line. More...

#include <platform.h>

Go to the source code of this file.

Macros

#define M2C_FIELD(expr, type_ptr, offset)
#define M2C_BITWISE(type, expr)
#define M2C_LWL(expr)
#define M2C_FIRST3BYTES(expr)
#define M2C_UNALIGNED32(expr)
#define M2C_ERROR(desc)
#define M2C_TRAP_IF(cond)
#define M2C_BREAK()
#define M2C_SYNC()
#define M2C_CARRY   0
#define M2C_MEMCPY_ALIGNED   memcpy
#define M2C_MEMCPY_UNALIGNED   memcpy

Typedefs

typedef s32 M2C_UNK
typedef s8 M2C_UNK8
typedef s16 M2C_UNK16
typedef s32 M2C_UNK32
typedef s64 M2C_UNK64

Detailed Description

This header contains macros emitted by m2c in "valid syntax" mode, which can be enabled by passing --valid-syntax on the command line.

In this mode, unhandled types and expressions are emitted as macros so that the output is compilable without human intervention.

Macro Definition Documentation

◆ M2C_FIELD

#define M2C_FIELD ( expr,
type_ptr,
offset )
Value:
(*(type_ptr) ((s8*) (expr) + (offset)))
signed char s8
Definition hsd_3B2B.h:3

◆ M2C_BITWISE

#define M2C_BITWISE ( type,
expr )
Value:
((type) (expr))

◆ M2C_LWL

#define M2C_LWL ( expr)
Value:
(expr)

◆ M2C_FIRST3BYTES

#define M2C_FIRST3BYTES ( expr)
Value:
(expr)

◆ M2C_UNALIGNED32

#define M2C_UNALIGNED32 ( expr)
Value:
(expr)

◆ M2C_ERROR

#define M2C_ERROR ( desc)
Value:
(0)

◆ M2C_TRAP_IF

#define M2C_TRAP_IF ( cond)
Value:
(0)

◆ M2C_BREAK

#define M2C_BREAK ( )
Value:
(0)

◆ M2C_SYNC

#define M2C_SYNC ( )
Value:
(0)

◆ M2C_CARRY

#define M2C_CARRY   0

◆ M2C_MEMCPY_ALIGNED

#define M2C_MEMCPY_ALIGNED   memcpy

◆ M2C_MEMCPY_UNALIGNED

#define M2C_MEMCPY_UNALIGNED   memcpy

Typedef Documentation

◆ M2C_UNK

typedef s32 M2C_UNK

◆ M2C_UNK8

typedef s8 M2C_UNK8

◆ M2C_UNK16

typedef s16 M2C_UNK16

◆ M2C_UNK32

typedef s32 M2C_UNK32

◆ M2C_UNK64

typedef s64 M2C_UNK64