mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
[Sparc] Add return/rett instruction to Sparc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -446,6 +446,9 @@ ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc)
|
||||
return Error(StartLoc, "invalid register name");
|
||||
}
|
||||
|
||||
static void applyMnemonicAliases(StringRef &Mnemonic, unsigned Features,
|
||||
unsigned VariantID);
|
||||
|
||||
bool SparcAsmParser::
|
||||
ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
|
||||
SMLoc NameLoc,
|
||||
@@ -455,6 +458,9 @@ ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
|
||||
// First operand in MCInst is instruction mnemonic.
|
||||
Operands.push_back(SparcOperand::CreateToken(Name, NameLoc));
|
||||
|
||||
// apply mnemonic aliases, if any, so that we can parse operands correctly.
|
||||
applyMnemonicAliases(Name, getAvailableFeatures(), 0);
|
||||
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement)) {
|
||||
// Read the first operand.
|
||||
if (getLexer().is(AsmToken::Comma)) {
|
||||
|
Reference in New Issue
Block a user