FFmpeg
Data Structures | Macros | Enumerations | Functions
rasm.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

union  RasmOp
 Runtime assembler for AArch64. More...
 
struct  RasmNodeInsn
 
struct  RasmNodeComment
 
struct  RasmNodeLabel
 
struct  RasmNodeFunc
 
struct  RasmNodeDirective
 
struct  RasmNode
 
struct  RasmFunction
 
struct  RasmEntry
 
struct  RasmContext
 
struct  AArch64VecViews
 This helper structure is used to mimic the assembler syntax for vector register modifiers. More...
 

Macros

#define OPN   rasm_op_none()
 
#define IMM(val)   rasm_op_imm(val)
 
#define AARCH64_COND_EQ   0x0
 
#define AARCH64_COND_NE   0x1
 
#define AARCH64_COND_HS   0x2
 
#define AARCH64_COND_CS   AARCH64_COND_HS
 
#define AARCH64_COND_LO   0x3
 
#define AARCH64_COND_CC   AARCH64_COND_LO
 
#define AARCH64_COND_MI   0x4
 
#define AARCH64_COND_PL   0x5
 
#define AARCH64_COND_VS   0x6
 
#define AARCH64_COND_VC   0x7
 
#define AARCH64_COND_HI   0x8
 
#define AARCH64_COND_LS   0x9
 
#define AARCH64_COND_GE   0xa
 
#define AARCH64_COND_LT   0xb
 
#define AARCH64_COND_GT   0xc
 
#define AARCH64_COND_LE   0xd
 
#define AARCH64_COND_AL   0xe
 
#define AARCH64_COND_NV   0xf
 
#define AARCH64_BASE_OFFSET   0
 
#define AARCH64_BASE_PRE   1
 
#define AARCH64_BASE_POST   2
 
#define i_none(rctx)   rasm_add_insn(rctx, AARCH64_INSN_NONE, OPN, OPN, OPN, OPN)
 
#define i_add(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_ADD, op0, op1, op2, OPN)
 
#define i_addv(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_ADDV, op0, op1, OPN, OPN)
 
#define i_adr(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_ADR, op0, op1, OPN, OPN)
 
#define i_and(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_AND, op0, op1, op2, OPN)
 
#define i_b(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_B, op0, op1, OPN, OPN)
 
#define i_br(rctx, op0)   rasm_add_insn(rctx, AARCH64_INSN_BR, op0, OPN, OPN, OPN)
 
#define i_cmp(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_CMP, op0, op1, OPN, OPN)
 
#define i_csel(rctx, op0, op1, op2, op3)   rasm_add_insn(rctx, AARCH64_INSN_CSEL, op0, op1, op2, op3)
 
#define i_dup(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_DUP, op0, op1, OPN, OPN)
 
#define i_fadd(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_FADD, op0, op1, op2, OPN)
 
#define i_fcvtzu(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_FCVTZU, op0, op1, OPN, OPN)
 
#define i_fmax(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_FMAX, op0, op1, op2, OPN)
 
#define i_fmin(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_FMIN, op0, op1, op2, OPN)
 
#define i_fmla(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_FMLA, op0, op1, op2, OPN)
 
#define i_fmul(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_FMUL, op0, op1, op2, OPN)
 
#define i_ins(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_INS, op0, op1, OPN, OPN)
 
#define i_ld1(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LD1, op0, op1, OPN, OPN)
 
#define i_ld1r(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LD1R, op0, op1, OPN, OPN)
 
#define i_ld2(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LD2, op0, op1, OPN, OPN)
 
#define i_ld3(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LD3, op0, op1, OPN, OPN)
 
#define i_ld4(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LD4, op0, op1, OPN, OPN)
 
#define i_ldp(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_LDP, op0, op1, op2, OPN)
 
#define i_ldr(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LDR, op0, op1, OPN, OPN)
 
#define i_ldrb(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LDRB, op0, op1, OPN, OPN)
 
#define i_ldrh(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_LDRH, op0, op1, OPN, OPN)
 
#define i_lsr(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_LSR, op0, op1, op2, OPN)
 
#define i_mov(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_MOV, op0, op1, OPN, OPN)
 
#define i_movi(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_MOVI, op0, op1, OPN, OPN)
 
#define i_mul(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_MUL, op0, op1, op2, OPN)
 
#define i_orr(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_ORR, op0, op1, op2, OPN)
 
#define i_ret(rctx)   rasm_add_insn(rctx, AARCH64_INSN_RET, OPN, OPN, OPN, OPN)
 
#define i_rev16(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_REV16, op0, op1, OPN, OPN)
 
#define i_rev32(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_REV32, op0, op1, OPN, OPN)
 
#define i_shl(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_SHL, op0, op1, op2, OPN)
 
#define i_st1(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_ST1, op0, op1, OPN, OPN)
 
#define i_st2(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_ST2, op0, op1, OPN, OPN)
 
#define i_st3(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_ST3, op0, op1, OPN, OPN)
 
#define i_st4(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_ST4, op0, op1, OPN, OPN)
 
#define i_stp(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_STP, op0, op1, op2, OPN)
 
#define i_str(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_STR, op0, op1, OPN, OPN)
 
#define i_sub(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_SUB, op0, op1, op2, OPN)
 
#define i_subs(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_SUBS, op0, op1, op2, OPN)
 
#define i_tbl(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_TBL, op0, op1, op2, OPN)
 
#define i_ubfiz(rctx, op0, op1, op2, op3)   rasm_add_insn(rctx, AARCH64_INSN_UBFIZ, op0, op1, op2, op3)
 
#define i_ucvtf(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_UCVTF, op0, op1, OPN, OPN)
 
#define i_umax(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_UMAX, op0, op1, op2, OPN)
 
#define i_umin(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_UMIN, op0, op1, op2, OPN)
 
#define i_uqxtn(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_UQXTN, op0, op1, OPN, OPN)
 
#define i_ushl(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_USHL, op0, op1, op2, OPN)
 
#define i_ushll(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_USHLL, op0, op1, op2, OPN)
 
#define i_ushll2(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_USHLL2, op0, op1, op2, OPN)
 
#define i_ushr(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_USHR, op0, op1, op2, OPN)
 
#define i_uxtl(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_UXTL, op0, op1, OPN, OPN)
 
#define i_uxtl2(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_UXTL2, op0, op1, OPN, OPN)
 
