OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 // Addressing Mode 4 - Load and Store Multiple | 1611 // Addressing Mode 4 - Load and Store Multiple |
1612 void Simulator::HandleRList(Instruction* instr, bool load) { | 1612 void Simulator::HandleRList(Instruction* instr, bool load) { |
1613 int rlist = instr->RlistValue(); | 1613 int rlist = instr->RlistValue(); |
1614 int num_regs = count_bits(rlist); | 1614 int num_regs = count_bits(rlist); |
1615 | 1615 |
1616 intptr_t start_address = 0; | 1616 intptr_t start_address = 0; |
1617 intptr_t end_address = 0; | 1617 intptr_t end_address = 0; |
1618 ProcessPUW(instr, num_regs, kPointerSize, &start_address, &end_address); | 1618 ProcessPUW(instr, num_regs, kPointerSize, &start_address, &end_address); |
1619 | 1619 |
1620 intptr_t* address = reinterpret_cast<intptr_t*>(start_address); | 1620 intptr_t* address = reinterpret_cast<intptr_t*>(start_address); |
| 1621 // Catch null pointers a little earlier. |
| 1622 ASSERT(start_address > 8191 || start_address < 0); |
1621 int reg = 0; | 1623 int reg = 0; |
1622 while (rlist != 0) { | 1624 while (rlist != 0) { |
1623 if ((rlist & 1) != 0) { | 1625 if ((rlist & 1) != 0) { |
1624 if (load) { | 1626 if (load) { |
1625 set_register(reg, *address); | 1627 set_register(reg, *address); |
1626 } else { | 1628 } else { |
1627 *address = get_register(reg); | 1629 *address = get_register(reg); |
1628 } | 1630 } |
1629 address += 1; | 1631 address += 1; |
1630 } | 1632 } |
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3415 uintptr_t address = *stack_slot; | 3417 uintptr_t address = *stack_slot; |
3416 set_register(sp, current_sp + sizeof(uintptr_t)); | 3418 set_register(sp, current_sp + sizeof(uintptr_t)); |
3417 return address; | 3419 return address; |
3418 } | 3420 } |
3419 | 3421 |
3420 } } // namespace v8::internal | 3422 } } // namespace v8::internal |
3421 | 3423 |
3422 #endif // USE_SIMULATOR | 3424 #endif // USE_SIMULATOR |
3423 | 3425 |
3424 #endif // V8_TARGET_ARCH_ARM | 3426 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |