mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Avoid re-evaluating MI.getNumOperands() every iteration of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117766 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e5f4e9fb2b
commit
4b5236c966
@ -293,7 +293,7 @@ unsigned ARMMCCodeEmitter::getRegisterListOpValue(const MCInst &MI,
|
|||||||
// Convert a list of GPRs into a bitfield (R0 -> bit 0). For each
|
// Convert a list of GPRs into a bitfield (R0 -> bit 0). For each
|
||||||
// register in the list, set the corresponding bit.
|
// register in the list, set the corresponding bit.
|
||||||
unsigned Binary = 0;
|
unsigned Binary = 0;
|
||||||
for (unsigned i = Op; i < MI.getNumOperands(); ++i) {
|
for (unsigned i = Op, e = MI.getNumOperands(); i < e; ++i) {
|
||||||
unsigned regno = getARMRegisterNumbering(MI.getOperand(i).getReg());
|
unsigned regno = getARMRegisterNumbering(MI.getOperand(i).getReg());
|
||||||
Binary |= 1 << regno;
|
Binary |= 1 << regno;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user