#define i_xtn(rctx, op0, op1)   rasm_add_insn(rctx, AARCH64_INSN_XTN, op0, op1, OPN, OPN)
 
#define i_zip1(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_ZIP1, op0, op1, op2, OPN)
 
#define i_zip2(rctx, op0, op1, op2)   rasm_add_insn(rctx, AARCH64_INSN_ZIP2, op0, op1, op2, OPN)
 
#define i_beq(rctx, id)   i_b(rctx, a64cond_eq(), rasm_op_label(id))
 
#define i_bne(rctx, id)   i_b(rctx, a64cond_ne(), rasm_op_label(id))
 
#define i_bhs(rctx, id)   i_b(rctx, a64cond_hs(), rasm_op_label(id))
 
#define i_bcs(rctx, id)   i_b(rctx, a64cond_cs(), rasm_op_label(id))
 
#define i_blo(rctx, id)   i_b(rctx, a64cond_lo(), rasm_op_label(id))
 
#define i_bcc(rctx, id)   i_b(rctx, a64cond_cc(), rasm_op_label(id))
 
#define i_bmi(rctx, id)   i_b(rctx, a64cond_mi(), rasm_op_label(id))
 
#define i_bpl(rctx, id)   i_b(rctx, a64cond_pl(), rasm_op_label(id))
 
#define i_bvs(rctx, id)   i_b(rctx, a64cond_vs(), rasm_op_label(id))
 
#define i_bvc(rctx, id)   i_b(rctx, a64cond_vc(), rasm_op_label(id))
 
#define i_bhi(rctx, id)   i_b(rctx, a64cond_hi(), rasm_op_label(id))
 
#define i_bls(rctx, id)   i_b(rctx, a64cond_ls(), rasm_op_label(id))
 
#define i_bge(rctx, id)   i_b(rctx, a64cond_ge(), rasm_op_label(id))
 
#define i_blt(rctx, id)   i_b(rctx, a64cond_lt(), rasm_op_label(id))
 
#define i_bgt(rctx, id)   i_b(rctx, a64cond_gt(), rasm_op_label(id))
 
#define i_ble(rctx, id)   i_b(rctx, a64cond_le(), rasm_op_label(id))
 
#define i_mov16b(rctx, op0, op1)   i_mov(rctx, v_16b(op0), v_16b(op1))
 

Enumerations

enum  RasmOpType { RASM_OP_NONE = 0, RASM_OP_IMM, RASM_OP_LABEL, RASM_OP_NB }
 
enum  RasmNodeType {
  RASM_NODE_INSN, RASM_NODE_COMMENT, RASM_NODE_LABEL, RASM_NODE_FUNCTION,
  RASM_NODE_ENDFUNC, RASM_NODE_DIRECTIVE, RASM_NODE_DATA
}
 
enum  RasmEntryType { RASM_ENTRY_FUNC, RASM_ENTRY_DATA }
 
enum  AArch64InsnId {
  AARCH64_INSN_NONE = 0, AARCH64_INSN_ADD, AARCH64_INSN_ADDV, AARCH64_INSN_ADR,
  AARCH64_INSN_AND, AARCH64_INSN_B, AARCH64_INSN_BR, AARCH64_INSN_CMP,
  AARCH64_INSN_CSEL, AARCH64_INSN_DUP, AARCH64_INSN_FADD, AARCH64_INSN_FCVTZU,
  AARCH64_INSN_FMAX, AARCH64_INSN_FMIN, AARCH64_INSN_FMLA, AARCH64_INSN_FMUL,
  AARCH64_INSN_INS, AARCH64_INSN_LD1, AARCH64_INSN_LD1R, AARCH64_INSN_LD2,
  AARCH64_INSN_LD3, AARCH64_INSN_LD4, AARCH64_INSN_LDP, AARCH64_INSN_LDR,
  AARCH64_INSN_LDRB, AARCH64_INSN_LDRH, AARCH64_INSN_LSR, AARCH64_INSN_MOV,
  AARCH64_INSN_MOVI, AARCH64_INSN_MUL, AARCH64_INSN_ORR, AARCH64_INSN_RET,
  AARCH64_INSN_REV16, AARCH64_INSN_REV32, AARCH64_INSN_SHL, AARCH64_INSN_ST1,
  AARCH64_INSN_ST2, AARCH64_INSN_ST3, AARCH64_INSN_ST4, AARCH64_INSN_STP,
  AARCH64_INSN_STR, AARCH64_INSN_SUB, AARCH64_INSN_SUBS, AARCH64_INSN_TBL,
  AARCH64_INSN_UBFIZ, AARCH64_INSN_UCVTF, AARCH64_INSN_UMAX, AARCH64_INSN_UMIN,
  AARCH64_INSN_UQXTN, AARCH64_INSN_USHL, AARCH64_INSN_USHLL, AARCH64_INSN_USHLL2,
  AARCH64_INSN_USHR, AARCH64_INSN_UXTL, AARCH64_INSN_UXTL2, AARCH64_INSN_XTN,
  AARCH64_INSN_ZIP1, AARCH64_INSN_ZIP2, AARCH64_INSN_NB
}
 
enum  AArch64OpType {
  AARCH64_OP_GPR = RASM_OP_NB, AARCH64_OP_VEC, AARCH64_OP_BASE, AARCH64_OP_COND,
  AARCH64_OP_NB
}
 

Functions

static RasmOp rasm_op_new (int type)
 
static uint8_t rasm_op_type (RasmOp op)
 
static RasmOp rasm_op_none (void)
 
static RasmOp rasm_op_imm (int32_t val)
 
static int32_t rasm_op_imm_val (RasmOp op)
 
static RasmOp rasm_op_label (int id)
 
static int rasm_op_label_id (RasmOp op)
 
RasmContextrasm_alloc (void)
 
void rasm_free (RasmContext **prctx)
 
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,...) av_printf_format(4
 
RasmNode 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)
 
int rasm_new_label (RasmContext *rctx, const char *name)
 Allocate a new label ID with the given name. More...
 
