projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17a36c7
)
[RISCV] Fix the problem of parsing long version numbers
author
Shao-Ce SUN
<sunshaoce@iscas.ac.cn>
Tue, 28 Jun 2022 03:30:53 +0000
(11:30 +0800)
committer
Shao-Ce SUN
<sunshaoce@iscas.ac.cn>
Tue, 28 Jun 2022 03:48:14 +0000
(11:48 +0800)
For example, when parsing Zbpbo0p911, an error will be reported:
"multi-character extensions must be separated by underscores"
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D128644
llvm/lib/Support/RISCVISAInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/RISCVISAInfo.cpp
b/llvm/lib/Support/RISCVISAInfo.cpp
index
6b2614d
..
1057dba
100644
(file)
--- a/
llvm/lib/Support/RISCVISAInfo.cpp
+++ b/
llvm/lib/Support/RISCVISAInfo.cpp
@@
-348,7
+348,7
@@
static Error getExtensionVersion(StringRef Ext, StringRef In, unsigned &Major,
if (!MajorStr.empty() && In.consume_front("p")) {
MinorStr = In.take_while(isDigit);
- In = In.substr(MajorStr.size() + 1);
+ In = In.substr(MajorStr.size() +
MinorStr.size() -
1);
// Expected 'p' to be followed by minor version number.
if (MinorStr.empty()) {