v2.0.0
Macros
hazard3.h File Reference
`#include "pico.h"`
`#include "hardware/riscv.h"`
`#include "hardware/regs/rvcsr.h"`
Include dependency graph for hazard3.h:

Go to the source code of this file.

## Macros
#define | __hazard3_extension_xh3power
#define | __hazard3_extension_xh3bextm
#define | __hazard3_extension_xh3irq
#define | __hazard3_extension_xh3pmpm
#define | hazard3_irqarray_read(csr, index) (riscv_read_set_csr(csr, (index)) >> 16)
#define | hazard3_irqarray_write(csr, index, data) (riscv_write_csr(csr, (index) | ((uint32_t)(data) << 16)))
#define | hazard3_irqarray_set(csr, index, data) (riscv_set_csr(csr, (index) | ((uint32_t)(data) << 16)))
#define | hazard3_irqarray_clear(csr, index, data) (riscv_clear_csr(csr, (index) | ((uint32_t)(data) << 16)))
#define | __hazard3_bextm(nbits, rs1, rs2)
#define | __hazard3_bextmi(nbits, rs1, shamt)
#define | __hazard3_block() asm volatile ("slt x0, x0, x0" : : : "memory")
#define | __hazard3_unblock() asm volatile ("slt x0, x0, x1" : : : "memory")

## Macro Definition Documentation

## ◆ __hazard3_bextm

#define __hazard3_bextm | ( |  | nbits,
|  |  | rs1,
|  |  | rs2
| ) |  |

Value:
({\
uint32_t __h3_bextm_rd; \
asm (".insn r 0x0b, 0, %3, %0, %1, %2"\
: "=r" (__h3_bextm_rd) \
: "r" (rs1), "r" (rs2), "i" ((((nbits) - 1) & 0x7) << 1)\
); \
__h3_bextm_rd; \
})

## ◆ __hazard3_bextmi

#define __hazard3_bextmi | ( |  | nbits,
|  |  | rs1,
|  |  | shamt
| ) |  |

Value:
({\
uint32_t __h3_bextmi_rd; \
asm (".insn i 0x0b, 0x4, %0, %1, %2"\
: "=r" (__h3_bextmi_rd) \
: "r" (rs1), "i" ((((nbits) - 1) & 0x7) << 6 | ((shamt) & 0x1f)) \
); \
__h3_bextmi_rd; \
})