int rasm_new_labelf (RasmContext *rctx, char *s, size_t n, const char *fmt,...) av_printf_format(4
 
int void rasm_annotate (RasmContext *rctx, const char *comment)
 
void rasm_annotatef (RasmContext *rctx, char *s, size_t n, const char *fmt,...) av_printf_format(4
 
void void rasm_annotate_next (RasmContext *rctx, const char *comment)
 
void rasm_annotate_nextf (RasmContext *rctx, char *s, size_t n, const char *fmt,...) av_printf_format(4
 
void int rasm_print (RasmContext *rctx, FILE *fp)
 
static RasmOp a64op_make_gpr (uint8_t n, uint8_t size)
 
static uint8_t a64op_gpr_n (RasmOp op)
 
static uint8_t a64op_gpr_size (RasmOp op)
 
static RasmOp a64op_gpw (uint8_t n)
 
static RasmOp a64op_gpx (uint8_t n)
 
static RasmOp a64op_sp (void)
 
static RasmOp a64op_w (RasmOp op)
 
static RasmOp a64op_x (RasmOp op)
 
static RasmOp a64op_make_vec (uint8_t n, uint8_t el_count, uint8_t el_size)
 
static uint8_t a64op_vec_n (RasmOp op)
 
static uint8_t a64op_vec_el_count (RasmOp op)
 
static uint8_t a64op_vec_el_size (RasmOp op)
 
static uint8_t a64op_vec_num_regs (RasmOp op)
 
static uint8_t a64op_vec_idx_p1 (RasmOp op)
 
static RasmOp a64op_vec (uint8_t n)
 
static RasmOp a64op_vecb (uint8_t n)
 
static RasmOp a64op_vech (uint8_t n)
 
static RasmOp a64op_vecs (uint8_t n)
 
static RasmOp a64op_vecd (uint8_t n)
 
static RasmOp a64op_vecq (uint8_t n)
 
static RasmOp a64op_vec8b (uint8_t n)
 
static RasmOp a64op_vec16b (uint8_t n)
 
static RasmOp a64op_vec4h (uint8_t n)
 
static RasmOp a64op_vec8h (uint8_t n)
 
static RasmOp a64op_vec2s (uint8_t n)
 
static RasmOp a64op_vec4s (uint8_t n)
 
static RasmOp a64op_vec2d (uint8_t n)
 
static RasmOp a64op_veclist (RasmOp op0, RasmOp op1, RasmOp op2, RasmOp op3)
 Create register-list operand for structured load/store instructions. More...
 
static RasmOp a64op_elem (RasmOp op, uint8_t idx)
 
static RasmOp v_b (RasmOp op)
 
static RasmOp v_h (RasmOp op)
 
static RasmOp v_s (RasmOp op)
 
static RasmOp v_d (RasmOp op)
 
static RasmOp v_q (RasmOp op)
 
static RasmOp v_8b (RasmOp op)
 
static RasmOp v_16b (RasmOp op)
 
static RasmOp v_4h (RasmOp op)
 
static RasmOp v_8h (RasmOp op)
 
static RasmOp v_2s (RasmOp op)
 
static RasmOp v_4s (RasmOp op)
 
static RasmOp v_2d (RasmOp op)
 
static RasmOp vv_1 (RasmOp op0)
 
static RasmOp vv_2 (RasmOp op0, RasmOp op1)
 
static RasmOp vv_3 (RasmOp op0, RasmOp op1, RasmOp op2)
 
static RasmOp vv_4 (RasmOp op0, RasmOp op1, RasmOp op2, RasmOp op3)
 
void a64op_vec_views (RasmOp op, AArch64VecViews *out)
 
static RasmOp a64op_make_base (uint8_t n, uint8_t mode, int16_t imm)
 
static int16_t a64op_base_imm (RasmOp op)
 
static uint8_t a64op_base_n (RasmOp op)
 
static uint8_t a64op_base_mode (RasmOp op)
 
static RasmOp a64op_base (RasmOp op)
 
static RasmOp a64op_off (RasmOp op, int16_t imm)
 
static RasmOp a64op_pre (RasmOp op, int16_t imm)
 
static RasmOp a64op_post (RasmOp op, int16_t imm)
 
static RasmOp a64op_cond (int cond)
 
static uint8_t a64op_cond_val (RasmOp op)
 
static RasmOp a64cond_eq (void)
 
static RasmOp a64cond_ne (void)
 
static RasmOp a64cond_hs (void)
 
static RasmOp a64cond_cs (void)
 
static RasmOp a64cond_lo (void)
 
static RasmOp a64cond_cc (void)
 
static RasmOp a64cond_mi (void)
 
static RasmOp a64cond_pl (void)
 
static RasmOp a64cond_vs (void)
 
static RasmOp a64cond_vc (void)
 
static RasmOp a64cond_hi (void)
 
static RasmOp a64cond_ls (void)
 
static RasmOp a64cond_ge (void)
 
static RasmOp a64cond_lt (void)
 
static RasmOp a64cond_gt (void)
 
static RasmOp a64cond_le (void)
 
static RasmOp a64cond_al (void)
 
static RasmOp a64cond_nv (void)
 

Macro Definition Documentation

◆ OPN

#define OPN   rasm_op_none()

Definition at line 75 of file rasm.h.

◆ IMM

#define IMM (   val)    rasm_op_imm(val)

Definition at line 91 of file rasm.h.

◆ AARCH64_COND_EQ

#define AARCH64_COND_EQ   0x0

Definition at line 318 of file rasm.h.

◆ AARCH64_COND_NE

#define AARCH64_COND_NE   0x1

Definition at line 319 of file rasm.h.

◆ AARCH64_COND_HS

#define AARCH64_COND_HS   0x2

Definition at line 320 of file rasm.h.

◆ AARCH64_COND_CS

#define AARCH64_COND_CS   AARCH64_COND_HS

Definition at line 321 of file rasm.h.

◆ AARCH64_COND_LO

#define AARCH64_COND_LO   0x3

Definition at line 322 of file rasm.h.

◆ AARCH64_COND_CC

#define AARCH64_COND_CC   AARCH64_COND_LO

Definition at line 323 of file rasm.h.

◆ AARCH64_COND_MI

#define AARCH64_COND_MI   0x4

Definition at line 324 of file rasm.h.

◆ AARCH64_COND_PL

#define AARCH64_COND_PL   0x5

Definition at line 325 of file rasm.h.

◆ AARCH64_COND_VS

#define AARCH64_COND_VS   0x6

Definition at line 326 of file rasm.h.

◆ AARCH64_COND_VC

#define AARCH64_COND_VC   0x7

Definition at line 327 of file rasm.h.

◆ AARCH64_COND_HI

#define AARCH64_COND_HI   0x8

Definition at line 328 of file rasm.h.

◆ AARCH64_COND_LS

#define AARCH64_COND_LS   0x9

Definition at line 329 of file rasm.h.

◆ AARCH64_COND_GE

#define AARCH64_COND_GE   0xa

Definition at line 330 of file rasm.h.

◆ AARCH64_COND_LT

#define AARCH64_COND_LT   0xb

Definition at line 331 of file rasm.h.

◆ AARCH64_COND_GT

#define AARCH64_COND_GT   0xc

Definition at line 332 of file rasm.h.

◆ AARCH64_COND_LE

#define AARCH64_COND_LE   0xd

Definition at line 333 of file rasm.h.

◆ AARCH64_COND_AL

#define AARCH64_COND_AL   0xe

Definition at line 334 of file rasm.h.

◆ AARCH64_COND_NV

#define AARCH64_COND_NV   0xf

Definition at line 335 of file rasm.h.

◆ AARCH64_BASE_OFFSET

#define AARCH64_BASE_OFFSET   0

Definition at line 478 of file rasm.h.

◆ AARCH64_BASE_PRE

#define AARCH64_BASE_PRE   1

Definition at line 479 of file rasm.h.

◆ AARCH64_BASE_POST

#define AARCH64_BASE_POST   2

Definition at line 480 of file rasm.h.

◆ i_none

#define i_none (   rctx)    rasm_add_insn(rctx, AARCH64_INSN_NONE, OPN, OPN, OPN, OPN)

Definition at line 534 of file rasm.h.

◆ i_add

#define i_add (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_ADD, op0, op1, op2, OPN)

Definition at line 536 of file rasm.h.

◆ i_addv

#define i_addv (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_ADDV, op0, op1, OPN, OPN)

Definition at line 537 of file rasm.h.

◆ i_adr

#define i_adr (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_ADR, op0, op1, OPN, OPN)

Definition at line 538 of file rasm.h.

◆ i_and

#define i_and (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_AND, op0, op1, op2, OPN)

Definition at line 539 of file rasm.h.

◆ i_b

#define i_b (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_B, op0, op1, OPN, OPN)

Definition at line 540 of file rasm.h.

◆ i_br

#define i_br (   rctx,
  op0 
)    rasm_add_insn(rctx, AARCH64_INSN_BR, op0, OPN, OPN, OPN)

Definition at line 541 of file rasm.h.

◆ i_cmp

#define i_cmp (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_CMP, op0, op1, OPN, OPN)

Definition at line 542 of file rasm.h.

◆ i_csel

#define i_csel (   rctx,
  op0,
  op1,
  op2,
  op3 
)    rasm_add_insn(rctx, AARCH64_INSN_CSEL, op0, op1, op2, op3)

Definition at line 543 of file rasm.h.

◆ i_dup

#define i_dup (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_DUP, op0, op1, OPN, OPN)

Definition at line 544 of file rasm.h.

◆ i_fadd

#define i_fadd (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_FADD, op0, op1, op2, OPN)

Definition at line 545 of file rasm.h.

◆ i_fcvtzu

#define i_fcvtzu (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_FCVTZU, op0, op1, OPN, OPN)

Definition at line 546 of file rasm.h.

◆ i_fmax

#define i_fmax (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_FMAX, op0, op1, op2, OPN)

Definition at line 547 of file rasm.h.

◆ i_fmin

#define i_fmin (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_FMIN, op0, op1, op2, OPN)

Definition at line 548 of file rasm.h.

◆ i_fmla

#define i_fmla (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_FMLA, op0, op1, op2, OPN)

Definition at line 549 of file rasm.h.

◆ i_fmul

#define i_fmul (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_FMUL, op0, op1, op2, OPN)

Definition at line 550 of file rasm.h.

◆ i_ins

#define i_ins (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_INS, op0, op1, OPN, OPN)

Definition at line 551 of file rasm.h.

◆ i_ld1

#define i_ld1 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LD1, op0, op1, OPN, OPN)

Definition at line 552 of file rasm.h.

◆ i_ld1r

#define i_ld1r (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LD1R, op0, op1, OPN, OPN)

Definition at line 553 of file rasm.h.

◆ i_ld2

#define i_ld2 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LD2, op0, op1, OPN, OPN)

Definition at line 554 of file rasm.h.

◆ i_ld3

#define i_ld3 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LD3, op0, op1, OPN, OPN)

Definition at line 555 of file rasm.h.

◆ i_ld4

#define i_ld4 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LD4, op0, op1, OPN, OPN)

Definition at line 556 of file rasm.h.

◆ i_ldp

#define i_ldp (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_LDP, op0, op1, op2, OPN)

Definition at line 557 of file rasm.h.

◆ i_ldr

#define i_ldr (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LDR, op0, op1, OPN, OPN)

Definition at line 558 of file rasm.h.

◆ i_ldrb

#define i_ldrb (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LDRB, op0, op1, OPN, OPN)

Definition at line 559 of file rasm.h.

◆ i_ldrh

#define i_ldrh (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_LDRH, op0, op1, OPN, OPN)

Definition at line 560 of file rasm.h.

◆ i_lsr

#define i_lsr (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_LSR, op0, op1, op2, OPN)

Definition at line 561 of file rasm.h.

◆ i_mov

#define i_mov (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_MOV, op0, op1, OPN, OPN)

Definition at line 562 of file rasm.h.

◆ i_movi

#define i_movi (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_MOVI, op0, op1, OPN, OPN)

Definition at line 563 of file rasm.h.

◆ i_mul

#define i_mul (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_MUL, op0, op1, op2, OPN)

Definition at line 564 of file rasm.h.

◆ i_orr

#define i_orr (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_ORR, op0, op1, op2, OPN)

Definition at line 565 of file rasm.h.

◆ i_ret

#define i_ret (   rctx)    rasm_add_insn(rctx, AARCH64_INSN_RET, OPN, OPN, OPN, OPN)

Definition at line 566 of file rasm.h.

◆ i_rev16

#define i_rev16 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_REV16, op0, op1, OPN, OPN)

Definition at line 567 of file rasm.h.

◆ i_rev32

#define i_rev32 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_REV32, op0, op1, OPN, OPN)

Definition at line 568 of file rasm.h.

◆ i_shl

#define i_shl (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_SHL, op0, op1, op2, OPN)

Definition at line 569 of file rasm.h.

◆ i_st1

#define i_st1 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_ST1, op0, op1, OPN, OPN)

Definition at line 570 of file rasm.h.

◆ i_st2

#define i_st2 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_ST2, op0, op1, OPN, OPN)

Definition at line 571 of file rasm.h.

◆ i_st3

#define i_st3 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_ST3, op0, op1, OPN, OPN)

Definition at line 572 of file rasm.h.

◆ i_st4

#define i_st4 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_ST4, op0, op1, OPN, OPN)

Definition at line 573 of file rasm.h.

◆ i_stp

#define i_stp (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_STP, op0, op1, op2, OPN)

Definition at line 574 of file rasm.h.

◆ i_str

#define i_str (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_STR, op0, op1, OPN, OPN)

Definition at line 575 of file rasm.h.

◆ i_sub

#define i_sub (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_SUB, op0, op1, op2, OPN)

Definition at line 576 of file rasm.h.

◆ i_subs

#define i_subs (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_SUBS, op0, op1, op2, OPN)

Definition at line 577 of file rasm.h.

◆ i_tbl

#define i_tbl (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_TBL, op0, op1, op2, OPN)

Definition at line 578 of file rasm.h.

◆ i_ubfiz

#define i_ubfiz (   rctx,
  op0,
  op1,
  op2,
  op3 
)    rasm_add_insn(rctx, AARCH64_INSN_UBFIZ, op0, op1, op2, op3)

