mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
[Sparc] Add support for parsing branch instructions and conditional moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198738 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -537,9 +537,29 @@ SparcAsmParser::parseSparcAsmOperand(SparcOperand *&Op)
|
||||
Parser.Lex(); // Eat the '%'.
|
||||
unsigned RegNo;
|
||||
if (matchRegisterName(Parser.getTok(), RegNo, false, false)) {
|
||||
StringRef name = Parser.getTok().getString();
|
||||
Parser.Lex(); // Eat the identifier token.
|
||||
E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
||||
Op = SparcOperand::CreateReg(RegNo, SparcOperand::rk_None, S, E);
|
||||
switch (RegNo) {
|
||||
default:
|
||||
Op = SparcOperand::CreateReg(RegNo, SparcOperand::rk_None, S, E);
|
||||
break;
|
||||
case Sparc::Y:
|
||||
Op = SparcOperand::CreateToken("%y", S);
|
||||
break;
|
||||
|
||||
case Sparc::ICC:
|
||||
if (name == "xcc")
|
||||
Op = SparcOperand::CreateToken("%xcc", S);
|
||||
else
|
||||
Op = SparcOperand::CreateToken("%icc", S);
|
||||
break;
|
||||
|
||||
case Sparc::FCC:
|
||||
assert(name == "fcc0" && "Cannot handle %fcc other than %fcc0 yet");
|
||||
Op = SparcOperand::CreateToken("%fcc0", S);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (matchSparcAsmModifiers(EVal, E)) {
|
||||
|
||||
Reference in New Issue
Block a user