33 #if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA 38 #define SIGNED_FIT8(x) ((((x) & 0xffffff80) == 0) || (((x) & 0xffffff80) == 0xffffff80)) 39 #define SIGNED_FIT12(x) ((((x) & 0xfffff800) == 0) || (((x) & 0xfffff800) == 0xfffff800)) 49 printf(
"XTENSA ASM:");
66 asm_xtensa_op_j(as, as->
num_const * WORD_SIZE + 4 - 4);
71 as->
stack_adjust = (((4 + num_locals) * WORD_SIZE) + 15) & ~15;
90 asm_xtensa_op_ret_n(as);
94 assert(label < as->base.max_num_labels);
116 uint32_t dest = get_label_dest(as, label);
119 asm_xtensa_op_j(as, rel);
123 uint32_t dest = get_label_dest(as, label);
126 printf(
"ERROR: xtensa bccz out of range\n");
128 asm_xtensa_op_bccz(as, cond, reg, rel);
132 uint32_t dest = get_label_dest(as, label);
135 printf(
"ERROR: xtensa bcc out of range\n");
137 asm_xtensa_op_bcc(as, cond, reg1, reg2, rel);
142 asm_xtensa_op_movi_n(as, reg_dest, 1);
143 asm_xtensa_op_bcc(as, cond, reg_src1, reg_src2, 1);
144 asm_xtensa_op_movi_n(as, reg_dest, 0);
148 if (SIGNED_FIT12(i32)) {
149 asm_xtensa_op_movi(as, reg_dest, i32);
171 asm_xtensa_op_addi(as, reg_dest, reg_dest, (4 + local_num) * WORD_SIZE);
174 #endif // MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA uint8_t * mp_asm_base_get_cur_to_write_bytes(mp_asm_base_t *as, size_t num_bytes_to_write)
void asm_xtensa_end_pass(asm_xtensa_t *as)
#define ASM_XTENSA_REG_A0
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_mov_reg_local(asm_xtensa_t *as, uint reg_dest, int local_num)
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_mov_local_reg(asm_xtensa_t *as, int local_num, uint reg_src)
void asm_xtensa_entry(asm_xtensa_t *as, int num_locals)
void asm_xtensa_setcc_reg_reg_reg(asm_xtensa_t *as, uint cond, uint reg_dest, uint reg_src1, uint reg_src2)
#define ASM_XTENSA_REG_A13
void asm_xtensa_exit(asm_xtensa_t *as)
#define ASM_XTENSA_REG_A1
void asm_xtensa_mov_reg_i32(asm_xtensa_t *as, uint reg_dest, uint32_t i32)
#define ASM_XTENSA_REG_A12
#define ASM_XTENSA_REG_A14
void asm_xtensa_mov_reg_local_addr(asm_xtensa_t *as, uint reg_dest, int local_num)
void asm_xtensa_bcc_reg_reg_label(asm_xtensa_t *as, uint cond, uint reg1, uint reg2, uint label)