|
OpenOCD
|


Go to the source code of this file.
Macros | |
| #define | MAX_CSR_NUM 4095 |
| #define | MAX_FPR_NUM 31 |
| #define | MAX_GPR_NUM 31 |
| #define | MAX_INT12 0x7ff |
| #define | MAX_INT13 0xfff |
| #define | MAX_INT21 0xfffff |
| #define | MAX_UINT11 0x7ff |
| #define | MAX_UINT12 0xfff |
| #define | MAX_UINT5 0x1f |
| #define | MAX_VREG_NUM 31 |
| #define | MIN_INT12 (-0x800) |
| #define | MIN_INT13 (-0x1000) |
| #define | MIN_INT21 (-0x100000) |
| #define | S0 8 |
| #define | S1 9 |
| #define | T0 5 |
| #define | ZERO 0 |
Functions | |
| static uint32_t | addi (unsigned int dest, unsigned int src, int16_t imm) __attribute__((unused)) |
| static uint32_t | auipc (unsigned int dest) __attribute__((unused)) |
| static uint32_t | bit (uint32_t value, unsigned int b) |
| static uint32_t | bits (uint32_t value, unsigned int hi, unsigned int lo) |
| static uint32_t | csrr (unsigned int rd, unsigned int csr) __attribute__((unused)) |
| static uint32_t | csrrci (unsigned int rd, uint8_t zimm, unsigned int csr) __attribute__((unused)) |
| static uint32_t | csrrs (unsigned int rd, unsigned int rs, unsigned int csr) __attribute__((unused)) |
| static uint32_t | csrrsi (unsigned int rd, uint8_t zimm, unsigned int csr) __attribute__((unused)) |
| static uint32_t | csrrw (unsigned int rd, unsigned int rs, unsigned int csr) __attribute__((unused)) |
| static uint32_t | csrsi (unsigned int csr, uint8_t imm) __attribute__((unused)) |
| static uint32_t | csrw (unsigned int source, unsigned int csr) __attribute__((unused)) |
| static uint32_t | ebreak (void) __attribute__((unused)) |
| static uint32_t | ebreak_c (void) __attribute__((unused)) |
| static uint32_t | fence_i (void) __attribute__((unused)) |
| static uint32_t | fence_rw_rw (void) __attribute__((unused)) |
| static uint32_t | fld (unsigned int dest, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | flw (unsigned int dest, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | fmv_d_x (unsigned int dest, unsigned int src) __attribute__((unused)) |
| static uint32_t | fmv_w_x (unsigned int dest, unsigned int src) __attribute__((unused)) |
| static uint32_t | fmv_x_d (unsigned int dest, unsigned int src) __attribute__((unused)) |
| static uint32_t | fmv_x_w (unsigned int dest, unsigned int src) __attribute__((unused)) |
| static uint32_t | fsd (unsigned int src, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | fsw (unsigned int src, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | imm_b (uint32_t imm) __attribute__((unused)) |
| static uint32_t | imm_i (uint32_t imm) __attribute__((unused)) |
| static uint32_t | imm_j (uint32_t imm) __attribute__((unused)) |
| static uint32_t | imm_s (uint32_t imm) __attribute__((unused)) |
| static uint32_t | imm_u (uint32_t imm) __attribute__((unused)) |
| static uint32_t | inst_rd (uint32_t r) __attribute__((unused)) |
| static uint32_t | inst_rs1 (uint32_t r) __attribute__((unused)) |
| static uint32_t | inst_rs2 (uint32_t r) __attribute__((unused)) |
| static uint32_t | jal (unsigned int rd, int32_t imm) __attribute__((unused)) |
| static uint32_t | lb (unsigned int rd, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | ld (unsigned int rd, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | lh (unsigned int rd, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | lui (unsigned int dest, uint32_t imm) __attribute__((unused)) |
| static uint32_t | lw (unsigned int rd, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | sb (unsigned int src, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | sd (unsigned int src, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | sh (unsigned int src, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | srli (unsigned int dest, unsigned int src, uint8_t shamt) __attribute__((unused)) |
| static uint32_t | sw (unsigned int src, unsigned int base, int16_t offset) __attribute__((unused)) |
| static uint32_t | vmv_s_x (unsigned int vd, unsigned int rs2) __attribute__((unused)) |
| static uint32_t | vmv_x_s (unsigned int rd, unsigned int vs2) __attribute__((unused)) |
| static uint32_t | vsetvl (unsigned int rd, unsigned int rs1, unsigned int rs2) __attribute__((unused)) |
| static uint32_t | vsetvli (unsigned int dest, unsigned int src, uint16_t vtypei) __attribute__((unused)) |
| static uint32_t | vslide1down_vx (unsigned int vd, unsigned int vs2, unsigned int rs1, bool vm) __attribute__((unused)) |
| static uint32_t | wfi (void) __attribute__((unused)) |
| static uint32_t | xori (unsigned int dest, unsigned int src, int16_t imm) __attribute__((unused)) |
|
static |
Definition at line 201 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_ADDI, MAX_GPR_NUM, MAX_INT12, and MIN_INT12.
Referenced by riscv_program_addi(), and setup_write_memory().
|
static |
Definition at line 392 of file opcodes.h.
References inst_rd(), MATCH_AUIPC, and MAX_GPR_NUM.
Referenced by examine_progbuf().
|
static |
Definition at line 39 of file opcodes.h.
Referenced by armjtagew_tap_append_step(), at91sam9_read_page(), ath79_spi_bitbang_codegen(), buspirate_tap_append(), cmsis_dap_add_tms_sequence(), COMMAND_HANDLER(), em357_protect(), ft232r_bit_number_to_name(), imm_b(), imm_j(), jtag_add_statemove(), nrf52_protect_check_bprot(), rsl10_protect(), usbprog_jtag_set_bit(), and vsllink_tap_append_step().
|
static |
|
static |
Definition at line 211 of file opcodes.h.
References csr, imm_i(), inst_rd(), MATCH_CSRRS, MAX_CSR_NUM, and MAX_GPR_NUM.
Referenced by halt(), handle_halt_routine(), read_remote_csr(), register_read(), vl_write_progbuf(), and vtype_write_progbuf().
|
static |
Definition at line 240 of file opcodes.h.
References csr, imm_i(), inst_rd(), inst_rs1(), MATCH_CSRRCI, MAX_CSR_NUM, MAX_GPR_NUM, and MAX_UINT5.
Referenced by riscv_program_csrrci().
|
static |
Definition at line 220 of file opcodes.h.
References csr, imm_i(), inst_rd(), inst_rs1(), MATCH_CSRRS, MAX_CSR_NUM, MAX_GPR_NUM, and rs.
Referenced by riscv_program_csrr().
|
static |
Definition at line 250 of file opcodes.h.
References csr, imm_i(), inst_rd(), inst_rs1(), MATCH_CSRRSI, MAX_CSR_NUM, MAX_GPR_NUM, and MAX_UINT5.
Referenced by riscv_program_csrrsi().
|
static |
Definition at line 230 of file opcodes.h.
References csr, imm_i(), inst_rd(), inst_rs1(), MATCH_CSRRW, MAX_CSR_NUM, MAX_GPR_NUM, and rs.
Referenced by riscv_program_csrw().
|
static |
Definition at line 103 of file opcodes.h.
References csr, imm_i(), inst_rs1(), MATCH_CSRRSI, MAX_CSR_NUM, and MAX_UINT5.
Referenced by halt().
|
static |
Definition at line 192 of file opcodes.h.
References csr, imm_i(), inst_rs1(), MATCH_CSRRW, MAX_CSR_NUM, MAX_GPR_NUM, and source.
Referenced by assert_reset(), execute_resume(), register_write(), riscv011_get_register(), and write_remote_csr().
|
static |
Definition at line 336 of file opcodes.h.
References MATCH_EBREAK.
Referenced by riscv_add_breakpoint(), and riscv_program_ebreak().
|
static |
Definition at line 341 of file opcodes.h.
References MATCH_C_EBREAK.
Referenced by riscv_add_breakpoint().
|
static |
Definition at line 350 of file opcodes.h.
References MATCH_FENCE_I.
Referenced by execute_resume(), and riscv_program_fence_i().
|
static |
Definition at line 385 of file opcodes.h.
References MATCH_FENCE.
Referenced by riscv_program_fence_rw_rw().
|
static |
Definition at line 290 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_FLD, MAX_FPR_NUM, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by fpr_write_progbuf(), and register_write().
|
static |
Definition at line 280 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_FLW, MAX_FPR_NUM, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by register_write().
|
static |
Definition at line 327 of file opcodes.h.
References inst_rd(), inst_rs1(), MATCH_FMV_D_X, MAX_FPR_NUM, and MAX_GPR_NUM.
Referenced by fpr_write_progbuf().
|
static |
Definition at line 318 of file opcodes.h.
References inst_rd(), inst_rs1(), MATCH_FMV_W_X, MAX_FPR_NUM, and MAX_GPR_NUM.
Referenced by fpr_write_progbuf().
|
static |
Definition at line 309 of file opcodes.h.
References inst_rd(), inst_rs1(), MATCH_FMV_X_D, MAX_FPR_NUM, and MAX_GPR_NUM.
Referenced by fpr_read_progbuf().
|
static |
Definition at line 300 of file opcodes.h.
References inst_rd(), inst_rs1(), MATCH_FMV_X_W, MAX_FPR_NUM, and MAX_GPR_NUM.
Referenced by fpr_read_progbuf().
|
static |
Definition at line 270 of file opcodes.h.
References imm_s(), inst_rs1(), inst_rs2(), MATCH_FSD, MAX_FPR_NUM, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by fpr_read_progbuf(), and riscv011_get_register().
|
static |
Definition at line 260 of file opcodes.h.
References imm_s(), inst_rs1(), inst_rs2(), MATCH_FSW, MAX_FPR_NUM, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by riscv011_get_register().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 45 of file opcodes.h.
References bits().
Referenced by addi(), auipc(), csrr(), csrrci(), csrrs(), csrrsi(), csrrw(), fld(), flw(), fmv_d_x(), fmv_w_x(), fmv_x_d(), fmv_x_w(), jal(), lb(), ld(), lh(), lui(), lw(), srli(), vmv_s_x(), vmv_x_s(), vsetvl(), vsetvli(), vslide1down_vx(), and xori().
|
static |
Definition at line 51 of file opcodes.h.
References bits().
Referenced by addi(), csrrci(), csrrs(), csrrsi(), csrrw(), csrsi(), csrw(), fld(), flw(), fmv_d_x(), fmv_w_x(), fmv_x_d(), fmv_x_w(), fsd(), fsw(), lb(), ld(), lh(), lw(), sb(), sd(), sh(), srli(), sw(), vmv_s_x(), vsetvl(), vsetvli(), vslide1down_vx(), and xori().
|
static |
|
static |
Definition at line 93 of file opcodes.h.
References imm_j(), inst_rd(), MATCH_JAL, MAX_GPR_NUM, MAX_INT21, and MIN_INT21.
Referenced by cache_set_jump(), dram_write_jump(), and scans_add_write_jump().
|
static |
Definition at line 182 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_LB, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by buf_set_buf(), read_memory(), riscv_program_lbr(), and setup_write_memory().
|
static |
Definition at line 152 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_LD, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by load(), and riscv_program_ldr().
|
static |
Definition at line 172 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_LH, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by arm_cti_cleanup_all(), arm_tpiu_swo_cleanup_all(), arm_tpiu_swo_poll_trace(), arm_tpiu_swo_service_connection_closed(), breakpoint_add(), COMMAND_HANDLER(), COMMAND_HELPER(), cortex_m_poll(), cti_instance_by_jim_obj(), dap_check_config(), dap_cleanup_all(), dap_cmd_new(), dap_init_all(), dap_instance_by_jim_obj(), esp_xtensa_smp_soft_reset_halt(), flush_journal(), get_target_with_common_rtos_type(), help_add_command(), help_del_all_commands(), help_del_command(), jtag_quit(), jtagdp_overrun_check(), list_count_nodes(), read_memory(), riscv_program_lhr(), setup_write_memory(), target_destroy(), telnet_auto_complete(), transport_register(), transport_select(), vdebug_run_jtag_queue(), and vdebug_run_reg_queue().
|
static |
|
static |
Definition at line 162 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_LW, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by assert_reset(), execute_resume(), load(), read_memory(), riscv_program_lwr(), and setup_write_memory().
|
static |
Definition at line 142 of file opcodes.h.
References imm_s(), inst_rs1(), inst_rs2(), MATCH_SB, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by buf_set_buf(), riscv_program_sbr(), and setup_write_memory().
|
static |
Definition at line 122 of file opcodes.h.
References imm_s(), inst_rs1(), inst_rs2(), MATCH_SD, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by riscv_program_sdr(), and store().
|
static |
Definition at line 132 of file opcodes.h.
References imm_s(), inst_rs1(), inst_rs2(), MATCH_SH, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by riscv_program_shr(), and setup_write_memory().
|
static |
Definition at line 375 of file opcodes.h.
References inst_rd(), inst_rs1(), inst_rs2(), MATCH_SRLI, MAX_GPR_NUM, and MAX_UINT5.
Referenced by examine().
|
static |
Definition at line 112 of file opcodes.h.
References imm_s(), inst_rs1(), inst_rs2(), MATCH_SW, MAX_GPR_NUM, MAX_INT12, MIN_INT12, and offset.
Referenced by examine(), examine_progbuf(), halt(), read_memory(), riscv_program_swr(), setup_write_memory(), and store().
|
static |
Definition at line 429 of file opcodes.h.
References inst_rd(), inst_rs1(), MATCH_VMV_S_X, MAX_GPR_NUM, and MAX_VREG_NUM.
|
static |
Definition at line 420 of file opcodes.h.
References inst_rd(), inst_rs2(), MATCH_VMV_X_S, MAX_GPR_NUM, and MAX_VREG_NUM.
Referenced by riscv013_get_register_buf().
|
static |
Definition at line 410 of file opcodes.h.
References inst_rd(), inst_rs1(), inst_rs2(), MATCH_VSETVL, and MAX_GPR_NUM.
Referenced by vl_write_progbuf(), and vtype_write_progbuf().
|
static |
Definition at line 400 of file opcodes.h.
References bits(), inst_rd(), inst_rs1(), MATCH_VSETVLI, MAX_GPR_NUM, and MAX_UINT11.
|
static |
Definition at line 439 of file opcodes.h.
References inst_rd(), inst_rs1(), inst_rs2(), MATCH_VSLIDE1DOWN_VX, MAX_GPR_NUM, and MAX_VREG_NUM.
Referenced by riscv013_get_register_buf(), and riscv013_set_register_buf().
|
static |
Definition at line 365 of file opcodes.h.
References imm_i(), inst_rd(), inst_rs1(), MATCH_XORI, MAX_GPR_NUM, MAX_INT12, and MIN_INT12.
Referenced by examine().