Numworks Epsilon  1.4.1
Graphing Calculator Operating System
asmxtensa.h File Reference
#include "py/asmbase.h"

Go to the source code of this file.

Classes

struct  _asm_xtensa_t
 

Macros

#define ASM_XTENSA_REG_A0   (0)
 
#define ASM_XTENSA_REG_A1   (1)
 
#define ASM_XTENSA_REG_A2   (2)
 
#define ASM_XTENSA_REG_A3   (3)
 
#define ASM_XTENSA_REG_A4   (4)
 
#define ASM_XTENSA_REG_A5   (5)
 
#define ASM_XTENSA_REG_A6   (6)
 
#define ASM_XTENSA_REG_A7   (7)
 
#define ASM_XTENSA_REG_A8   (8)
 
#define ASM_XTENSA_REG_A9   (9)
 
#define ASM_XTENSA_REG_A10   (10)
 
#define ASM_XTENSA_REG_A11   (11)
 
#define ASM_XTENSA_REG_A12   (12)
 
#define ASM_XTENSA_REG_A13   (13)
 
#define ASM_XTENSA_REG_A14   (14)
 
#define ASM_XTENSA_REG_A15   (15)
 
#define ASM_XTENSA_CCZ_EQ   (0)
 
#define ASM_XTENSA_CCZ_NE   (1)
 
#define ASM_XTENSA_CC_NONE   (0)
 
#define ASM_XTENSA_CC_EQ   (1)
 
#define ASM_XTENSA_CC_LT   (2)
 
#define ASM_XTENSA_CC_LTU   (3)
 
#define ASM_XTENSA_CC_ALL   (4)
 
#define ASM_XTENSA_CC_BC   (5)
 
#define ASM_XTENSA_CC_ANY   (8)
 
#define ASM_XTENSA_CC_NE   (9)
 
#define ASM_XTENSA_CC_GE   (10)
 
#define ASM_XTENSA_CC_GEU   (11)
 
#define ASM_XTENSA_CC_NALL   (12)
 
#define ASM_XTENSA_CC_BS   (13)
 
#define ASM_XTENSA_ENCODE_RRR(op0, op1, op2, r, s, t)   ((((uint32_t)op2) << 20) | (((uint32_t)op1) << 16) | ((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_RRI4(op0, op1, r, s, t, imm4)   (((imm4) << 20) | ((op1) << 16) | ((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_RRI8(op0, r, s, t, imm8)   ((((uint32_t)imm8) << 16) | ((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_RI16(op0, t, imm16)   (((imm16) << 8) | ((t) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_RSR(op0, op1, op2, rs, t)   (((op2) << 20) | ((op1) << 16) | ((rs) << 8) | ((t) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_CALL(op0, n, offset)   (((offset) << 6) | ((n) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_CALLX(op0, op1, op2, r, s, m, n)   ((((uint32_t)op2) << 20) | (((uint32_t)op1) << 16) | ((r) << 12) | ((s) << 8) | ((m) << 6) | ((n) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_BRI8(op0, r, s, m, n, imm8)   (((imm8) << 16) | ((r) << 12) | ((s) << 8) | ((m) << 6) | ((n) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_BRI12(op0, s, m, n, imm12)   (((imm12) << 12) | ((s) << 8) | ((m) << 6) | ((n) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_RRRN(op0, r, s, t)   (((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))
 
#define ASM_XTENSA_ENCODE_RI7(op0, s, imm7)   ((((imm7) & 0xf) << 12) | ((s) << 8) | ((imm7) & 0x70) | (op0))
 

Typedefs

typedef struct _asm_xtensa_t asm_xtensa_t
 

Functions

void asm_xtensa_end_pass (asm_xtensa_t *as)
 
void asm_xtensa_entry (asm_xtensa_t *as, int num_locals)
 
void asm_xtensa_exit (asm_xtensa_t *as)
 
void asm_xtensa_op16 (asm_xtensa_t *as, uint16_t op)
 
void asm_xtensa_op24 (asm_xtensa_t *as, uint32_t op)
 
void asm_xtensa_j_label (asm_xtensa_t *as, uint label)
 
void asm_xtensa_bccz_reg_label (asm_xtensa_t *as, uint cond, uint reg, uint label)
 
void asm_xtensa_bcc_reg_reg_label (asm_xtensa_t *as, uint cond, uint reg1, uint reg2, uint label)
 
void asm_xtensa_setcc_reg_reg_reg (asm_xtensa_t *as, uint cond, uint reg_dest, uint reg_src1, uint reg_src2)
 
