mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Sort the register list based on the *actual* register numbers rather than the
enum values we give to them. <rdar://problem/8823730> llvm-svn: 123321
This commit is contained in:
parent
52db9b4821
commit
e82361731d
@ -583,15 +583,15 @@ ParseRegisterList(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
||||
SmallVectorImpl<std::pair<unsigned, SMLoc> >::const_iterator
|
||||
RI = Registers.begin(), RE = Registers.end();
|
||||
|
||||
DenseMap<unsigned, bool> RegMap;
|
||||
RegMap[RI->first] = true;
|
||||
|
||||
unsigned HighRegNum = RI->first;
|
||||
unsigned HighRegNum = getARMRegisterNumbering(RI->first);
|
||||
bool EmittedWarning = false;
|
||||
|
||||
DenseMap<unsigned, bool> RegMap;
|
||||
RegMap[HighRegNum] = true;
|
||||
|
||||
for (++RI; RI != RE; ++RI) {
|
||||
const std::pair<unsigned, SMLoc> &RegInfo = *RI;
|
||||
unsigned Reg = RegInfo.first;
|
||||
unsigned Reg = getARMRegisterNumbering(RegInfo.first);
|
||||
|
||||
if (RegMap[Reg]) {
|
||||
Error(RegInfo.second, "register duplicated in register list");
|
||||
|
8
test/MC/ARM/reg-list.s
Normal file
8
test/MC/ARM/reg-list.s
Normal file
@ -0,0 +1,8 @@
|
||||
@ RUN: llvm-mc -triple thumb-apple-darwin10 -show-encoding < %s 2> %t | FileCheck %s
|
||||
@ RUN: FileCheck --check-prefix=CHECK-WARNINGS < %t %s
|
||||
|
||||
push {r7, lr}
|
||||
@ CHECK-WARNINGS: register not in ascending order in register list
|
||||
|
||||
push {lr, r7}
|
||||
@ CHECK: push {lr, r7}
|
Loading…
Reference in New Issue
Block a user