Definition at line 579 of file rasm.h.

◆ i_ucvtf

#define i_ucvtf (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_UCVTF, op0, op1, OPN, OPN)

Definition at line 580 of file rasm.h.

◆ i_umax

#define i_umax (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_UMAX, op0, op1, op2, OPN)

Definition at line 581 of file rasm.h.

◆ i_umin

#define i_umin (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_UMIN, op0, op1, op2, OPN)

Definition at line 582 of file rasm.h.

◆ i_uqxtn

#define i_uqxtn (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_UQXTN, op0, op1, OPN, OPN)

Definition at line 583 of file rasm.h.

◆ i_ushl

#define i_ushl (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_USHL, op0, op1, op2, OPN)

Definition at line 584 of file rasm.h.

◆ i_ushll

#define i_ushll (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_USHLL, op0, op1, op2, OPN)

Definition at line 585 of file rasm.h.

◆ i_ushll2

#define i_ushll2 (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_USHLL2, op0, op1, op2, OPN)

Definition at line 586 of file rasm.h.

◆ i_ushr

#define i_ushr (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_USHR, op0, op1, op2, OPN)

Definition at line 587 of file rasm.h.

◆ i_uxtl

#define i_uxtl (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_UXTL, op0, op1, OPN, OPN)

Definition at line 588 of file rasm.h.

