File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
llvm/lib/Target/ARM/AsmParser Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -2148,8 +2148,6 @@ int ARMAsmParser::tryParseRegister() {
2148
2148
const AsmToken &Tok = Parser.getTok ();
2149
2149
if (Tok.isNot (AsmToken::Identifier)) return -1 ;
2150
2150
2151
- // FIXME: Validate register for the current architecture; we have to do
2152
- // validation later, so maybe there is no need for this here.
2153
2151
std::string lowerCase = Tok.getString ().lower ();
2154
2152
unsigned RegNum = MatchRegisterName (lowerCase);
2155
2153
if (!RegNum) {
@@ -2158,6 +2156,22 @@ int ARMAsmParser::tryParseRegister() {
2158
2156
.Case (" r14" , ARM::LR)
2159
2157
.Case (" r15" , ARM::PC)
2160
2158
.Case (" ip" , ARM::R12)
2159
+ // Additional register name aliases for 'gas' compatibility.
2160
+ .Case (" a1" , ARM::R0)
2161
+ .Case (" a2" , ARM::R1)
2162
+ .Case (" a3" , ARM::R2)
2163
+ .Case (" a4" , ARM::R3)
2164
+ .Case (" v1" , ARM::R4)
2165
+ .Case (" v2" , ARM::R5)
2166
+ .Case (" v3" , ARM::R6)
2167
+ .Case (" v4" , ARM::R7)
2168
+ .Case (" v5" , ARM::R8)
2169
+ .Case (" v6" , ARM::R9)
2170
+ .Case (" v7" , ARM::R10)
2171
+ .Case (" v8" , ARM::R11)
2172
+ .Case (" sb" , ARM::R9)
2173
+ .Case (" sl" , ARM::R10)
2174
+ .Case (" fp" , ARM::R11)
2161
2175
.Default (0 );
2162
2176
}
2163
2177
if (!RegNum) return -1 ;
You can’t perform that action at this time.
0 commit comments