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 RegList old_tmp_list = masm->TmpList()->list(); |
327 Register old_tmp1 = __ Tmp1(); | 327 RegList old_fptmp_list = masm->FPTmpList()->list(); |
328 FPRegister old_fptmp0 = __ FPTmp0(); | 328 masm->TmpList()->set_list(0); |
329 __ SetScratchRegisters(NoReg, NoReg); | 329 masm->FPTmpList()->set_list(0); |
330 __ SetFPScratchRegister(NoFPReg); | |
331 | 330 |
332 // Preserve some temporary registers. | 331 // Preserve some temporary registers. |
333 Register dump_base = x0; | 332 Register dump_base = x0; |
334 Register dump = x1; | 333 Register dump = x1; |
335 Register tmp = x2; | 334 Register tmp = x2; |
336 Register dump_base_w = dump_base.W(); | 335 Register dump_base_w = dump_base.W(); |
337 Register dump_w = dump.W(); | 336 Register dump_w = dump.W(); |
338 Register tmp_w = tmp.W(); | 337 Register tmp_w = tmp.W(); |
339 | 338 |
340 // Offsets into the dump_ structure. | 339 // Offsets into the dump_ structure. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 __ Add(dump2, dump2_base, x_offset); | 411 __ Add(dump2, dump2_base, x_offset); |
413 __ Str(dump_base, MemOperand(dump2, dump_base.code() * kXRegSizeInBytes)); | 412 __ Str(dump_base, MemOperand(dump2, dump_base.code() * kXRegSizeInBytes)); |
414 __ Str(dump, MemOperand(dump2, dump.code() * kXRegSizeInBytes)); | 413 __ Str(dump, MemOperand(dump2, dump.code() * kXRegSizeInBytes)); |
415 __ Str(tmp, MemOperand(dump2, tmp.code() * kXRegSizeInBytes)); | 414 __ Str(tmp, MemOperand(dump2, tmp.code() * kXRegSizeInBytes)); |
416 | 415 |
417 // Finally, restore dump2_base and dump2. | 416 // Finally, restore dump2_base and dump2. |
418 __ Ldr(dump2_base, MemOperand(dump2, dump2_base.code() * kXRegSizeInBytes)); | 417 __ Ldr(dump2_base, MemOperand(dump2, dump2_base.code() * kXRegSizeInBytes)); |
419 __ Ldr(dump2, MemOperand(dump2, dump2.code() * kXRegSizeInBytes)); | 418 __ Ldr(dump2, MemOperand(dump2, dump2.code() * kXRegSizeInBytes)); |
420 | 419 |
421 // Restore the MacroAssembler's scratch registers. | 420 // Restore the MacroAssembler's scratch registers. |
422 __ SetScratchRegisters(old_tmp0, old_tmp1); | 421 masm->TmpList()->set_list(old_tmp_list); |
423 __ SetFPScratchRegister(old_fptmp0); | 422 masm->FPTmpList()->set_list(old_fptmp_list); |
424 | 423 |
425 completed_ = true; | 424 completed_ = true; |
426 } | 425 } |
OLD | NEW |