[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 3 15:29:28 PDT 2024


================
@@ -1088,6 +1115,34 @@ ParseStatus SparcAsmParser::parseASITag(OperandVector &Operands) {
   return ParseStatus::Success;
 }
 
+ParseStatus SparcAsmParser::parsePrefetchTag(OperandVector &Operands) {
+  SMLoc S = Parser.getTok().getLoc();
+  SMLoc E = Parser.getTok().getEndLoc();
+  int64_t PrefetchVal = 0;
+
+  if (getLexer().getKind() == AsmToken::Hash) {
+    SMLoc TagStart = getLexer().peekTok(false).getLoc();
+    Parser.Lex(); // Eat the '#'.
+    auto PrefetchName = Parser.getTok().getString();
+    auto PrefetchTag = SparcPrefetchTag::lookupPrefetchTagByName(PrefetchName);
----------------
koachan wrote:

Here I am following the code from the [ASI tag handling](https://github.com/llvm/llvm-project/pull/94249/files/2b16c922835eda4759b3372da362293efcc9c0f4#diff-e6d91775e25820bb2665f18e0bf771e71fd8351ae05a8895d25b9b43007a0c4eR1093-R1094)
Should I change it?

https://github.com/llvm/llvm-project/pull/94249


More information about the llvm-branch-commits mailing list