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 3613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3624 xreg(5), xreg(6), xreg(7)); | 3624 xreg(5), xreg(6), xreg(7)); |
3625 } else if (type == CPURegister::kFPRegister) { | 3625 } else if (type == CPURegister::kFPRegister) { |
3626 result = fprintf(stream_, format, | 3626 result = fprintf(stream_, format, |
3627 dreg(0), dreg(1), dreg(2), dreg(3), | 3627 dreg(0), dreg(1), dreg(2), dreg(3), |
3628 dreg(4), dreg(5), dreg(6), dreg(7)); | 3628 dreg(4), dreg(5), dreg(6), dreg(7)); |
3629 } else { | 3629 } else { |
3630 ASSERT(type == CPURegister::kNoRegister); | 3630 ASSERT(type == CPURegister::kNoRegister); |
3631 result = fprintf(stream_, "%s", format); | 3631 result = fprintf(stream_, "%s", format); |
3632 } | 3632 } |
3633 fputs(clr_normal, stream_); | 3633 fputs(clr_normal, stream_); |
| 3634 |
| 3635 #ifdef DEBUG |
| 3636 CorruptAllCallerSavedCPURegisters(); |
| 3637 #endif |
| 3638 |
3634 set_xreg(0, result); | 3639 set_xreg(0, result); |
3635 | 3640 |
3636 // TODO(jbramley): Consider clobbering all caller-saved registers here. | |
3637 | |
3638 // The printf parameters are inlined in the code, so skip them. | 3641 // The printf parameters are inlined in the code, so skip them. |
3639 set_pc(pc_->InstructionAtOffset(kPrintfLength)); | 3642 set_pc(pc_->InstructionAtOffset(kPrintfLength)); |
3640 | 3643 |
3641 // Set LR as if we'd just called a native printf function. | 3644 // Set LR as if we'd just called a native printf function. |
3642 set_lr(pc()); | 3645 set_lr(pc()); |
3643 | 3646 |
3644 } else if (instr->ImmException() == kImmExceptionIsUnreachable) { | 3647 } else if (instr->ImmException() == kImmExceptionIsUnreachable) { |
3645 fprintf(stream_, "Hit UNREACHABLE marker at PC=%p.\n", | 3648 fprintf(stream_, "Hit UNREACHABLE marker at PC=%p.\n", |
3646 reinterpret_cast<void*>(pc_)); | 3649 reinterpret_cast<void*>(pc_)); |
3647 abort(); | 3650 abort(); |
3648 | 3651 |
3649 } else { | 3652 } else { |
3650 OS::DebugBreak(); | 3653 OS::DebugBreak(); |
3651 } | 3654 } |
3652 break; | 3655 break; |
3653 } | 3656 } |
3654 | 3657 |
3655 default: | 3658 default: |
3656 UNIMPLEMENTED(); | 3659 UNIMPLEMENTED(); |
3657 } | 3660 } |
3658 } | 3661 } |
3659 | 3662 |
3660 #endif // USE_SIMULATOR | 3663 #endif // USE_SIMULATOR |
3661 | 3664 |
3662 } } // namespace v8::internal | 3665 } } // namespace v8::internal |
3663 | 3666 |
3664 #endif // V8_TARGET_ARCH_A64 | 3667 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |