Chromium Code Reviews| Index: src/IceAssemblerARM32.cpp |
| diff --git a/src/IceAssemblerARM32.cpp b/src/IceAssemblerARM32.cpp |
| index d849c54bff0414d7366d32f6d2346b932e75224d..5a74cea82687414059f636a4bc30abab1cd33fad 100644 |
| --- a/src/IceAssemblerARM32.cpp |
| +++ b/src/IceAssemblerARM32.cpp |
| @@ -906,11 +906,38 @@ void AssemblerARM32::orr(const Operand *OpRd, const Operand *OpRn, |
| emitType01(Orr, OpRd, OpRn, OpSrc1, SetFlags, Cond); |
| } |
| +void AssemblerARM32::pop(const Operand *OpRt, CondARM32::Cond Cond) { |
| + // POP - ARM section A8.8.132, encoding A2: |
| + // pop<c> {Rt} |
| + // |
| + // cccc010010011101dddd000000000100 where dddd=Rt and cccc=Cond. |
| + IValueT Rt; |
| + if (decodeOperand(OpRt, Rt) != DecodedAsRegister) |
| + return setNeedsTextFixup(); |
| + assert(Rt != RegARM32::Encoded_Reg_sp); |
| + // Same as load instruction. |
| + constexpr bool isLoad = true; |
|
Jim Stichnoth
2015/11/09 22:17:26
IsLoad, IsByte
Karl
2015/11/09 22:44:35
Done.
|
| + constexpr bool isByte = false; |
| + IValueT Address = decodeImmRegOffset(RegARM32::Encoded_Reg_sp, kWordSize, |
| + OperandARM32Mem::PostIndex); |
| + emitMemOp(Cond, kInstTypeMemImmediate, isLoad, isByte, Rt, Address); |
| +} |
| + |
| +void AssemblerARM32::popList(const IValueT Registers, CondARM32::Cond Cond) { |
| + // POP - ARM section A8.*.131, encoding A1: |
| + // pop<c> <registers> |
| + // |
| + // cccc100010111101rrrrrrrrrrrrrrrr where cccc=Cond and |
| + // rrrrrrrrrrrrrrrr=Registers (one bit for each GP register). |
| + constexpr bool IsLoad = true; |
| + emitMultiMemOp(Cond, IA_W, IsLoad, RegARM32::Encoded_Reg_sp, Registers); |
| +} |
| + |
| void AssemblerARM32::push(const Operand *OpRt, CondARM32::Cond Cond) { |
| // PUSH - ARM section A8.8.133, encoding A2: |
| // push<c> {Rt} |
| // |
| - // cccc010100101101dddd000000000100 where dddd=Rd and cccc=Cond. |
| + // cccc010100101101dddd000000000100 where dddd=Rt and cccc=Cond. |
| IValueT Rt; |
| if (decodeOperand(OpRt, Rt) != DecodedAsRegister) |
| return setNeedsTextFixup(); |