mirror of
https://github.com/mlaux/gb6.git
synced 2026-04-20 09:16:40 +00:00
59 lines
3.2 KiB
C
59 lines
3.2 KiB
C
#ifndef EMITTERS_H
|
|
#define EMITTERS_H
|
|
|
|
#include <stdint.h>
|
|
#include "compiler.h"
|
|
|
|
void emit_byte(struct code_block *block, uint8_t byte);
|
|
void emit_word(struct code_block *block, uint16_t word);
|
|
void emit_long(struct code_block *block, uint32_t val);
|
|
|
|
void emit_moveq_dn(struct code_block *block, uint8_t reg, int8_t imm);
|
|
void emit_move_b_dn(struct code_block *block, uint8_t reg, int8_t imm);
|
|
void emit_move_w_dn(struct code_block *block, uint8_t reg, int16_t imm);
|
|
void emit_move_l_dn(struct code_block *block, uint8_t reg, int32_t imm);
|
|
|
|
void emit_rol_w_8(struct code_block *block, uint8_t reg);
|
|
void emit_ror_w_8(struct code_block *block, uint8_t reg);
|
|
void emit_swap(struct code_block *block, uint8_t reg);
|
|
|
|
void emit_move_w_an_dn(struct code_block *block, uint8_t areg, uint8_t dreg);
|
|
void emit_movea_w_dn_an(struct code_block *block, uint8_t dreg, uint8_t areg);
|
|
void emit_movea_w_imm16(struct code_block *block, uint8_t areg, uint16_t val);
|
|
|
|
void emit_subq_b_dn(struct code_block *block, uint8_t dreg, uint8_t val);
|
|
void emit_subq_w_an(struct code_block *block, uint8_t areg, uint8_t val);
|
|
void emit_addq_w_an(struct code_block *block, uint8_t areg, uint8_t val);
|
|
void emit_move_w_dn_ind_an(struct code_block *block, uint8_t dreg, uint8_t areg);
|
|
void emit_move_w_ind_an_dn(struct code_block *block, uint8_t areg, uint8_t dreg);
|
|
void emit_move_b_dn_ind_an(struct code_block *block, uint8_t dreg, uint8_t areg);
|
|
void emit_move_b_dn_disp_an(struct code_block *block, uint8_t dreg, int16_t disp, uint8_t areg);
|
|
void emit_move_b_ind_an_dn(struct code_block *block, uint8_t areg, uint8_t dreg);
|
|
void emit_move_b_disp_an_dn(struct code_block *block, int16_t disp, uint8_t areg, uint8_t dreg);
|
|
void emit_andi_l_dn(struct code_block *block, uint8_t dreg, uint32_t imm);
|
|
void emit_cmp_b_imm_dn(struct code_block *block, uint8_t dreg, uint8_t imm);
|
|
void emit_scc(struct code_block *block, uint8_t cond, uint8_t dreg);
|
|
void emit_andi_b_dn(struct code_block *block, uint8_t dreg, uint8_t imm);
|
|
void emit_ori_b_dn(struct code_block *block, uint8_t dreg, uint8_t imm);
|
|
void emit_or_b_dn_dn(struct code_block *block, uint8_t src, uint8_t dest);
|
|
|
|
void emit_rts(struct code_block *block);
|
|
void emit_bra_w(struct code_block *block, int16_t disp);
|
|
void emit_beq_w(struct code_block *block, int16_t disp);
|
|
void emit_bne_w(struct code_block *block, int16_t disp);
|
|
void emit_btst_imm_dn(struct code_block *block, uint8_t bit, uint8_t dreg);
|
|
|
|
void emit_move_l_dn_dn(struct code_block *block, uint8_t src, uint8_t dest);
|
|
void emit_move_w_dn_dn(struct code_block *block, uint8_t src, uint8_t dest);
|
|
void emit_lsl_w_imm_dn(struct code_block *block, uint8_t count, uint8_t dreg);
|
|
void emit_push_w_dn(struct code_block *block, uint8_t dreg);
|
|
void emit_push_l_disp_an(struct code_block *block, int16_t disp, uint8_t areg);
|
|
void emit_movea_l_disp_an_an(struct code_block *block, int16_t disp, uint8_t src_areg, uint8_t dest_areg);
|
|
void emit_jsr_ind_an(struct code_block *block, uint8_t areg);
|
|
void emit_addq_l_an(struct code_block *block, uint8_t areg, uint8_t val);
|
|
void emit_movem_l_to_predec(struct code_block *block, uint16_t mask);
|
|
void emit_movem_l_from_postinc(struct code_block *block, uint16_t mask);
|
|
void emit_move_b_dn_dn(struct code_block *block, uint8_t src, uint8_t dest);
|
|
|
|
#endif
|