| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 } else { | 316 } else { |
| 317 UNREACHABLE(); | 317 UNREACHABLE(); |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 | 320 |
| 321 | 321 |
| 322 void RegisterDump::Dump(MacroAssembler* masm) { | 322 void RegisterDump::Dump(MacroAssembler* masm) { |
| 323 ASSERT(__ StackPointer().Is(csp)); | 323 ASSERT(__ StackPointer().Is(csp)); |
| 324 | 324 |
| 325 // Ensure that we don't unintentionally clobber any registers. | 325 // Ensure that we don't unintentionally clobber any registers. |
| 326 Register old_tmp0 = __ Tmp0(); | 326 UseScratchRegisterScope temps(masm); |
| 327 Register old_tmp1 = __ Tmp1(); | 327 temps.ExcludeAll(); |
| 328 FPRegister old_fptmp0 = __ FPTmp0(); | |
| 329 __ SetScratchRegisters(NoReg, NoReg); | |
| 330 __ SetFPScratchRegister(NoFPReg); | |
| 331 | 328 |
| 332 // Preserve some temporary registers. | 329 // Preserve some temporary registers. |
| 333 Register dump_base = x0; | 330 Register dump_base = x0; |
| 334 Register dump = x1; | 331 Register dump = x1; |
| 335 Register tmp = x2; | 332 Register tmp = x2; |
| 336 Register dump_base_w = dump_base.W(); | 333 Register dump_base_w = dump_base.W(); |
| 337 Register dump_w = dump.W(); | 334 Register dump_w = dump.W(); |
| 338 Register tmp_w = tmp.W(); | 335 Register tmp_w = tmp.W(); |
| 339 | 336 |
| 340 // Offsets into the dump_ structure. | 337 // Offsets into the dump_ structure. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 | 408 |
| 412 __ Add(dump2, dump2_base, x_offset); | 409 __ Add(dump2, dump2_base, x_offset); |
| 413 __ Str(dump_base, MemOperand(dump2, dump_base.code() * kXRegSizeInBytes)); | 410 __ Str(dump_base, MemOperand(dump2, dump_base.code() * kXRegSizeInBytes)); |
| 414 __ Str(dump, MemOperand(dump2, dump.code() * kXRegSizeInBytes)); | 411 __ Str(dump, MemOperand(dump2, dump.code() * kXRegSizeInBytes)); |
| 415 __ Str(tmp, MemOperand(dump2, tmp.code() * kXRegSizeInBytes)); | 412 __ Str(tmp, MemOperand(dump2, tmp.code() * kXRegSizeInBytes)); |
| 416 | 413 |
| 417 // Finally, restore dump2_base and dump2. | 414 // Finally, restore dump2_base and dump2. |
| 418 __ Ldr(dump2_base, MemOperand(dump2, dump2_base.code() * kXRegSizeInBytes)); | 415 __ Ldr(dump2_base, MemOperand(dump2, dump2_base.code() * kXRegSizeInBytes)); |
| 419 __ Ldr(dump2, MemOperand(dump2, dump2.code() * kXRegSizeInBytes)); | 416 __ Ldr(dump2, MemOperand(dump2, dump2.code() * kXRegSizeInBytes)); |
| 420 | 417 |
| 421 // Restore the MacroAssembler's scratch registers. | |
| 422 __ SetScratchRegisters(old_tmp0, old_tmp1); | |
| 423 __ SetFPScratchRegister(old_fptmp0); | |
| 424 | |
| 425 completed_ = true; | 418 completed_ = true; |
| 426 } | 419 } |
| OLD | NEW |