Closed Nelson1225 closed 4 years ago
I'm assuming two patches cherry picked from the FSF tree, and I only need to review the one new one.
All fixed. The first and second commits are picked from upstream. I move the zvediv extension checking into the mygetVsetvliExpression in the third commit. And replace some magic constants with the OP* masks for my_getVsetvliExpression in the forth commit.
Thanks a lot :)
There are four Z sub-extensions for vector, Zvamo, Zvediv, Zvlsseg and Zvqmac. The vector base is present before adding any of current Zv* extensions.
Zvamo (vamo*) Enable vector AMO instructions. If the extension is supported, then the atomic operations from the standard A extension must be present, too.
Zvediv If the extension isn't supported, then the vediv field of vtype shouldn't be set by vsetvli instruction. Report the warning message for the constraint case. Since we just report the warning message for the constraint case, we still regard vetvli as an INSN_CLASS_V instruction rather than an INSN_CLASS_V_AND_ZVEDIV. We check whether the zvediv ext is enabled when parsing the Vc operand.
Zvlsseg (vlseg, vlsseg, vlxseg, vsseg, vssseg and vsxseg*) Enable vector load/store segment instructions.
Zvqmac (vqmaccu, vqmaccsu and vqmaccus*) Enable vector quad-widening integer multiply-add instructions.