Skip to content

Commit f3c6033

Browse files
committed
Add default argument for printSVERegOp
1 parent a7d6b2f commit f3c6033

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ We use the following emitter backends
9090
If this still doesn't fix the problem, the code snipped wasn't passed through `translateToC()` before emitting.
9191
So you need to figure out where this specific code snipped is printed and add `translateToC()`.
9292

93+
- Template functions with default values for their arguments, don't get replaced properly.
94+
See: `handleDefaultArg()` in `PrinterCapstone.cpp` to add the default argument value.
95+
9396
- If the mapping files miss operand types or access information, then the `.td` files are incomplete (happens surprisingly often).
9497
You need to search for the instruction or operands with missing or incorrect values and fix them.
9598
```

llvm/utils/TableGen/PrinterCapstone.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,10 @@ static std::string handleDefaultArg(const std::string &TargetName,
690690
AArch64TemplFuncWithDefaults = {// Default is 1
691691
{"printVectorIndex", "1"},
692692
// Default is false == 0
693-
{"printPrefetchOp", "0"}};
693+
{"printPrefetchOp", "0"},
694+
// Default is 0
695+
{"printSVERegOp", "0"}
696+
};
694697
SmallVector<std::pair<std::string, std::string>> *TemplFuncWithDefaults;
695698
if (TargetName == "AArch64")
696699
TemplFuncWithDefaults = &AArch64TemplFuncWithDefaults;

0 commit comments

Comments
 (0)