This patch implements recently ratified extension Zmmul, a subextension of M (Integer Multiplication and Division) consisting only multiplication part of it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Yes, that, but also RISCVAsmParser::parseDirectiveAttribute and ELFObjectFileBase::getRISCVFeatures, though it seems that last one has been a bit neglected.
clang/lib/Basic/Targets/RISCV.cpp | ||
---|---|---|
268–269 | These are supposed to be (approximately) sorted in terms of their canonical ordering. I don't know where Zmmul is proposed to go relative to the other Zfoo's, but it belongs down somewhere in there, I guess alphabetical if we don't know any better, not up here with the single-letter extensions. | |
llvm/lib/Target/RISCV/RISCVSubtarget.h | ||
48 | Ditto | |
152 | Ditto |
I have took a look into ELFObjectFile.cpp but I am not sure what work I need to do there since it seems other Z* extensions are not being handled there.
llvm/lib/Target/RISCV/RISCVSubtarget.h | ||
---|---|---|
48 | The pattern here seems to be that Z* extensions is following its parent their parent extensions, should we follow it? (See B and V) |
llvm/lib/Target/RISCV/RISCVSubtarget.h | ||
---|---|---|
48 | But for Zfh it is not following HasStdExtF 🤔 |
At minimum it probably needs to rebased because RISCVISAInfo.cpp has been added to cut down on some duplication.
Make Zmmul extension independent instead of implied by M extension for backward ELF attribute compatibility.
Rebase and update use of M extension existence check to include Zmmul whenever needed.
llvm/lib/Support/RISCVISAInfo.cpp | ||
---|---|---|
80 | If it is ratified, is the version really 0.1? |
llvm/lib/Support/RISCVISAInfo.cpp | ||
---|---|---|
80 | It looks like it should be 1.0 now https://github.com/riscv/riscv-isa-manual/commit/f518c259c008f926eba4aba67804f62531b6e94b |
These are supposed to be (approximately) sorted in terms of their canonical ordering. I don't know where Zmmul is proposed to go relative to the other Zfoo's, but it belongs down somewhere in there, I guess alphabetical if we don't know any better, not up here with the single-letter extensions.