diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-11-08 23:51:20 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-11-08 23:51:20 +0000 |
commit | 4b97c55648a228305e28b4164dae9dcdebccdc8f (patch) | |
tree | 911cf6f73d6c0b2550237290f2d8ead9a3af220d | |
parent | 3734ef3fb478cbae7baedfe009519a51db3b095e (diff) |
Get the register and count from the register list operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118458 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMMCCodeEmitter.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMMCCodeEmitter.cpp b/lib/Target/ARM/ARMMCCodeEmitter.cpp index 296a5c9ce3..fe6bd34a2b 100644 --- a/lib/Target/ARM/ARMMCCodeEmitter.cpp +++ b/lib/Target/ARM/ARMMCCodeEmitter.cpp @@ -378,14 +378,11 @@ getBitfieldInvertedMaskOpValue(const MCInst &MI, unsigned Op, unsigned ARMMCCodeEmitter:: getRegisterListOpValue(const MCInst &MI, unsigned Op, - SmallVectorImpl<MCFixup> &Fixups) const { - // Convert a list of GPRs into a bitfield (R0 -> bit 0). For each - // register in the list, set the corresponding bit. - unsigned Binary = 0; - for (unsigned i = Op, e = MI.getNumOperands(); i < e; ++i) { - unsigned regno = getARMRegisterNumbering(MI.getOperand(i).getReg()); - Binary |= 1 << regno; - } + SmallVectorImpl<MCFixup> &) const { + // {12-8} = Rd + // {7-0} = count + unsigned Binary = getARMRegisterNumbering(MI.getOperand(Op).getReg()) << 8; + Binary |= MI.getOperand(Op + 1).getImm() & 0xFF; return Binary; } |