shecc
shecc copied to clipboard
Allow riscv-codegen to generate executable mul instruction without RV32M
Add new compiler option +m/-m as the switch to take whether m extension or not.
Check the global variable "use_m_ext" before riscv-codegen going to call __mul()/__div()/__mod().
If there is no m extension, replace __mul()/__div()/__mod() with __addi(zero, zero, 0) as the no operation in riscv.
Please remove generated file mul_test
@oucs638, would you rework this patch?
The proposed change was far away from the mainline. Drop it.