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)    (*(type_ptr) ((s8*) (expr) + (offset)))
 
#define M2C_BITWISE(type, expr)   ((type) (expr))
 
#define M2C_LWL(expr)   (expr)
 
#define M2C_FIRST3BYTES(expr)   (expr)
 
#define M2C_UNALIGNED32(expr)   (expr)
 
#define M2C_ERROR(desc)   (0)
 
#define M2C_TRAP_IF(cond)   (0)
 
#define M2C_BREAK()   (0)
 
#define M2C_SYNC()   (0)
 
#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 
)     (*(type_ptr) ((s8*) (expr) + (offset)))

◆ M2C_BITWISE

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

◆ M2C_LWL

#define M2C_LWL (   expr)    (expr)

◆ M2C_FIRST3BYTES

#define M2C_FIRST3BYTES (   expr)    (expr)

◆ M2C_UNALIGNED32

#define M2C_UNALIGNED32 (   expr)    (expr)

◆ M2C_ERROR

#define M2C_ERROR (   desc)    (0)

◆ M2C_TRAP_IF

#define M2C_TRAP_IF (   cond)    (0)

◆ M2C_BREAK

#define M2C_BREAK ( )    (0)

◆ M2C_SYNC

#define M2C_SYNC ( )    (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