41static void indent_to(AVBPrint *bp,
unsigned line_start,
int col)
43 int cur_col = bp->len - line_start;
67 int local_id = local_labels[
id];
90 case sizeof(uint32_t):
av_bprintf(bp,
"w%d", n);
break;
91 case sizeof(uint64_t):
av_bprintf(bp,
"x%d", n);
break;
114 uint8_t n, uint8_t el_count, uint8_t el_size, uint8_t idx_p1)
118 }
else if (el_count != 0) {
136 for (
int i = 0;
i < num_regs;
i++) {
330 AVBPrint *bp,
unsigned line_start,
332 const int *local_labels)
346 for (
int j = op_start; j < 4; j++) {
360 AVBPrint *bp,
unsigned line_start,
371 AVBPrint *bp,
unsigned line_start,
380 int local_id = local_labels[
id];
385 local_labels[
id] = -local_id;
394 AVBPrint *bp,
unsigned line_start,
397 av_bprintf(bp,
"function %s, export=%d, jumpable=%d",
405 AVBPrint *bp,
unsigned line_start,
415 AVBPrint *bp,
unsigned line_start,
428 int *local_labels =
NULL;
441 memset(local_labels, 0x00, rctx->
num_labels *
sizeof(*local_labels));
444 int id = node->label.id;
446 local_labels[
id] = local_label++;
452 unsigned line_start = bp->len;
454 switch (node->type) {
477 if (node->inline_comment) {
479 av_bprintf(bp,
"// %s", node->inline_comment);
#define av_assert0(cond)
assert() equivalent, that is always enabled.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
#define i(width, name, range_min, range_max)
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
Memory handling functions.
int(* cond)(enum AVPixelFormat pix_fmt)
#define AARCH64_BASE_OFFSET
static uint8_t a64op_gpr_n(RasmOp op)
static int rasm_op_label_id(RasmOp op)
static uint8_t a64op_cond_val(RasmOp op)
static uint8_t a64op_gpr_size(RasmOp op)
#define AARCH64_BASE_POST
static int16_t a64op_base_imm(RasmOp op)
static uint8_t rasm_op_type(RasmOp op)
static uint8_t a64op_base_mode(RasmOp op)
static uint8_t a64op_vec_num_regs(RasmOp op)
static uint8_t a64op_vec_idx_p1(RasmOp op)
static int32_t rasm_op_imm_val(RasmOp op)
static uint8_t a64op_vec_n(RasmOp op)
static uint8_t a64op_base_n(RasmOp op)
static uint8_t a64op_vec_el_count(RasmOp op)
static uint8_t a64op_vec_el_size(RasmOp op)
static void print_node_endfunc(const RasmContext *rctx, AVBPrint *bp, unsigned line_start, const RasmNode *node)
static void indent_to(AVBPrint *bp, unsigned line_start, int col)
static void print_node_label(const RasmContext *rctx, AVBPrint *bp, unsigned line_start, const RasmNode *node, int *local_labels)
static const char insn_names[AARCH64_INSN_NB][8]
static const char * cond_name(uint8_t cond)
static void print_op_vec(AVBPrint *bp, RasmOp op)
static const char * insn_name(int id)
static void print_op_cond(AVBPrint *bp, RasmOp op)
static void print_node_directive(const RasmContext *rctx, AVBPrint *bp, unsigned line_start, const RasmNode *node)
#define INSTR_INDENT
Static file backend for the runtime assembler.
static const char cond_names[16][4]
static void print_op_base(AVBPrint *bp, RasmOp op)
int rasm_print(RasmContext *rctx, AVBPrint *bp)
static char elem_type_char(uint8_t elem_size)
static void print_node_function(const RasmContext *rctx, AVBPrint *bp, unsigned line_start, const RasmNode *node)
static void print_node_comment(const RasmContext *rctx, AVBPrint *bp, unsigned line_start, const RasmNode *node)
static void print_op_imm(AVBPrint *bp, RasmOp op)
static void print_op_gpr(AVBPrint *bp, RasmOp op)
static void print_op_label(const RasmContext *rctx, AVBPrint *bp, RasmOp op, const int *local_labels)
static void print_op(const RasmContext *rctx, AVBPrint *bp, const int *local_labels, RasmOp op)
static void print_node_insn(const RasmContext *rctx, AVBPrint *bp, unsigned line_start, const RasmNode *node, const int *local_labels)
static void print_vec_reg(AVBPrint *bp, uint8_t n, uint8_t el_count, uint8_t el_size, uint8_t idx_p1)
static void print_base_reg(AVBPrint *bp, uint8_t n)
RasmNodeDirective directive
Runtime assembler for AArch64.