◆ i_uxtl2

#define i_uxtl2 (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_UXTL2, op0, op1, OPN, OPN)

Definition at line 589 of file rasm.h.

◆ i_xtn

#define i_xtn (   rctx,
  op0,
  op1 
)    rasm_add_insn(rctx, AARCH64_INSN_XTN, op0, op1, OPN, OPN)

Definition at line 590 of file rasm.h.

◆ i_zip1

#define i_zip1 (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_ZIP1, op0, op1, op2, OPN)

Definition at line 591 of file rasm.h.

◆ i_zip2

#define i_zip2 (   rctx,
  op0,
  op1,
  op2 
)    rasm_add_insn(rctx, AARCH64_INSN_ZIP2, op0, op1, op2, OPN)

Definition at line 592 of file rasm.h.

◆ i_beq

#define i_beq (   rctx,
  id 
)    i_b(rctx, a64cond_eq(), rasm_op_label(id))

Definition at line 595 of file rasm.h.

◆ i_bne

#define i_bne (   rctx,
  id 
)    i_b(rctx, a64cond_ne(), rasm_op_label(id))

Definition at line 596 of file rasm.h.

◆ i_bhs

#define i_bhs (   rctx,
  id 
)    i_b(rctx, a64cond_hs(), rasm_op_label(id))

Definition at line 597 of file rasm.h.

◆ i_bcs

#define i_bcs (   rctx,
  id 
)    i_b(rctx, a64cond_cs(), rasm_op_label(id))

Definition at line 598 of file rasm.h.

◆ i_blo

#define i_blo (   rctx,
  id 
)    i_b(rctx, a64cond_lo(), rasm_op_label(id))

Definition at line 599 of file rasm.h.

◆ i_bcc

#define i_bcc (   rctx,
  id 
)    i_b(rctx, a64cond_cc(), rasm_op_label(id))

Definition at line 600 of file rasm.h.

◆ i_bmi

#define i_bmi (   rctx,
  id 
)    i_b(rctx, a64cond_mi(), rasm_op_label(id))

Definition at line 601 of file rasm.h.

◆ i_bpl

#define i_bpl (   rctx,
  id 
)    i_b(rctx, a64cond_pl(), rasm_op_label(id))

Definition at line 602 of file rasm.h.

◆ i_bvs

#define i_bvs (   rctx,
  id 
)    i_b(rctx, a64cond_vs(), rasm_op_label(id))

Definition at line 603 of file rasm.h.

◆ i_bvc

#define i_bvc (   rctx,
  id 
)    i_b(rctx, a64cond_vc(), rasm_op_label(id))

Definition at line 604 of file rasm.h.

◆ i_bhi

#define i_bhi (   rctx,
  id 
)    i_b(rctx, a64cond_hi(), rasm_op_label(id))

Definition at line 605 of file rasm.h.

◆ i_bls

#define i_bls (   rctx,
  id 
)    i_b(rctx, a64cond_ls(), rasm_op_label(id))

Definition at line 606 of file rasm.h.

◆ i_bge

#define i_bge (   rctx,
  id 
)    i_b(rctx, a64cond_ge(), rasm_op_label(id))

Definition at line 607 of file rasm.h.

◆ i_blt

#define i_blt (   rctx,
  id 
)    i_b(rctx, a64cond_lt(), rasm_op_label(id))

Definition at line 608 of file rasm.h.

◆ i_bgt

#define i_bgt (   rctx,
  id 
)    i_b(rctx, a64cond_gt(), rasm_op_label(id))

Definition at line 609 of file rasm.h.

◆ i_ble

#define i_ble (   rctx,
  id 
)    i_b(rctx, a64cond_le(), rasm_op_label(id))

Definition at line 610 of file rasm.h.

◆ i_mov16b

#define i_mov16b (   rctx,
  op0,
  op1 
)    i_mov(rctx, v_16b(op0), v_16b(op1))

Definition at line 613 of file rasm.h.

Enumeration Type Documentation