void asm_xtensa_mov_reg_i32 (asm_xtensa_t *as, uint reg_dest, uint32_t i32)
 
void asm_xtensa_mov_local_reg (asm_xtensa_t *as, int local_num, uint reg_src)
 
void asm_xtensa_mov_reg_local (asm_xtensa_t *as, uint reg_dest, int local_num)
 
void asm_xtensa_mov_reg_local_addr (asm_xtensa_t *as, uint reg_dest, int local_num)
 

Macro Definition Documentation

◆ ASM_XTENSA_CC_ALL

#define ASM_XTENSA_CC_ALL   (4)

Definition at line 65 of file asmxtensa.h.

◆ ASM_XTENSA_CC_ANY

#define ASM_XTENSA_CC_ANY   (8)

Definition at line 67 of file asmxtensa.h.

◆ ASM_XTENSA_CC_BC

#define ASM_XTENSA_CC_BC   (5)

Definition at line 66 of file asmxtensa.h.

◆ ASM_XTENSA_CC_BS

#define ASM_XTENSA_CC_BS   (13)

Definition at line 72 of file asmxtensa.h.

◆ ASM_XTENSA_CC_EQ

#define ASM_XTENSA_CC_EQ   (1)

Definition at line 62 of file asmxtensa.h.

◆ ASM_XTENSA_CC_GE

#define ASM_XTENSA_CC_GE   (10)

Definition at line 69 of file asmxtensa.h.

◆ ASM_XTENSA_CC_GEU

#define ASM_XTENSA_CC_GEU   (11)

Definition at line 70 of file asmxtensa.h.

◆ ASM_XTENSA_CC_LT

#define ASM_XTENSA_CC_LT   (2)

Definition at line 63 of file asmxtensa.h.

◆ ASM_XTENSA_CC_LTU

#define ASM_XTENSA_CC_LTU   (3)

Definition at line 64 of file asmxtensa.h.

◆ ASM_XTENSA_CC_NALL

#define ASM_XTENSA_CC_NALL   (12)

Definition at line 71 of file asmxtensa.h.

◆ ASM_XTENSA_CC_NE

#define ASM_XTENSA_CC_NE   (9)

Definition at line 68 of file asmxtensa.h.

◆ ASM_XTENSA_CC_NONE

#define ASM_XTENSA_CC_NONE   (0)

Definition at line 61 of file asmxtensa.h.

◆ ASM_XTENSA_CCZ_EQ

#define ASM_XTENSA_CCZ_EQ   (0)

Definition at line 57 of file asmxtensa.h.

◆ ASM_XTENSA_CCZ_NE

#define ASM_XTENSA_CCZ_NE   (1)

Definition at line 58 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_BRI12

#define ASM_XTENSA_ENCODE_BRI12 (   op0,
  s,
  m,
  n,
  imm12 
)    (((imm12) << 12) | ((s) << 8) | ((m) << 6) | ((n) << 4) | (op0))

Definition at line 91 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_BRI8

#define ASM_XTENSA_ENCODE_BRI8 (   op0,
  r,
  s,
  m,
  n,
  imm8 
)    (((imm8) << 16) | ((r) << 12) | ((s) << 8) | ((m) << 6) | ((n) << 4) | (op0))

Definition at line 89 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_CALL

#define ASM_XTENSA_ENCODE_CALL (   op0,
  n,
  offset 
)    (((offset) << 6) | ((n) << 4) | (op0))

Definition at line 85 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_CALLX

#define ASM_XTENSA_ENCODE_CALLX (   op0,
  op1,
  op2,
  r,
  s,
  m,
 
)    ((((uint32_t)op2) << 20) | (((uint32_t)op1) << 16) | ((r) << 12) | ((s) << 8) | ((m) << 6) | ((n) << 4) | (op0))

Definition at line 87 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_RI16

#define ASM_XTENSA_ENCODE_RI16 (   op0,
  t,
  imm16 
)    (((imm16) << 8) | ((t) << 4) | (op0))

Definition at line 81 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_RI7

#define ASM_XTENSA_ENCODE_RI7 (   op0,
  s,
  imm7 
)    ((((imm7) & 0xf) << 12) | ((s) << 8) | ((imm7) & 0x70) | (op0))

Definition at line 95 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_RRI4

