A tool used for easing the pain of adding opcode and mask to risc-v binutils. Other example, see gen_opcode.py and gen_kadd.py.
from gen_opcode import *
# init instruction
kadd8 = Inst("kadd8")
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | |
index 7eff85b7ea..b0559f9612 100644 | |
--- a/bfd/bfd-in2.h | |
+++ b/bfd/bfd-in2.h | |
@@ -4414,6 +4414,8 @@ number for the SBIC, SBIS, SBI and CBI instructions */ | |
BFD_RELOC_RISCV_SET16, | |
BFD_RELOC_RISCV_SET32, | |
BFD_RELOC_RISCV_32_PCREL, | |
+ BFD_RELOC_RISCV_DECBNEZ, | |
+ BFD_RELOC_RISCV_C_DECBNEZ, |
// simple framework for timing, feel free to modify it. | |
#include <chrono> | |
#include <thread> | |
#include <iostream> | |
template <typename Type = std::chrono::milliseconds> class Timer; | |
template <typename Type = std::chrono::milliseconds> class scope_timer; | |
using timer_sec_t = Timer<std::chrono::seconds>; |