◆ RasmOpType

enum RasmOpType
Enumerator
RASM_OP_NONE 
RASM_OP_IMM 
RASM_OP_LABEL 
RASM_OP_NB 

Definition at line 61 of file rasm.h.

◆ RasmNodeType

Enumerator
RASM_NODE_INSN 
RASM_NODE_COMMENT 
RASM_NODE_LABEL 
RASM_NODE_FUNCTION 
RASM_NODE_ENDFUNC 
RASM_NODE_DIRECTIVE 
RASM_NODE_DATA 

Definition at line 110 of file rasm.h.

◆ RasmEntryType

Enumerator
RASM_ENTRY_FUNC 
RASM_ENTRY_DATA 

Definition at line 161 of file rasm.h.

◆ AArch64InsnId

Enumerator
AARCH64_INSN_NONE 
AARCH64_INSN_ADD 
AARCH64_INSN_ADDV 
AARCH64_INSN_ADR 
AARCH64_INSN_AND 
AARCH64_INSN_B 
AARCH64_INSN_BR 
AARCH64_INSN_CMP 
AARCH64_INSN_CSEL 
AARCH64_INSN_DUP 
AARCH64_INSN_FADD 
AARCH64_INSN_FCVTZU 
AARCH64_INSN_FMAX 
AARCH64_INSN_FMIN 
AARCH64_INSN_FMLA 
AARCH64_INSN_FMUL 
AARCH64_INSN_INS 
AARCH64_INSN_LD1 
AARCH64_INSN_LD1R 
AARCH64_INSN_LD2 
AARCH64_INSN_LD3 
AARCH64_INSN_LD4 
AARCH64_INSN_LDP 
AARCH64_INSN_LDR 
AARCH64_INSN_LDRB 
AARCH64_INSN_LDRH 
AARCH64_INSN_LSR 
AARCH64_INSN_MOV 
AARCH64_INSN_MOVI 
AARCH64_INSN_MUL 
AARCH64_INSN_ORR 
AARCH64_INSN_RET 
AARCH64_INSN_REV16 
AARCH64_INSN_REV32 
AARCH64_INSN_SHL 
AARCH64_INSN_ST1 
AARCH64_INSN_ST2 
AARCH64_INSN_ST3 
AARCH64_INSN_ST4 
AARCH64_INSN_STP 
AARCH64_INSN_STR 
AARCH64_INSN_SUB 
AARCH64_INSN_SUBS 
AARCH64_INSN_TBL 
AARCH64_INSN_UBFIZ 
AARCH64_INSN_UCVTF 
AARCH64_INSN_UMAX 
AARCH64_INSN_UMIN 
AARCH64_INSN_UQXTN 
AARCH64_INSN_USHL 
AARCH64_INSN_USHLL 
AARCH64_INSN_USHLL2 
AARCH64_INSN_USHR 
AARCH64_INSN_UXTL 
AARCH64_INSN_UXTL2 
AARCH64_INSN_XTN 
AARCH64_INSN_ZIP1 
AARCH64_INSN_ZIP2 
AARCH64_INSN_NB 

Definition at line 243 of file rasm.h.

◆ AArch64OpType

Enumerator
AARCH64_OP_GPR 
AARCH64_OP_VEC 
AARCH64_OP_BASE 
AARCH64_OP_COND 
AARCH64_OP_NB 

Definition at line 308 of file rasm.h.

Function Documentation

◆ rasm_op_new()

static RasmOp rasm_op_new ( int  type)
inlinestatic

◆ rasm_op_type()

static uint8_t rasm_op_type ( RasmOp  op)
inlinestatic

Definition at line 57 of file rasm.h.

Referenced by a64op_veclist(), print_node_insn(), and print_op().

◆ rasm_op_none()

static RasmOp rasm_op_none ( void  )
inlinestatic

Definition at line 70 of file rasm.h.

◆ rasm_op_imm()

static RasmOp rasm_op_imm ( int32_t  val)
inlinestatic

Definition at line 79 of file rasm.h.

◆ rasm_op_imm_val()

static int32_t rasm_op_imm_val ( RasmOp  op)
inlinestatic

Definition at line 86 of file rasm.h.

Referenced by print_op_imm().

◆ rasm_op_label()

static RasmOp rasm_op_label ( int  id)
inlinestatic

Definition at line 95 of file rasm.h.

◆ rasm_op_label_id()

static int rasm_op_label_id ( RasmOp  op)
inlinestatic

Definition at line 102 of file rasm.h.

Referenced by print_op_label().

◆ 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().

◆ 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,
  ... 
)

◆ rasm_add_label()

RasmNode RasmNode* rasm_add_label ( RasmContext rctx,
int  id 
)

Definition at line 146 of file rasm.c.

Referenced by asmgen_process_return().

◆ 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_func_begin().

◆ rasm_add_endfunc()

RasmNode* rasm_add_endfunc ( RasmContext rctx)

Definition at line 168 of file rasm.c.

Referenced by rasm_func_begin().

◆ rasm_add_directive()

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

Definition at line 174 of file rasm.c.

◆ rasm_get_current_node()

RasmNode* rasm_get_current_node ( RasmContext rctx)

Definition at line 194 of file rasm.c.

Referenced by linear_pass().

◆ rasm_set_current_node()

RasmNode* rasm_set_current_node ( RasmContext rctx,
RasmNode node 
)

Definition at line 199 of file rasm.c.

Referenced by linear_pass(), and rasm_func_begin().

◆ 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(), and asmgen_process_return().

◆ 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_return(), rasm_func_begin(), and rasm_new_labelf().

◆ rasm_new_labelf()

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

◆ rasm_annotate()

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

Definition at line 243 of file rasm.c.

Referenced by rasm_annotatef().

◆ rasm_annotatef()

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

◆ rasm_annotate_next()

void 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,
  ... 
)

◆ rasm_print()

void int rasm_print ( RasmContext rctx,
FILE *  fp 
)

Definition at line 430 of file rasm_print.c.

Referenced by asmgen().

◆ a64op_make_gpr()

static RasmOp a64op_make_gpr ( uint8_t  n,
uint8_t  size 
)
inlinestatic

Definition at line 340 of file rasm.h.

Referenced by a64op_gpw(), a64op_gpx(), and a64op_sp().

◆ a64op_gpr_n()

static uint8_t a64op_gpr_n ( RasmOp  op)
inlinestatic

◆ a64op_gpr_size()

