Closed fpedd closed 3 years ago
Static arguments in function calls will now be correctly handled.
This behaviour code for example:
val _vtype[XLEN] <= CSR[VTYPE_ADDR]; val _vstart[XLEN] <= CSR[VSTART_ADDR]; val _vl[XLEN] <= CSR[VL_ADDR]; val _vlen[XLEN] <= CSR[VLENB_ADDR]*8; val ret[XLEN] <= fdispatch_vadd_vv(V, _vtype, vm, vd, vs1, vs2, _vstart, _vlen, _vl);
would have been converted to this code:
... partInit.code() += "etiss_uint32 ret = vadd_vv(((RISCV*)cpu)->V, _vtype, vm, vd, vs1, vs2, _vstart, _vlen, _vl);\n";
which would have caused an Error, as vm, vd and so on are not defined in the code that gets handed to the JIT. This statement now gets converted to:
vm
vd
... partInit.code() += "etiss_uint32 ret = vadd_vv(((RISCV*)cpu)->V, _vtype, " + std::to_string(vm) + ", " + std::to_string(vd) + ", " + std::to_string(vs1) + ", " + std::to_string(vs2) + ", _vstart, _vlen, _vl);\n";
Static arguments in function calls will now be correctly handled.
This behaviour code for example:
would have been converted to this code:
which would have caused an Error, as
vm
,vd
and so on are not defined in the code that gets handed to the JIT. This statement now gets converted to: