[PATCH] D133606: [AMDGPU][MC] Add detection of hardcoded literals in parser

Joe Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 06:54:32 PDT 2022


Joe_Nash added a comment.

I have previously used the name 'mandatory literals' to refer to these type of operands (in the disassembler). I think that's a slightly better term than hardcoded because to me hardcoded implies the value of the literal is constant. We should unify on one name in any case.

Is it possible to add a test with this? Something like assembling a VOPD with multiple literals and getting an error like "error: only one literal operand is allowed"? Or does that still require more functionality?

In the commit message, I think this statement is misleading "Hardcoded literals like those used by FMAAK/FMAMK should be ignored, because they are part of the instruction and cannot be changed." They are not ignored. Do you mean something like "Hardcoded literal locations like those used by FMAAK/FMAMK previously could not be reported as the error location"?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133606/new/

https://reviews.llvm.org/D133606



More information about the llvm-commits mailing list