static uint8_t a64op_gpr_size ( RasmOp  op)
inlinestatic

Definition at line 349 of file rasm.h.

Referenced by print_op_gpr().

◆ a64op_gpw()

static RasmOp a64op_gpw ( uint8_t  n)
inlinestatic

Definition at line 351 of file rasm.h.

Referenced by a64op_w(), and asmgen().

◆ a64op_gpx()

static RasmOp a64op_gpx ( uint8_t  n)
inlinestatic

Definition at line 352 of file rasm.h.

Referenced by a64op_x(), and asmgen().

◆ a64op_sp()

static RasmOp a64op_sp ( void  )
inlinestatic

Definition at line 353 of file rasm.h.

Referenced by asmgen_epilogue(), and asmgen_prologue().

◆ a64op_w()

static RasmOp a64op_w ( RasmOp  op)
inlinestatic

Definition at line 356 of file rasm.h.

Referenced by asmgen_op_dither(), asmgen_op_read_bit(), and asmgen_op_unpack().

◆ a64op_x()

static RasmOp a64op_x ( RasmOp  op)
inlinestatic

Definition at line 357 of file rasm.h.

Referenced by asmgen_op_dither().

◆ a64op_make_vec()

static RasmOp a64op_make_vec ( uint8_t  n,
uint8_t  el_count,
uint8_t  el_size 
)
inlinestatic

◆ a64op_vec_n()

static uint8_t a64op_vec_n ( RasmOp  op)
inlinestatic

◆ a64op_vec_el_count()

static uint8_t a64op_vec_el_count ( RasmOp  op)
inlinestatic

Definition at line 374 of file rasm.h.

Referenced by print_op_vec().

◆ a64op_vec_el_size()

static uint8_t a64op_vec_el_size ( RasmOp  op)
inlinestatic

Definition at line 375 of file rasm.h.

Referenced by print_op_vec().

◆ a64op_vec_num_regs()

static uint8_t a64op_vec_num_regs ( RasmOp  op)
inlinestatic

Definition at line 376 of file rasm.h.

Referenced by print_op_vec().

◆ a64op_vec_idx_p1()

static uint8_t a64op_vec_idx_p1 ( RasmOp  op)
inlinestatic

Definition at line 377 of file rasm.h.

Referenced by print_op_vec().

◆ a64op_vec()

static RasmOp a64op_vec ( uint8_t  n)
inlinestatic

Definition at line 379 of file rasm.h.

◆ a64op_vecb()

static RasmOp a64op_vecb ( uint8_t  n)
inlinestatic

Definition at line 380 of file rasm.h.

Referenced by a64op_vec_views(), and v_b().

◆ a64op_vech()

static RasmOp a64op_vech ( uint8_t  n)
inlinestatic

Definition at line 381 of file rasm.h.

Referenced by a64op_vec_views(), and v_h().

◆ a64op_vecs()

static RasmOp a64op_vecs ( uint8_t  n)
inlinestatic

Definition at line 382 of file rasm.h.

Referenced by a64op_vec_views(), and v_s().

◆ a64op_vecd()

static RasmOp a64op_vecd ( uint8_t  n)
inlinestatic

Definition at line 383 of file rasm.h.

Referenced by a64op_vec_views(), and v_d().

◆ a64op_vecq()

static RasmOp a64op_vecq ( uint8_t  n)
inlinestatic

Definition at line 384 of file rasm.h.

Referenced by a64op_vec_views(), and v_q().

◆ a64op_vec8b()

static RasmOp a64op_vec8b ( uint8_t  n)
inlinestatic

Definition at line 385 of file rasm.h.

Referenced by a64op_vec_views(), and v_8b().

◆ a64op_vec16b()

static RasmOp a64op_vec16b ( uint8_t  n)
inlinestatic

Definition at line 386 of file rasm.h.

Referenced by a64op_vec_views(), and v_16b().

◆ a64op_vec4h()

static RasmOp a64op_vec4h ( uint8_t  n)
inlinestatic

Definition at line 387 of file rasm.h.

Referenced by a64op_vec_views(), and v_4h().

◆ a64op_vec8h()

static RasmOp a64op_vec8h ( uint8_t  n)
inlinestatic

Definition at line 388 of file rasm.h.

Referenced by a64op_vec_views(), and v_8h().

◆ a64op_vec2s()

static RasmOp a64op_vec2s ( uint8_t  n)
inlinestatic

Definition at line 389 of file rasm.h.

Referenced by a64op_vec_views(), and v_2s().

◆ a64op_vec4s()

static RasmOp a64op_vec4s ( uint8_t  n)
inlinestatic

Definition at line 390 of file rasm.h.

Referenced by a64op_vec_views(), and v_4s().

◆ a64op_vec2d()

static RasmOp a64op_vec2d ( uint8_t  n)
inlinestatic

Definition at line 391 of file rasm.h.

Referenced by a64op_vec_views(), and v_2d().

◆ a64op_veclist()

static RasmOp a64op_veclist ( RasmOp  op0,
RasmOp  op1,
RasmOp  op2,
RasmOp  op3 
)
inlinestatic

Create register-list operand for structured load/store instructions.

Registers must be consecutive.

Definition at line 397 of file rasm.h.

Referenced by vv_1(), vv_2(), vv_3(), and vv_4().

◆ a64op_elem()

static RasmOp a64op_elem ( RasmOp  op,
uint8_t  idx 
)
inlinestatic

Definition at line 418 of file rasm.h.

Referenced by a64op_vec_views(), asmgen_op_clear(), asmgen_op_max(), asmgen_op_min(), and linear_pass().

◆ v_b()

static RasmOp v_b ( RasmOp  op)
inlinestatic

Definition at line 426 of file rasm.h.

Referenced by optimize_colors().

◆ v_h()

static RasmOp v_h ( RasmOp  op)
inlinestatic

◆ v_s()

static RasmOp v_s ( RasmOp  op)
inlinestatic

Definition at line 428 of file rasm.h.

◆ v_d()

static RasmOp v_d ( RasmOp  op)
inlinestatic

Definition at line 429 of file rasm.h.

◆ v_q()

static RasmOp v_q ( RasmOp  op)
inlinestatic

Definition at line 430 of file rasm.h.

Referenced by asmgen_op_clear(), asmgen_op_dither(), asmgen_op_max(), and asmgen_op_min().

◆ v_8b()

static RasmOp v_8b ( RasmOp  op)
inlinestatic

Definition at line 433 of file rasm.h.

