aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/TableGen/Parser.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 19:38:37 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 19:38:37 +0800
commit98cae0e8835a1eb8fcb0e43870c04ed934cc51ac (patch)
tree3c5b198778900ed13e2bb429b32ae91bff540548 /backend/lib/TableGen/Parser.cpp
parent9d1485c0dd4d071e590c18fb8aa02095de3cc830 (diff)
downloadrcc-project-98cae0e8835a1eb8fcb0e43870c04ed934cc51ac.tar.gz
rcc-project-98cae0e8835a1eb8fcb0e43870c04ed934cc51ac.tar.xz
[CodeGen] Match LLVM branch relaxation semantics
Diffstat (limited to 'backend/lib/TableGen/Parser.cpp')
-rw-r--r--backend/lib/TableGen/Parser.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/backend/lib/TableGen/Parser.cpp b/backend/lib/TableGen/Parser.cpp
index a14385c..66d10e0 100644
--- a/backend/lib/TableGen/Parser.cpp
+++ b/backend/lib/TableGen/Parser.cpp
@@ -1027,8 +1027,8 @@ private:
{"id", "symbol", "name", "assembly_mnemonic", "encoding", "operands",
"num_explicit_defs", "variadic", "implicit_defs", "implicit_uses",
"allow_extra_implicit_operands", "flags", "scheduling_class",
- "encoding_category", "assembly_format", "requires_memory_operands", "owner",
- "deadline"},
+ "encoding_category", "size", "assembly_format", "requires_memory_operands",
+ "owner", "deadline"},
"instruction")) {
return false;
}
@@ -1080,6 +1080,12 @@ private:
return false;
Instruction.EncodingCategorySymbol = *Value;
}
+ if (const yaml::Node *Size = optionalNode(*Element, "size")) {
+ const auto Value = unsignedInteger32(*Size, "instruction size");
+ if (!Value)
+ return false;
+ Instruction.SizeInBytes = *Value;
+ }
if (const yaml::Node *AssemblyFormat = optionalNode(*Element, "assembly_format")) {
const auto Value = scalar(*AssemblyFormat, "instruction assembly_format");
if (!Value)