| Index: src/arm/simulator-arm.cc
|
| diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc
|
| index 00af77796101d2a2eeb07bba68f2a9b43fbed79f..c47f2ab80c9a4d9cf4e32cb1caaf47609140fad7 100644
|
| --- a/src/arm/simulator-arm.cc
|
| +++ b/src/arm/simulator-arm.cc
|
| @@ -1534,11 +1534,11 @@ static int count_bits(int bit_vector) {
|
| }
|
|
|
|
|
| -void Simulator::ProcessPUW(Instruction* instr,
|
| - int num_regs,
|
| - int reg_size,
|
| - intptr_t* start_address,
|
| - intptr_t* end_address) {
|
| +int32_t Simulator::ProcessPU(Instruction* instr,
|
| + int num_regs,
|
| + int reg_size,
|
| + intptr_t* start_address,
|
| + intptr_t* end_address) {
|
| int rn = instr->RnValue();
|
| int32_t rn_val = get_register(rn);
|
| switch (instr->PUField()) {
|
| @@ -1569,9 +1569,7 @@ void Simulator::ProcessPUW(Instruction* instr,
|
| break;
|
| }
|
| }
|
| - if (instr->HasW()) {
|
| - set_register(rn, rn_val);
|
| - }
|
| + return rn_val;
|
| }
|
|
|
|
|
| @@ -1582,7 +1580,8 @@ void Simulator::HandleRList(Instruction* instr, bool load) {
|
|
|
| intptr_t start_address = 0;
|
| intptr_t end_address = 0;
|
| - ProcessPUW(instr, num_regs, kPointerSize, &start_address, &end_address);
|
| + int32_t rn_val =
|
| + ProcessPU(instr, num_regs, kPointerSize, &start_address, &end_address);
|
|
|
| intptr_t* address = reinterpret_cast<intptr_t*>(start_address);
|
| // Catch null pointers a little earlier.
|
| @@ -1601,6 +1600,9 @@ void Simulator::HandleRList(Instruction* instr, bool load) {
|
| rlist >>= 1;
|
| }
|
| ASSERT(end_address == ((intptr_t)address) - 4);
|
| + if (instr->HasW()) {
|
| + set_register(instr->RnValue(), rn_val);
|
| + }
|
| }
|
|
|
|
|
| @@ -1623,7 +1625,8 @@ void Simulator::HandleVList(Instruction* instr) {
|
|
|
| intptr_t start_address = 0;
|
| intptr_t end_address = 0;
|
| - ProcessPUW(instr, num_regs, operand_size, &start_address, &end_address);
|
| + int32_t rn_val =
|
| + ProcessPU(instr, num_regs, operand_size, &start_address, &end_address);
|
|
|
| intptr_t* address = reinterpret_cast<intptr_t*>(start_address);
|
| for (int reg = vd; reg < vd + num_regs; reg++) {
|
| @@ -1656,6 +1659,9 @@ void Simulator::HandleVList(Instruction* instr) {
|
| }
|
| }
|
| ASSERT(reinterpret_cast<intptr_t>(address) - operand_size == end_address);
|
| + if (instr->HasW()) {
|
| + set_register(instr->RnValue(), rn_val);
|
| + }
|
| }
|
|
|
|
|
|
|