[mips] Move the setATReg definition inside the MipsAssemblerOptions class. NFC.

Summary: This groups all of the MipsAssemblerOptions functionality together, making it more reader-friendly.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8445

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Toma Tabacu 2015-03-26 13:08:55 +00:00
parent 971eb1b382
commit 06a8dfd1ee

View File

@ -54,7 +54,13 @@ public:
} }
unsigned getATRegNum() const { return ATReg; } unsigned getATRegNum() const { return ATReg; }
bool setATReg(unsigned Reg); bool setATReg(unsigned Reg) {
if (Reg > 31)
return false;
ATReg = Reg;
return true;
}
bool isReorder() const { return Reorder; } bool isReorder() const { return Reorder; }
void setReorder() { Reorder = true; } void setReorder() { Reorder = true; }
@ -2377,14 +2383,6 @@ int MipsAsmParser::matchMSA128CtrlRegisterName(StringRef Name) {
return CC; return CC;
} }
bool MipsAssemblerOptions::setATReg(unsigned Reg) {
if (Reg > 31)
return false;
ATReg = Reg;
return true;
}
int MipsAsmParser::getATReg(SMLoc Loc) { int MipsAsmParser::getATReg(SMLoc Loc) {
int AT = AssemblerOptions.back()->getATRegNum(); int AT = AssemblerOptions.back()->getATRegNum();
if (AT == 0) if (AT == 0)