mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-20 09:02:32 +00:00
Every mnemonic with an encode form now has a generated inst_<mnem>/emit_<mnem> overload group. The per-arch generators map ALL operand types — nothing is skipped: arm64 gains shifted/extended registers (multi-param via op_shifted/op_extended), SVE Z-regs + predicates, SME tile/slice, NEON arrangements/lanes, bitmask/sysreg/pattern immediates and condition codes (427 -> 777 mnemonics); arm32 gains shifted/register-shifted regs, register lists, NEON lanes and all encoded-immediate subclasses (479 -> 592); x86 gains m80 and descriptor-table memory operands — FBLD/FBSTP, LGDT/SGDT/LIDT/SIDT, FLD/FSTP, far-indirect JMP/CALL, BOUND (1167 -> 1175). Mnemonic-specific builders are now fully generated, not hand-written: deleted the hand-written helpers the generated groups collided with — riscv inst_jal/inst_jalr, arm64 inst_b_cond/inst_cbz/inst_tbz/inst_csel, mos6502 inst_tst — and let the generators own those names (arm64 also gains inst_cbnz/tbnz/csinc/csinv/csneg). Updated the affected test call-sites. The generic operand-shape helpers (inst_r_r, inst_r_r_i, inst_ldst, ...) remain as delegation targets. Decode-only mnemonics with no encode form are correctly left without builders. ppc/ppc_vle/rsp/mos65816 were already complete. All 10 ISAs: structure + compile + tests pass; generators idempotent.
644 lines
51 KiB
Odin
644 lines
51 KiB
Odin
// rexcode · Brendan Punsky (dotbmp@github), original author
|
|
|
|
package rexcode_mos6502
|
|
|
|
// =============================================================================
|
|
// GENERATED FILE - DO NOT EDIT
|
|
// =============================================================================
|
|
//
|
|
// Generated by tools/gen_mnemonic_builders.odin from ENCODE_FORMS / ENCODE_RUNS.
|
|
// Regenerate with: odin run mos6502/tools/gen_mnemonic_builders.odin -file
|
|
//
|
|
// Typed mnemonic builder procedures with overloading. The 6502's addressing
|
|
// mode is intrinsic to the Memory value passed in (its 'mode' field), so a
|
|
// single inst_<mnem>_m(m: Memory) covers every addressing-mode form of a
|
|
// mnemonic; the encoder's matcher selects the opcode from the mode.
|
|
//
|
|
// For each mnemonic:
|
|
// inst_<mnem> overload set returning an Instruction
|
|
// emit_<mnem> overload set that appends to a [dynamic]Instruction
|
|
|
|
// =============================================================================
|
|
// Individual Typed Builder Procedures
|
|
// =============================================================================
|
|
|
|
inst_adc_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ADC, imm) }
|
|
inst_adc_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.ADC, m) }
|
|
emit_adc_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ADC, imm)) }
|
|
emit_adc_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.ADC, m)) }
|
|
inst_and_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.AND, imm) }
|
|
inst_and_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.AND, m) }
|
|
emit_and_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.AND, imm)) }
|
|
emit_and_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.AND, m)) }
|
|
inst_asl_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.ASL) }
|
|
inst_asl_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.ASL, m) }
|
|
emit_asl_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.ASL)) }
|
|
emit_asl_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.ASL, m)) }
|
|
inst_bit_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.BIT, m) }
|
|
inst_bit_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.BIT, imm) }
|
|
emit_bit_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.BIT, m)) }
|
|
emit_bit_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.BIT, imm)) }
|
|
inst_cmp_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.CMP, imm) }
|
|
inst_cmp_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.CMP, m) }
|
|
emit_cmp_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.CMP, imm)) }
|
|
emit_cmp_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.CMP, m)) }
|
|
inst_cpx_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.CPX, imm) }
|
|
inst_cpx_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.CPX, m) }
|
|
emit_cpx_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.CPX, imm)) }
|
|
emit_cpx_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.CPX, m)) }
|
|
inst_cpy_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.CPY, imm) }
|
|
inst_cpy_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.CPY, m) }
|
|
emit_cpy_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.CPY, imm)) }
|
|
emit_cpy_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.CPY, m)) }
|
|
inst_dec_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.DEC, m) }
|
|
inst_dec_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.DEC) }
|
|
emit_dec_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.DEC, m)) }
|
|
emit_dec_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.DEC)) }
|
|
inst_dex_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.DEX) }
|
|
emit_dex_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.DEX)) }
|
|
inst_dey_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.DEY) }
|
|
emit_dey_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.DEY)) }
|
|
inst_eor_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.EOR, imm) }
|
|
inst_eor_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.EOR, m) }
|
|
emit_eor_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.EOR, imm)) }
|
|
emit_eor_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.EOR, m)) }
|
|
inst_inc_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.INC, m) }
|
|
inst_inc_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.INC) }
|
|
emit_inc_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.INC, m)) }
|
|
emit_inc_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.INC)) }
|
|
inst_inx_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.INX) }
|
|
emit_inx_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.INX)) }
|
|
inst_iny_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.INY) }
|
|
emit_iny_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.INY)) }
|
|
inst_lsr_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.LSR) }
|
|
inst_lsr_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.LSR, m) }
|
|
emit_lsr_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.LSR)) }
|
|
emit_lsr_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.LSR, m)) }
|
|
inst_ora_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ORA, imm) }
|
|
inst_ora_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.ORA, m) }
|
|
emit_ora_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ORA, imm)) }
|
|
emit_ora_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.ORA, m)) }
|
|
inst_rol_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.ROL) }
|
|
inst_rol_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.ROL, m) }
|
|
emit_rol_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.ROL)) }
|
|
emit_rol_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.ROL, m)) }
|
|
inst_ror_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.ROR) }
|
|
inst_ror_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.ROR, m) }
|
|
emit_ror_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.ROR)) }
|
|
emit_ror_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.ROR, m)) }
|
|
inst_sbc_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.SBC, imm) }
|
|
inst_sbc_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SBC, m) }
|
|
emit_sbc_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.SBC, imm)) }
|
|
emit_sbc_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SBC, m)) }
|
|
inst_bcc_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BCC, label_id) }
|
|
emit_bcc_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BCC, label_id)) }
|
|
inst_bcs_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BCS, label_id) }
|
|
emit_bcs_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BCS, label_id)) }
|
|
inst_beq_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BEQ, label_id) }
|
|
emit_beq_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BEQ, label_id)) }
|
|
inst_bmi_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BMI, label_id) }
|
|
emit_bmi_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BMI, label_id)) }
|
|
inst_bne_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BNE, label_id) }
|
|
emit_bne_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BNE, label_id)) }
|
|
inst_bpl_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BPL, label_id) }
|
|
emit_bpl_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BPL, label_id)) }
|
|
inst_bvc_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BVC, label_id) }
|
|
emit_bvc_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BVC, label_id)) }
|
|
inst_bvs_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BVS, label_id) }
|
|
emit_bvs_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BVS, label_id)) }
|
|
inst_jmp_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.JMP, m) }
|
|
emit_jmp_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.JMP, m)) }
|
|
inst_jsr_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.JSR, m) }
|
|
emit_jsr_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.JSR, m)) }
|
|
inst_rti_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.RTI) }
|
|
emit_rti_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.RTI)) }
|
|
inst_rts_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.RTS) }
|
|
emit_rts_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.RTS)) }
|
|
inst_brk_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.BRK) }
|
|
emit_brk_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.BRK)) }
|
|
inst_clc_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CLC) }
|
|
emit_clc_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CLC)) }
|
|
inst_cld_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CLD) }
|
|
emit_cld_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CLD)) }
|
|
inst_cli_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CLI) }
|
|
emit_cli_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CLI)) }
|
|
inst_clv_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CLV) }
|
|
emit_clv_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CLV)) }
|
|
inst_sec_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.SEC) }
|
|
emit_sec_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.SEC)) }
|
|
inst_sed_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.SED) }
|
|
emit_sed_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.SED)) }
|
|
inst_sei_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.SEI) }
|
|
emit_sei_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.SEI)) }
|
|
inst_lda_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.LDA, imm) }
|
|
inst_lda_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.LDA, m) }
|
|
emit_lda_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.LDA, imm)) }
|
|
emit_lda_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.LDA, m)) }
|
|
inst_ldx_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.LDX, imm) }
|
|
inst_ldx_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.LDX, m) }
|
|
emit_ldx_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.LDX, imm)) }
|
|
emit_ldx_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.LDX, m)) }
|
|
inst_ldy_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.LDY, imm) }
|
|
inst_ldy_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.LDY, m) }
|
|
emit_ldy_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.LDY, imm)) }
|
|
emit_ldy_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.LDY, m)) }
|
|
inst_sta_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.STA, m) }
|
|
emit_sta_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.STA, m)) }
|
|
inst_stx_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.STX, m) }
|
|
emit_stx_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.STX, m)) }
|
|
inst_sty_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.STY, m) }
|
|
emit_sty_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.STY, m)) }
|
|
inst_pha_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PHA) }
|
|
emit_pha_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PHA)) }
|
|
inst_php_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PHP) }
|
|
emit_php_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PHP)) }
|
|
inst_pla_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PLA) }
|
|
emit_pla_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PLA)) }
|
|
inst_plp_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PLP) }
|
|
emit_plp_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PLP)) }
|
|
inst_tax_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.TAX) }
|
|
emit_tax_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.TAX)) }
|
|
inst_tay_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.TAY) }
|
|
emit_tay_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.TAY)) }
|
|
inst_tsx_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.TSX) }
|
|
emit_tsx_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.TSX)) }
|
|
inst_txa_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.TXA) }
|
|
emit_txa_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.TXA)) }
|
|
inst_txs_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.TXS) }
|
|
emit_txs_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.TXS)) }
|
|
inst_tya_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.TYA) }
|
|
emit_tya_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.TYA)) }
|
|
inst_nop_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.NOP) }
|
|
emit_nop_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.NOP)) }
|
|
inst_lax_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.LAX, m) }
|
|
emit_lax_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.LAX, m)) }
|
|
inst_sax_nmos_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SAX_NMOS, m) }
|
|
emit_sax_nmos_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SAX_NMOS, m)) }
|
|
inst_dcp_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.DCP, m) }
|
|
emit_dcp_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.DCP, m)) }
|
|
inst_isc_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.ISC, m) }
|
|
emit_isc_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.ISC, m)) }
|
|
inst_rla_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RLA, m) }
|
|
emit_rla_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RLA, m)) }
|
|
inst_rra_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RRA, m) }
|
|
emit_rra_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RRA, m)) }
|
|
inst_slo_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SLO, m) }
|
|
emit_slo_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SLO, m)) }
|
|
inst_sre_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SRE, m) }
|
|
emit_sre_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SRE, m)) }
|
|
inst_alr_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ALR, imm) }
|
|
emit_alr_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ALR, imm)) }
|
|
inst_anc_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ANC, imm) }
|
|
emit_anc_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ANC, imm)) }
|
|
inst_arr_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ARR, imm) }
|
|
emit_arr_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ARR, imm)) }
|
|
inst_axs_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.AXS, imm) }
|
|
emit_axs_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.AXS, imm)) }
|
|
inst_las_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.LAS, m) }
|
|
emit_las_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.LAS, m)) }
|
|
inst_ane_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ANE, imm) }
|
|
emit_ane_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ANE, imm)) }
|
|
inst_lxa_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.LXA, imm) }
|
|
emit_lxa_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.LXA, imm)) }
|
|
inst_sha_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SHA, m) }
|
|
emit_sha_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SHA, m)) }
|
|
inst_shx_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SHX, m) }
|
|
emit_shx_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SHX, m)) }
|
|
inst_shy_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SHY, m) }
|
|
emit_shy_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SHY, m)) }
|
|
inst_tas_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.TAS, m) }
|
|
emit_tas_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.TAS, m)) }
|
|
inst_jam_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.JAM) }
|
|
emit_jam_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.JAM)) }
|
|
inst_usbc_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.USBC, imm) }
|
|
emit_usbc_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.USBC, imm)) }
|
|
inst_dop_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.DOP, imm) }
|
|
inst_dop_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.DOP, m) }
|
|
emit_dop_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.DOP, imm)) }
|
|
emit_dop_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.DOP, m)) }
|
|
inst_top_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.TOP, m) }
|
|
emit_top_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.TOP, m)) }
|
|
inst_bra_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BRA, label_id) }
|
|
emit_bra_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BRA, label_id)) }
|
|
inst_ina_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.INA) }
|
|
emit_ina_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.INA)) }
|
|
inst_dea_a :: #force_inline proc "contextless" () -> Instruction { return inst_a(.DEA) }
|
|
emit_dea_a :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_a(.DEA)) }
|
|
inst_phx_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PHX) }
|
|
emit_phx_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PHX)) }
|
|
inst_phy_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PHY) }
|
|
emit_phy_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PHY)) }
|
|
inst_plx_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PLX) }
|
|
emit_plx_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PLX)) }
|
|
inst_ply_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.PLY) }
|
|
emit_ply_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.PLY)) }
|
|
inst_stz_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.STZ, m) }
|
|
emit_stz_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.STZ, m)) }
|
|
inst_trb_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.TRB, m) }
|
|
emit_trb_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.TRB, m)) }
|
|
inst_tsb_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.TSB, m) }
|
|
emit_tsb_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.TSB, m)) }
|
|
inst_stp_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.STP) }
|
|
emit_stp_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.STP)) }
|
|
inst_wai_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.WAI) }
|
|
emit_wai_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.WAI)) }
|
|
inst_rmb0_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB0, m) }
|
|
emit_rmb0_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB0, m)) }
|
|
inst_rmb1_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB1, m) }
|
|
emit_rmb1_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB1, m)) }
|
|
inst_rmb2_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB2, m) }
|
|
emit_rmb2_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB2, m)) }
|
|
inst_rmb3_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB3, m) }
|
|
emit_rmb3_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB3, m)) }
|
|
inst_rmb4_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB4, m) }
|
|
emit_rmb4_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB4, m)) }
|
|
inst_rmb5_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB5, m) }
|
|
emit_rmb5_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB5, m)) }
|
|
inst_rmb6_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB6, m) }
|
|
emit_rmb6_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB6, m)) }
|
|
inst_rmb7_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.RMB7, m) }
|
|
emit_rmb7_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.RMB7, m)) }
|
|
inst_smb0_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB0, m) }
|
|
emit_smb0_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB0, m)) }
|
|
inst_smb1_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB1, m) }
|
|
emit_smb1_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB1, m)) }
|
|
inst_smb2_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB2, m) }
|
|
emit_smb2_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB2, m)) }
|
|
inst_smb3_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB3, m) }
|
|
emit_smb3_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB3, m)) }
|
|
inst_smb4_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB4, m) }
|
|
emit_smb4_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB4, m)) }
|
|
inst_smb5_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB5, m) }
|
|
emit_smb5_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB5, m)) }
|
|
inst_smb6_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB6, m) }
|
|
emit_smb6_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB6, m)) }
|
|
inst_smb7_m :: #force_inline proc "contextless" (m: Memory) -> Instruction { return inst_m(.SMB7, m) }
|
|
emit_smb7_m :: #force_inline proc(instructions: ^[dynamic]Instruction, m: Memory) { append(instructions, inst_m(.SMB7, m)) }
|
|
inst_bbr0_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR0, zp, label_id) }
|
|
emit_bbr0_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR0, zp, label_id)) }
|
|
inst_bbr1_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR1, zp, label_id) }
|
|
emit_bbr1_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR1, zp, label_id)) }
|
|
inst_bbr2_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR2, zp, label_id) }
|
|
emit_bbr2_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR2, zp, label_id)) }
|
|
inst_bbr3_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR3, zp, label_id) }
|
|
emit_bbr3_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR3, zp, label_id)) }
|
|
inst_bbr4_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR4, zp, label_id) }
|
|
emit_bbr4_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR4, zp, label_id)) }
|
|
inst_bbr5_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR5, zp, label_id) }
|
|
emit_bbr5_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR5, zp, label_id)) }
|
|
inst_bbr6_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR6, zp, label_id) }
|
|
emit_bbr6_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR6, zp, label_id)) }
|
|
inst_bbr7_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBR7, zp, label_id) }
|
|
emit_bbr7_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBR7, zp, label_id)) }
|
|
inst_bbs0_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS0, zp, label_id) }
|
|
emit_bbs0_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS0, zp, label_id)) }
|
|
inst_bbs1_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS1, zp, label_id) }
|
|
emit_bbs1_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS1, zp, label_id)) }
|
|
inst_bbs2_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS2, zp, label_id) }
|
|
emit_bbs2_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS2, zp, label_id)) }
|
|
inst_bbs3_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS3, zp, label_id) }
|
|
emit_bbs3_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS3, zp, label_id)) }
|
|
inst_bbs4_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS4, zp, label_id) }
|
|
emit_bbs4_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS4, zp, label_id)) }
|
|
inst_bbs5_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS5, zp, label_id) }
|
|
emit_bbs5_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS5, zp, label_id)) }
|
|
inst_bbs6_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS6, zp, label_id) }
|
|
emit_bbs6_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS6, zp, label_id)) }
|
|
inst_bbs7_zp_rel :: #force_inline proc "contextless" (zp: u8, label_id: u32) -> Instruction { return inst_zp_rel(.BBS7, zp, label_id) }
|
|
emit_bbs7_zp_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) { append(instructions, inst_zp_rel(.BBS7, zp, label_id)) }
|
|
inst_sxy_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.SXY) }
|
|
emit_sxy_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.SXY)) }
|
|
inst_sax_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.SAX) }
|
|
emit_sax_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.SAX)) }
|
|
inst_say_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.SAY) }
|
|
emit_say_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.SAY)) }
|
|
inst_cla_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CLA) }
|
|
emit_cla_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CLA)) }
|
|
inst_clx_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CLX) }
|
|
emit_clx_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CLX)) }
|
|
inst_cly_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CLY) }
|
|
emit_cly_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CLY)) }
|
|
inst_csh_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CSH) }
|
|
emit_csh_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CSH)) }
|
|
inst_csl_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.CSL) }
|
|
emit_csl_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.CSL)) }
|
|
inst_set_none :: #force_inline proc "contextless" () -> Instruction { return inst_none(.SET) }
|
|
emit_set_none :: #force_inline proc(instructions: ^[dynamic]Instruction) { append(instructions, inst_none(.SET)) }
|
|
inst_st0_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ST0, imm) }
|
|
emit_st0_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ST0, imm)) }
|
|
inst_st1_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ST1, imm) }
|
|
emit_st1_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ST1, imm)) }
|
|
inst_st2_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.ST2, imm) }
|
|
emit_st2_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.ST2, imm)) }
|
|
inst_tam_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.TAM, imm) }
|
|
emit_tam_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.TAM, imm)) }
|
|
inst_tma_imm8 :: #force_inline proc "contextless" (imm: i64) -> Instruction { return inst_i(.TMA, imm) }
|
|
emit_tma_imm8 :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64) { append(instructions, inst_i(.TMA, imm)) }
|
|
inst_tst_tst :: #force_inline proc "contextless" (imm: i64, m: Memory) -> Instruction { return Instruction{mnemonic = .TST, operand_count = 2, length = 0, ops = {op_imm8(imm), op_mem(m), {}}} }
|
|
emit_tst_tst :: #force_inline proc(instructions: ^[dynamic]Instruction, imm: i64, m: Memory) { append(instructions, Instruction{mnemonic = .TST, operand_count = 2, length = 0, ops = {op_imm8(imm), op_mem(m), {}}}) }
|
|
inst_bsr_rel :: #force_inline proc "contextless" (label_id: u32) -> Instruction { return inst_rel(.BSR, label_id) }
|
|
emit_bsr_rel :: #force_inline proc(instructions: ^[dynamic]Instruction, label_id: u32) { append(instructions, inst_rel(.BSR, label_id)) }
|
|
inst_tii_block :: #force_inline proc "contextless" (src, dst, length_val: u16) -> Instruction { return inst_block(.TII, src, dst, length_val) }
|
|
emit_tii_block :: #force_inline proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) { append(instructions, inst_block(.TII, src, dst, length_val)) }
|
|
inst_tdd_block :: #force_inline proc "contextless" (src, dst, length_val: u16) -> Instruction { return inst_block(.TDD, src, dst, length_val) }
|
|
emit_tdd_block :: #force_inline proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) { append(instructions, inst_block(.TDD, src, dst, length_val)) }
|
|
inst_tin_block :: #force_inline proc "contextless" (src, dst, length_val: u16) -> Instruction { return inst_block(.TIN, src, dst, length_val) }
|
|
emit_tin_block :: #force_inline proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) { append(instructions, inst_block(.TIN, src, dst, length_val)) }
|
|
inst_tia_block :: #force_inline proc "contextless" (src, dst, length_val: u16) -> Instruction { return inst_block(.TIA, src, dst, length_val) }
|
|
emit_tia_block :: #force_inline proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) { append(instructions, inst_block(.TIA, src, dst, length_val)) }
|
|
inst_tai_block :: #force_inline proc "contextless" (src, dst, length_val: u16) -> Instruction { return inst_block(.TAI, src, dst, length_val) }
|
|
emit_tai_block :: #force_inline proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) { append(instructions, inst_block(.TAI, src, dst, length_val)) }
|
|
|
|
// =============================================================================
|
|
// Overload Groups
|
|
// =============================================================================
|
|
|
|
inst_adc :: proc{ inst_adc_imm8, inst_adc_m }
|
|
emit_adc :: proc{ emit_adc_imm8, emit_adc_m }
|
|
inst_and :: proc{ inst_and_imm8, inst_and_m }
|
|
emit_and :: proc{ emit_and_imm8, emit_and_m }
|
|
inst_asl :: proc{ inst_asl_a, inst_asl_m }
|
|
emit_asl :: proc{ emit_asl_a, emit_asl_m }
|
|
inst_bit :: proc{ inst_bit_m, inst_bit_imm8 }
|
|
emit_bit :: proc{ emit_bit_m, emit_bit_imm8 }
|
|
inst_cmp :: proc{ inst_cmp_imm8, inst_cmp_m }
|
|
emit_cmp :: proc{ emit_cmp_imm8, emit_cmp_m }
|
|
inst_cpx :: proc{ inst_cpx_imm8, inst_cpx_m }
|
|
emit_cpx :: proc{ emit_cpx_imm8, emit_cpx_m }
|
|
inst_cpy :: proc{ inst_cpy_imm8, inst_cpy_m }
|
|
emit_cpy :: proc{ emit_cpy_imm8, emit_cpy_m }
|
|
inst_dec :: proc{ inst_dec_m, inst_dec_a }
|
|
emit_dec :: proc{ emit_dec_m, emit_dec_a }
|
|
inst_dex :: inst_dex_none
|
|
emit_dex :: emit_dex_none
|
|
inst_dey :: inst_dey_none
|
|
emit_dey :: emit_dey_none
|
|
inst_eor :: proc{ inst_eor_imm8, inst_eor_m }
|
|
emit_eor :: proc{ emit_eor_imm8, emit_eor_m }
|
|
inst_inc :: proc{ inst_inc_m, inst_inc_a }
|
|
emit_inc :: proc{ emit_inc_m, emit_inc_a }
|
|
inst_inx :: inst_inx_none
|
|
emit_inx :: emit_inx_none
|
|
inst_iny :: inst_iny_none
|
|
emit_iny :: emit_iny_none
|
|
inst_lsr :: proc{ inst_lsr_a, inst_lsr_m }
|
|
emit_lsr :: proc{ emit_lsr_a, emit_lsr_m }
|
|
inst_ora :: proc{ inst_ora_imm8, inst_ora_m }
|
|
emit_ora :: proc{ emit_ora_imm8, emit_ora_m }
|
|
inst_rol :: proc{ inst_rol_a, inst_rol_m }
|
|
emit_rol :: proc{ emit_rol_a, emit_rol_m }
|
|
inst_ror :: proc{ inst_ror_a, inst_ror_m }
|
|
emit_ror :: proc{ emit_ror_a, emit_ror_m }
|
|
inst_sbc :: proc{ inst_sbc_imm8, inst_sbc_m }
|
|
emit_sbc :: proc{ emit_sbc_imm8, emit_sbc_m }
|
|
inst_bcc :: inst_bcc_rel
|
|
emit_bcc :: emit_bcc_rel
|
|
inst_bcs :: inst_bcs_rel
|
|
emit_bcs :: emit_bcs_rel
|
|
inst_beq :: inst_beq_rel
|
|
emit_beq :: emit_beq_rel
|
|
inst_bmi :: inst_bmi_rel
|
|
emit_bmi :: emit_bmi_rel
|
|
inst_bne :: inst_bne_rel
|
|
emit_bne :: emit_bne_rel
|
|
inst_bpl :: inst_bpl_rel
|
|
emit_bpl :: emit_bpl_rel
|
|
inst_bvc :: inst_bvc_rel
|
|
emit_bvc :: emit_bvc_rel
|
|
inst_bvs :: inst_bvs_rel
|
|
emit_bvs :: emit_bvs_rel
|
|
inst_jmp :: inst_jmp_m
|
|
emit_jmp :: emit_jmp_m
|
|
inst_jsr :: inst_jsr_m
|
|
emit_jsr :: emit_jsr_m
|
|
inst_rti :: inst_rti_none
|
|
emit_rti :: emit_rti_none
|
|
inst_rts :: inst_rts_none
|
|
emit_rts :: emit_rts_none
|
|
inst_brk :: inst_brk_none
|
|
emit_brk :: emit_brk_none
|
|
inst_clc :: inst_clc_none
|
|
emit_clc :: emit_clc_none
|
|
inst_cld :: inst_cld_none
|
|
emit_cld :: emit_cld_none
|
|
inst_cli :: inst_cli_none
|
|
emit_cli :: emit_cli_none
|
|
inst_clv :: inst_clv_none
|
|
emit_clv :: emit_clv_none
|
|
inst_sec :: inst_sec_none
|
|
emit_sec :: emit_sec_none
|
|
inst_sed :: inst_sed_none
|
|
emit_sed :: emit_sed_none
|
|
inst_sei :: inst_sei_none
|
|
emit_sei :: emit_sei_none
|
|
inst_lda :: proc{ inst_lda_imm8, inst_lda_m }
|
|
emit_lda :: proc{ emit_lda_imm8, emit_lda_m }
|
|
inst_ldx :: proc{ inst_ldx_imm8, inst_ldx_m }
|
|
emit_ldx :: proc{ emit_ldx_imm8, emit_ldx_m }
|
|
inst_ldy :: proc{ inst_ldy_imm8, inst_ldy_m }
|
|
emit_ldy :: proc{ emit_ldy_imm8, emit_ldy_m }
|
|
inst_sta :: inst_sta_m
|
|
emit_sta :: emit_sta_m
|
|
inst_stx :: inst_stx_m
|
|
emit_stx :: emit_stx_m
|
|
inst_sty :: inst_sty_m
|
|
emit_sty :: emit_sty_m
|
|
inst_pha :: inst_pha_none
|
|
emit_pha :: emit_pha_none
|
|
inst_php :: inst_php_none
|
|
emit_php :: emit_php_none
|
|
inst_pla :: inst_pla_none
|
|
emit_pla :: emit_pla_none
|
|
inst_plp :: inst_plp_none
|
|
emit_plp :: emit_plp_none
|
|
inst_tax :: inst_tax_none
|
|
emit_tax :: emit_tax_none
|
|
inst_tay :: inst_tay_none
|
|
emit_tay :: emit_tay_none
|
|
inst_tsx :: inst_tsx_none
|
|
emit_tsx :: emit_tsx_none
|
|
inst_txa :: inst_txa_none
|
|
emit_txa :: emit_txa_none
|
|
inst_txs :: inst_txs_none
|
|
emit_txs :: emit_txs_none
|
|
inst_tya :: inst_tya_none
|
|
emit_tya :: emit_tya_none
|
|
inst_nop :: inst_nop_none
|
|
emit_nop :: emit_nop_none
|
|
inst_lax :: inst_lax_m
|
|
emit_lax :: emit_lax_m
|
|
inst_sax_nmos :: inst_sax_nmos_m
|
|
emit_sax_nmos :: emit_sax_nmos_m
|
|
inst_dcp :: inst_dcp_m
|
|
emit_dcp :: emit_dcp_m
|
|
inst_isc :: inst_isc_m
|
|
emit_isc :: emit_isc_m
|
|
inst_rla :: inst_rla_m
|
|
emit_rla :: emit_rla_m
|
|
inst_rra :: inst_rra_m
|
|
emit_rra :: emit_rra_m
|
|
inst_slo :: inst_slo_m
|
|
emit_slo :: emit_slo_m
|
|
inst_sre :: inst_sre_m
|
|
emit_sre :: emit_sre_m
|
|
inst_alr :: inst_alr_imm8
|
|
emit_alr :: emit_alr_imm8
|
|
inst_anc :: inst_anc_imm8
|
|
emit_anc :: emit_anc_imm8
|
|
inst_arr :: inst_arr_imm8
|
|
emit_arr :: emit_arr_imm8
|
|
inst_axs :: inst_axs_imm8
|
|
emit_axs :: emit_axs_imm8
|
|
inst_las :: inst_las_m
|
|
emit_las :: emit_las_m
|
|
inst_ane :: inst_ane_imm8
|
|
emit_ane :: emit_ane_imm8
|
|
inst_lxa :: inst_lxa_imm8
|
|
emit_lxa :: emit_lxa_imm8
|
|
inst_sha :: inst_sha_m
|
|
emit_sha :: emit_sha_m
|
|
inst_shx :: inst_shx_m
|
|
emit_shx :: emit_shx_m
|
|
inst_shy :: inst_shy_m
|
|
emit_shy :: emit_shy_m
|
|
inst_tas :: inst_tas_m
|
|
emit_tas :: emit_tas_m
|
|
inst_jam :: inst_jam_none
|
|
emit_jam :: emit_jam_none
|
|
inst_usbc :: inst_usbc_imm8
|
|
emit_usbc :: emit_usbc_imm8
|
|
inst_dop :: proc{ inst_dop_imm8, inst_dop_m }
|
|
emit_dop :: proc{ emit_dop_imm8, emit_dop_m }
|
|
inst_top :: inst_top_m
|
|
emit_top :: emit_top_m
|
|
inst_bra :: inst_bra_rel
|
|
emit_bra :: emit_bra_rel
|
|
inst_ina :: inst_ina_a
|
|
emit_ina :: emit_ina_a
|
|
inst_dea :: inst_dea_a
|
|
emit_dea :: emit_dea_a
|
|
inst_phx :: inst_phx_none
|
|
emit_phx :: emit_phx_none
|
|
inst_phy :: inst_phy_none
|
|
emit_phy :: emit_phy_none
|
|
inst_plx :: inst_plx_none
|
|
emit_plx :: emit_plx_none
|
|
inst_ply :: inst_ply_none
|
|
emit_ply :: emit_ply_none
|
|
inst_stz :: inst_stz_m
|
|
emit_stz :: emit_stz_m
|
|
inst_trb :: inst_trb_m
|
|
emit_trb :: emit_trb_m
|
|
inst_tsb :: inst_tsb_m
|
|
emit_tsb :: emit_tsb_m
|
|
inst_stp :: inst_stp_none
|
|
emit_stp :: emit_stp_none
|
|
inst_wai :: inst_wai_none
|
|
emit_wai :: emit_wai_none
|
|
inst_rmb0 :: inst_rmb0_m
|
|
emit_rmb0 :: emit_rmb0_m
|
|
inst_rmb1 :: inst_rmb1_m
|
|
emit_rmb1 :: emit_rmb1_m
|
|
inst_rmb2 :: inst_rmb2_m
|
|
emit_rmb2 :: emit_rmb2_m
|
|
inst_rmb3 :: inst_rmb3_m
|
|
emit_rmb3 :: emit_rmb3_m
|
|
inst_rmb4 :: inst_rmb4_m
|
|
emit_rmb4 :: emit_rmb4_m
|
|
inst_rmb5 :: inst_rmb5_m
|
|
emit_rmb5 :: emit_rmb5_m
|
|
inst_rmb6 :: inst_rmb6_m
|
|
emit_rmb6 :: emit_rmb6_m
|
|
inst_rmb7 :: inst_rmb7_m
|
|
emit_rmb7 :: emit_rmb7_m
|
|
inst_smb0 :: inst_smb0_m
|
|
emit_smb0 :: emit_smb0_m
|
|
inst_smb1 :: inst_smb1_m
|
|
emit_smb1 :: emit_smb1_m
|
|
inst_smb2 :: inst_smb2_m
|
|
emit_smb2 :: emit_smb2_m
|
|
inst_smb3 :: inst_smb3_m
|
|
emit_smb3 :: emit_smb3_m
|
|
inst_smb4 :: inst_smb4_m
|
|
emit_smb4 :: emit_smb4_m
|
|
inst_smb5 :: inst_smb5_m
|
|
emit_smb5 :: emit_smb5_m
|
|
inst_smb6 :: inst_smb6_m
|
|
emit_smb6 :: emit_smb6_m
|
|
inst_smb7 :: inst_smb7_m
|
|
emit_smb7 :: emit_smb7_m
|
|
inst_bbr0 :: inst_bbr0_zp_rel
|
|
emit_bbr0 :: emit_bbr0_zp_rel
|
|
inst_bbr1 :: inst_bbr1_zp_rel
|
|
emit_bbr1 :: emit_bbr1_zp_rel
|
|
inst_bbr2 :: inst_bbr2_zp_rel
|
|
emit_bbr2 :: emit_bbr2_zp_rel
|
|
inst_bbr3 :: inst_bbr3_zp_rel
|
|
emit_bbr3 :: emit_bbr3_zp_rel
|
|
inst_bbr4 :: inst_bbr4_zp_rel
|
|
emit_bbr4 :: emit_bbr4_zp_rel
|
|
inst_bbr5 :: inst_bbr5_zp_rel
|
|
emit_bbr5 :: emit_bbr5_zp_rel
|
|
inst_bbr6 :: inst_bbr6_zp_rel
|
|
emit_bbr6 :: emit_bbr6_zp_rel
|
|
inst_bbr7 :: inst_bbr7_zp_rel
|
|
emit_bbr7 :: emit_bbr7_zp_rel
|
|
inst_bbs0 :: inst_bbs0_zp_rel
|
|
emit_bbs0 :: emit_bbs0_zp_rel
|
|
inst_bbs1 :: inst_bbs1_zp_rel
|
|
emit_bbs1 :: emit_bbs1_zp_rel
|
|
inst_bbs2 :: inst_bbs2_zp_rel
|
|
emit_bbs2 :: emit_bbs2_zp_rel
|
|
inst_bbs3 :: inst_bbs3_zp_rel
|
|
emit_bbs3 :: emit_bbs3_zp_rel
|
|
inst_bbs4 :: inst_bbs4_zp_rel
|
|
emit_bbs4 :: emit_bbs4_zp_rel
|
|
inst_bbs5 :: inst_bbs5_zp_rel
|
|
emit_bbs5 :: emit_bbs5_zp_rel
|
|
inst_bbs6 :: inst_bbs6_zp_rel
|
|
emit_bbs6 :: emit_bbs6_zp_rel
|
|
inst_bbs7 :: inst_bbs7_zp_rel
|
|
emit_bbs7 :: emit_bbs7_zp_rel
|
|
inst_sxy :: inst_sxy_none
|
|
emit_sxy :: emit_sxy_none
|
|
inst_sax :: inst_sax_none
|
|
emit_sax :: emit_sax_none
|
|
inst_say :: inst_say_none
|
|
emit_say :: emit_say_none
|
|
inst_cla :: inst_cla_none
|
|
emit_cla :: emit_cla_none
|
|
inst_clx :: inst_clx_none
|
|
emit_clx :: emit_clx_none
|
|
inst_cly :: inst_cly_none
|
|
emit_cly :: emit_cly_none
|
|
inst_csh :: inst_csh_none
|
|
emit_csh :: emit_csh_none
|
|
inst_csl :: inst_csl_none
|
|
emit_csl :: emit_csl_none
|
|
inst_set :: inst_set_none
|
|
emit_set :: emit_set_none
|
|
inst_st0 :: inst_st0_imm8
|
|
emit_st0 :: emit_st0_imm8
|
|
inst_st1 :: inst_st1_imm8
|
|
emit_st1 :: emit_st1_imm8
|
|
inst_st2 :: inst_st2_imm8
|
|
emit_st2 :: emit_st2_imm8
|
|
inst_tam :: inst_tam_imm8
|
|
emit_tam :: emit_tam_imm8
|
|
inst_tma :: inst_tma_imm8
|
|
emit_tma :: emit_tma_imm8
|
|
inst_tst :: inst_tst_tst
|
|
emit_tst :: emit_tst_tst
|
|
inst_bsr :: inst_bsr_rel
|
|
emit_bsr :: emit_bsr_rel
|
|
inst_tii :: inst_tii_block
|
|
emit_tii :: emit_tii_block
|
|
inst_tdd :: inst_tdd_block
|
|
emit_tdd :: emit_tdd_block
|
|
inst_tin :: inst_tin_block
|
|
emit_tin :: emit_tin_block
|
|
inst_tia :: inst_tia_block
|
|
emit_tia :: emit_tia_block
|
|
inst_tai :: inst_tai_block
|
|
emit_tai :: emit_tai_block
|