[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-05-04 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/test/MC/RISCV/rv32zcmt-invalid.s:9 + +# CHECK-ERROR: error: immediate must be an integer in the range [0, 255] +cm.jalt 256 This is wrong; the immediate must be in the range [32, 255]. This needs to be enforced in t

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-05-03 Thread Xinlong Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f0d725744aa: [RISCV] Add MC support of RISCV zcmt Extension (authored by VincentWu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://revi

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-05-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 ___

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-05-02 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 518653. VincentWu marked an inline comment as done. VincentWu added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:916 + "'zcmt' is incompatible with 'c' or 'zcd' " + "extensions when 'd' extensions is set"); + 'd' extensions - > 'd' extens

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:915 +return createStringError(errc::invalid_argument, + "'zcmt' is incompatible with 'c' or 'zcd' " + "extensions when 'd' extensions is s

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-26 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 517078. VincentWu marked 2 inline comments as done. VincentWu added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/P

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper requested changes to this revision. craig.topper added inline comments. This revision now requires changes to proceed. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:853 Error RISCVISAInfo::checkDependency() { + bool HasC = Exts.count("c") != 0; bool HasD = Exts.

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-25 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng accepted this revision. kito-cheng added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 ___

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-25 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 516722. VincentWu added a comment. paraphrase grammar of error msg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/Preprocessor/riscv-target-fea

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-25 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 516718. VincentWu marked 2 inline comments as done. VincentWu added a comment. rebase & address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: cl

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-24 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:903 +return createStringError(errc::invalid_argument, + "zcmt is not allowed when c is specified"); + craig.topper wrote: > Extension names should be i

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-22 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu added inline comments. Comment at: lld/ELF/InputSection.h:404 -static_assert(sizeof(InputSection) <= 152, "InputSection is too big"); +static_assert(sizeof(InputSection) <= 160, "InputSection is too big"); kito-cheng wrote: > Why we need this change

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-22 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 516043. VincentWu marked 2 inline comments as done. VincentWu added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/P

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:903 +return createStringError(errc::invalid_argument, + "zcmt is not allowed when c is specified"); + Extension names should be in single quotes. Sh

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-18 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: lld/ELF/InputSection.h:404 -static_assert(sizeof(InputSection) <= 152, "InputSection is too big"); +static_assert(sizeof(InputSection) <= 160, "InputSection is too big"); Why we need this change? Repository: r

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-03 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 510667. VincentWu added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/Preprocessor/riscv-target-features.c lld/E

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-04-03 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 510664. VincentWu marked an inline comment as done. VincentWu added a comment. Herald added a subscriber: jobnoorman. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-02-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoZc.td:135 +def CM_JT : RVInst16CJ<0b101, 0b10, (outs), (ins uimm5:$index), + "cm.jt", "$index">{ + bits<5> index; Indent 1 more space Repository: rG LLVM

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2023-02-14 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 497293. VincentWu added a comment. Herald added subscribers: luke, emaste. update to v1.0 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/Prepro

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-10-22 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:366 + "'Zcmt' (table jump instuctions for code-size reduction)", + [FeatureExtZca]>; // TODO: add Zicsr as another dependence +def HasStdExtZcmt : Predicate<

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-10-22 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 469947. VincentWu marked 12 inline comments as done. VincentWu edited the summary of this revision. VincentWu added a comment. - update the document - Throw an error when `+c` and `+zcmt` are both specified - test CSR Repository: rG LLVM Github Monorepo

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-30 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:366 + "'Zcmt' (table jump instuctions for code-size reduction)", + [FeatureExtZca]>; // TODO: add Zicsr as another dependence +def HasStdExtZcmt : Predicate<"Su

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:367 + [FeatureExtZca]>; // TODO: add Zicsr as another dependence +def HasStdExtZcmt : Predicate<"Subtarget->hasStdExtZcmt() && !Subtarget->hasStdExtC()">, +

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCV.td:367 + [FeatureExtZca]>; // TODO: add Zicsr as another dependence +def HasStdExtZcmt : Predicate<"Subtarget->hasStdExtZcmt() && !Subtarget->hasStdExtC()">, +

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-28 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. Please add to the review description a link to the appropriate specification. Please update docs/RISCVUsage.rst to add Zcmt, and link to the specification. It's impossible to review e.g. encoding without knowing what you're implementing. Comment at:

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-26 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 463097. VincentWu marked 5 inline comments as done. VincentWu added a comment. update & address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: cl

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/test/MC/RISCV/rv32zcmt-Invalid.s:5 +# CHECK-ERROR: error: immediate must be an integer in the range [0, 63] +cm.jt 64 Why no invalid test for cm.jalt? Comment at: llvm/test/MC/RISCV/rv32zcmt-

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-14 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu updated this revision to Diff 460266. VincentWu added a comment. fix test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133863/new/ https://reviews.llvm.org/D133863 Files: clang/test/Preprocessor/riscv-target-features.c llvm/lib

[PATCH] D133863: [RISCV] Add MC support of RISCV zcmt Extension

2022-09-14 Thread Xinlong Wu via Phabricator via cfe-commits
VincentWu created this revision. VincentWu added reviewers: kito-cheng, MaskRay, craig.topper, jrtc27, HsiangKai, asb. Herald added subscribers: sunshaoce, luke957, StephenFan, vkmr, frasercrmck, jdoerfert, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, Pkm