Referenced by asmgen_op_read_nibble().

◆ v_16b()

static RasmOp v_16b ( RasmOp  op)
inlinestatic

Definition at line 434 of file rasm.h.

◆ v_4h()

static RasmOp v_4h ( RasmOp  op)
inlinestatic

Definition at line 435 of file rasm.h.

◆ v_8h()

static RasmOp v_8h ( RasmOp  op)
inlinestatic

Definition at line 436 of file rasm.h.

◆ v_2s()

static RasmOp v_2s ( RasmOp  op)
inlinestatic

Definition at line 437 of file rasm.h.

◆ v_4s()

static RasmOp v_4s ( RasmOp  op)
inlinestatic

Definition at line 438 of file rasm.h.

◆ v_2d()

static RasmOp v_2d ( RasmOp  op)
inlinestatic

Definition at line 439 of file rasm.h.

◆ vv_1()

static RasmOp vv_1 ( RasmOp  op0)
inlinestatic

Definition at line 442 of file rasm.h.

Referenced by asmgen_op_linear(), and asmgen_op_scale().

◆ vv_2()

static RasmOp vv_2 ( RasmOp  op0,
RasmOp  op1 
)
inlinestatic

Definition at line 443 of file rasm.h.

Referenced by asmgen_op_linear(), asmgen_op_read_packed_n(), and asmgen_op_write_packed_n().

◆ vv_3()

static RasmOp vv_3 ( RasmOp  op0,
RasmOp  op1,
RasmOp  op2 
)
inlinestatic

Definition at line 444 of file rasm.h.

Referenced by asmgen_op_linear(), asmgen_op_read_packed_n(), and asmgen_op_write_packed_n().

◆ vv_4()

static RasmOp vv_4 ( RasmOp  op0,
RasmOp  op1,
RasmOp  op2,
RasmOp  op3 
)
inlinestatic

Definition at line 445 of file rasm.h.

Referenced by asmgen_op_linear(), asmgen_op_read_packed_n(), and asmgen_op_write_packed_n().

◆ a64op_vec_views()

void a64op_vec_views ( RasmOp  op,
AArch64VecViews out 
)

◆ a64op_make_base()

static RasmOp a64op_make_base ( uint8_t  n,
uint8_t  mode,
int16_t  imm 
)
inlinestatic

Definition at line 482 of file rasm.h.

Referenced by a64op_base(), a64op_off(), a64op_post(), and a64op_pre().

◆ a64op_base_imm()

static int16_t a64op_base_imm ( RasmOp  op)
inlinestatic

Definition at line 491 of file rasm.h.

Referenced by print_op_base().

◆ a64op_base_n()

static uint8_t a64op_base_n ( RasmOp  op)
inlinestatic

Definition at line 492 of file rasm.h.

Referenced by print_op_base().

◆ a64op_base_mode()

static uint8_t a64op_base_mode ( RasmOp  op)
inlinestatic

Definition at line 493 of file rasm.h.

Referenced by print_op_base().

◆ a64op_base()

static RasmOp a64op_base ( RasmOp  op)
inlinestatic

Definition at line 495 of file rasm.h.

Referenced by asmgen_op_dither(), asmgen_op_linear(), and asmgen_op_scale().

◆ a64op_off()

static RasmOp a64op_off ( RasmOp  op,
int16_t  imm 
)
inlinestatic

◆ a64op_pre()

static RasmOp a64op_pre ( RasmOp  op,
int16_t  imm 
)
inlinestatic

Definition at line 497 of file rasm.h.

Referenced by asmgen_prologue().

◆ a64op_post()

static RasmOp a64op_post ( RasmOp  op,
int16_t  imm 
)
inlinestatic

◆ a64op_cond()

static RasmOp a64op_cond ( int  cond)
inlinestatic

◆ a64op_cond_val()

static uint8_t a64op_cond_val ( RasmOp  op)
inlinestatic

Definition at line 510 of file rasm.h.

Referenced by print_node_insn(), and print_op_cond().

◆ a64cond_eq()

static RasmOp a64cond_eq ( void  )
inlinestatic

Definition at line 512 of file rasm.h.

◆ a64cond_ne()

static RasmOp a64cond_ne ( void  )
inlinestatic

Definition at line 513 of file rasm.h.

◆ a64cond_hs()

static RasmOp a64cond_hs ( void  )
inlinestatic

Definition at line 514 of file rasm.h.

◆ a64cond_cs()

static RasmOp a64cond_cs ( void  )
inlinestatic

Definition at line 515 of file rasm.h.

◆ a64cond_lo()

static RasmOp a64cond_lo ( void  )
inlinestatic

Definition at line 516 of file rasm.h.

◆ a64cond_cc()

static RasmOp a64cond_cc ( void  )
inlinestatic

Definition at line 517 of file rasm.h.

◆ a64cond_mi()

static RasmOp a64cond_mi ( void  )
inlinestatic

Definition at line 518 of file rasm.h.

◆ a64cond_pl()

static RasmOp a64cond_pl ( void  )
inlinestatic

Definition at line 519 of file rasm.h.

◆ a64cond_vs()

static RasmOp a64cond_vs ( void  )
inlinestatic

Definition at line 520 of file rasm.h.

◆ a64cond_vc()

static RasmOp a64cond_vc ( void  )
inlinestatic

Definition at line 521 of file rasm.h.

◆ a64cond_hi()

static RasmOp a64cond_hi ( void  )
inlinestatic

Definition at line 522 of file rasm.h.

◆ a64cond_ls()

static RasmOp a64cond_ls ( void  )
inlinestatic

Definition at line 523 of file rasm.h.

◆ a64cond_ge()

static RasmOp a64cond_ge ( void  )
inlinestatic

Definition at line 524 of file rasm.h.

◆ a64cond_lt()

static RasmOp a64cond_lt ( void  )
inlinestatic

Definition at line 525 of file rasm.h.

◆ a64cond_gt()

static RasmOp a64cond_gt ( void  )
inlinestatic

Definition at line 526 of file rasm.h.

◆ a64cond_le()

static RasmOp a64cond_le ( void  )
inlinestatic

Definition at line 527 of file rasm.h.

◆ a64cond_al()

static RasmOp a64cond_al ( void  )
inlinestatic

Definition at line 528 of file rasm.h.

◆ a64cond_nv()

static RasmOp a64cond_nv ( void  )
inlinestatic

Definition at line 529 of file rasm.h.