FFmpeg
Loading...
Searching...
No Matches
rasm.c File Reference
#include "rasm.h"
#include <stdarg.h>
#include "libavutil/error.h"
#include "libavutil/macros.h"
#include "libavutil/mem.h"

Go to the source code of this file.

Functions

RasmContextrasm_alloc (void)
 
void rasm_free (RasmContext **prctx)
 
static RasmNodeadd_node (RasmContext *rctx, RasmNodeType type)
 
RasmNoderasm_add_insn (RasmContext *rctx, int id, RasmOp op0, RasmOp op1, RasmOp op2, RasmOp op3)
 
RasmNoderasm_add_comment (RasmContext *rctx, const char *comment)
 
RasmNoderasm_add_commentf (RasmContext *rctx, char *s, size_t n, const char *fmt,...)
 
RasmNoderasm_add_label (RasmContext *rctx, int id)
 
RasmNoderasm_add_func (RasmContext *rctx, int id, bool export, bool jumpable)
 
RasmNoderasm_add_endfunc (RasmContext *rctx)
 
RasmNoderasm_add_directive (RasmContext *rctx, const char *text)
 
RasmNoderasm_get_current_node (RasmContext *rctx)
 
RasmNoderasm_set_current_node (RasmContext *rctx, RasmNode *node)
 
int rasm_func_begin (RasmContext *rctx, const char *name, bool export, bool jumpable)
 
void rasm_annotate (RasmContext *rctx, const char *comment)
 
void rasm_annotatef (RasmContext *rctx, char *s, size_t n, const char *fmt,...)
 
void rasm_annotate_next (RasmContext *rctx, const char *comment)
 
void rasm_annotate_nextf (RasmContext *rctx, char *s, size_t n, const char *fmt,...)
 
int rasm_new_label (RasmContext *rctx, const char *name)
 Allocate a new label ID with the given name.
 
int rasm_new_labelf (RasmContext *rctx, char *s, size_t n, const char *fmt,...)
 
AArch64VecViews a64op_vec_views (RasmOp op)
 

Function Documentation

◆ rasm_alloc()

RasmContext * rasm_alloc ( void )

Definition at line 32 of file rasm.c.

Referenced by asmgen().

◆ rasm_free()

void rasm_free ( RasmContext ** prctx)

Definition at line 37 of file rasm.c.

Referenced by asmgen().

◆ add_node()

static RasmNode * add_node ( RasmContext * rctx,
RasmNodeType type )
static

◆ rasm_add_insn()

RasmNode * rasm_add_insn ( RasmContext * rctx,
int id,
RasmOp op0,
RasmOp op1,
RasmOp op2,
RasmOp op3 )

Definition at line 101 of file rasm.c.

◆ rasm_add_comment()

RasmNode * rasm_add_comment ( RasmContext * rctx,
const char * comment )

◆ rasm_add_commentf()

RasmNode * rasm_add_commentf ( RasmContext * rctx,
char * s,
size_t n,
const char * fmt,
... )

Definition at line 137 of file rasm.c.

◆ rasm_add_label()

RasmNode * rasm_add_label ( RasmContext * rctx,
int id )

Definition at line 146 of file rasm.c.

Referenced by asmgen_process(), and rasm_add_commentf().

◆ rasm_add_func()

RasmNode * rasm_add_func ( RasmContext * rctx,
int id,
bool export,
bool jumpable )

Definition at line 155 of file rasm.c.

Referenced by rasm_add_commentf(), and rasm_func_begin().

◆ rasm_add_endfunc()

RasmNode * rasm_add_endfunc ( RasmContext * rctx)

Definition at line 168 of file rasm.c.

Referenced by rasm_add_commentf(), and rasm_func_begin().

◆ rasm_add_directive()

RasmNode * rasm_add_directive ( RasmContext * rctx,
const char * text )

Definition at line 174 of file rasm.c.

Referenced by rasm_add_commentf().

◆ rasm_get_current_node()

RasmNode * rasm_get_current_node ( RasmContext * rctx)

Definition at line 194 of file rasm.c.

Referenced by asmgen_process(), asmgen_set_load_cont_node(), linear_pass(), and rasm_add_commentf().

◆ rasm_set_current_node()

RasmNode * rasm_set_current_node ( RasmContext * rctx,
RasmNode * node )

◆ rasm_func_begin()

int rasm_func_begin ( RasmContext * rctx,
const char * name,
bool export,
bool jumpable )

Definition at line 209 of file rasm.c.

Referenced by asmgen_op_cps(), asmgen_process_cps(), and rasm_add_commentf().

◆ rasm_annotate()

void rasm_annotate ( RasmContext * rctx,
const char * comment )

Definition at line 243 of file rasm.c.

Referenced by rasm_annotatef(), and rasm_new_labelf().

◆ rasm_annotatef()

void rasm_annotatef ( RasmContext * rctx,
char * s,
size_t n,
const char * fmt,
... )

Definition at line 254 of file rasm.c.

Referenced by rasm_annotatef().

◆ rasm_annotate_next()

void rasm_annotate_next ( RasmContext * rctx,
const char * comment )

◆ rasm_annotate_nextf()

void rasm_annotate_nextf ( RasmContext * rctx,
char * s,
size_t n,
const char * fmt,
... )

Definition at line 273 of file rasm.c.

Referenced by rasm_annotate_nextf().

◆ rasm_new_label()

int rasm_new_label ( RasmContext * rctx,
const char * name )

Allocate a new label ID with the given name.

Parameters
namelabel name or NULL for local label
Returns
new label ID, negative error code on failure

Definition at line 282 of file rasm.c.

Referenced by asmgen_process(), rasm_add_commentf(), rasm_func_begin(), and rasm_new_labelf().

◆ rasm_new_labelf()

int rasm_new_labelf ( RasmContext * rctx,
char * s,
size_t n,
const char * fmt,
... )

Definition at line 318 of file rasm.c.

Referenced by rasm_new_labelf().

◆ a64op_vec_views()