#define ASM_XTENSA_ENCODE_RRI4 (   op0,
  op1,
  r,
  s,
  t,
  imm4 
)    (((imm4) << 20) | ((op1) << 16) | ((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))

Definition at line 77 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_RRI8

#define ASM_XTENSA_ENCODE_RRI8 (   op0,
  r,
  s,
  t,
  imm8 
)    ((((uint32_t)imm8) << 16) | ((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))

Definition at line 79 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_RRR

#define ASM_XTENSA_ENCODE_RRR (   op0,
  op1,
  op2,
  r,
  s,
 
)    ((((uint32_t)op2) << 20) | (((uint32_t)op1) << 16) | ((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))

Definition at line 75 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_RRRN

#define ASM_XTENSA_ENCODE_RRRN (   op0,
  r,
  s,
 
)    (((r) << 12) | ((s) << 8) | ((t) << 4) | (op0))

Definition at line 93 of file asmxtensa.h.

◆ ASM_XTENSA_ENCODE_RSR

#define ASM_XTENSA_ENCODE_RSR (   op0,
  op1,
  op2,
  rs,
 
)    (((op2) << 20) | ((op1) << 16) | ((rs) << 8) | ((t) << 4) | (op0))

Definition at line 83 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A0

#define ASM_XTENSA_REG_A0   (0)

Definition at line 39 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A1

#define ASM_XTENSA_REG_A1   (1)

Definition at line 40 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A10

#define ASM_XTENSA_REG_A10   (10)

Definition at line 49 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A11

#define ASM_XTENSA_REG_A11   (11)

Definition at line 50 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A12

#define ASM_XTENSA_REG_A12   (12)

Definition at line 51 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A13

#define ASM_XTENSA_REG_A13   (13)

Definition at line 52 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A14

#define ASM_XTENSA_REG_A14   (14)

Definition at line 53 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A15

#define ASM_XTENSA_REG_A15   (15)

Definition at line 54 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A2

#define ASM_XTENSA_REG_A2   (2)

Definition at line 41 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A3

#define ASM_XTENSA_REG_A3   (3)

Definition at line 42 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A4

#define ASM_XTENSA_REG_A4   (4)

Definition at line 43 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A5

#define ASM_XTENSA_REG_A5   (5)

Definition at line 44 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A6

#define ASM_XTENSA_REG_A6   (6)

Definition at line 45 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A7

#define ASM_XTENSA_REG_A7   (7)

Definition at line 46 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A8

#define ASM_XTENSA_REG_A8   (8)

Definition at line 47 of file asmxtensa.h.

◆ ASM_XTENSA_REG_A9

#define ASM_XTENSA_REG_A9   (9)

Definition at line 48 of file asmxtensa.h.

Typedef Documentation

◆ asm_xtensa_t

typedef struct _asm_xtensa_t asm_xtensa_t

Function Documentation

◆ asm_xtensa_bcc_reg_reg_label()

void asm_xtensa_bcc_reg_reg_label ( asm_xtensa_t as,
uint  cond,
uint  reg1,
uint  reg2,
uint  label 
)

◆ asm_xtensa_bccz_reg_label()

void asm_xtensa_bccz_reg_label ( asm_xtensa_t as,
uint  cond,
uint  reg,
uint  label 
)

◆ asm_xtensa_end_pass()

void asm_xtensa_end_pass ( asm_xtensa_t as)

◆ asm_xtensa_entry()

void asm_xtensa_entry ( asm_xtensa_t as,
int  num_locals 
)

◆ asm_xtensa_exit()

void asm_xtensa_exit ( asm_xtensa_t as)

◆ asm_xtensa_j_label()

void asm_xtensa_j_label ( asm_xtensa_t as,
uint  label 
)

◆ asm_xtensa_mov_local_reg()

void asm_xtensa_mov_local_reg ( asm_xtensa_t as,
int  local_num,
uint  reg_src 
)

◆ asm_xtensa_mov_reg_i32()

void asm_xtensa_mov_reg_i32 ( asm_xtensa_t as,
uint  reg_dest,
uint32_t  i32 
)

◆ asm_xtensa_mov_reg_local()

void asm_xtensa_mov_reg_local ( asm_xtensa_t as,
uint  reg_dest,
int  local_num 
)

◆ asm_xtensa_mov_reg_local_addr()

void asm_xtensa_mov_reg_local_addr ( asm_xtensa_t as,
uint  reg_dest,
int  local_num 
)

◆ asm_xtensa_op16()

void asm_xtensa_op16 ( asm_xtensa_t as,
uint16_t  op 
)

◆ asm_xtensa_op24()

void asm_xtensa_op24 ( asm_xtensa_t as,
uint32_t  op 
)

◆ asm_xtensa_setcc_reg_reg_reg()

void asm_xtensa_setcc_reg_reg_reg ( asm_xtensa_t as,
uint  cond,
uint  reg_dest,
uint  reg_src1,
uint  reg_src2 
)