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 4850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4861 | 4861 |
4862 switch (target_state) { | 4862 switch (target_state) { |
4863 case INTERRUPT: | 4863 case INTERRUPT: |
4864 // <decrement profiling counter> | 4864 // <decrement profiling counter> |
4865 // .. .. .. .. b.pl ok | 4865 // .. .. .. .. b.pl ok |
4866 // .. .. .. .. ldr x16, pc+<interrupt stub address> | 4866 // .. .. .. .. ldr x16, pc+<interrupt stub address> |
4867 // .. .. .. .. blr x16 | 4867 // .. .. .. .. blr x16 |
4868 // ... more instructions. | 4868 // ... more instructions. |
4869 // ok-label | 4869 // ok-label |
4870 // Jump offset is 6 instructions. | 4870 // Jump offset is 6 instructions. |
4871 ASSERT(Instruction::Cast(branch_address) | |
4872 ->IsNop(Assembler::INTERRUPT_CODE_NOP)); | |
4873 patcher.b(6, pl); | 4871 patcher.b(6, pl); |
4874 break; | 4872 break; |
4875 case ON_STACK_REPLACEMENT: | 4873 case ON_STACK_REPLACEMENT: |
4876 case OSR_AFTER_STACK_CHECK: | 4874 case OSR_AFTER_STACK_CHECK: |
4877 // <decrement profiling counter> | 4875 // <decrement profiling counter> |
4878 // .. .. .. .. mov x0, x0 (NOP) | 4876 // .. .. .. .. mov x0, x0 (NOP) |
4879 // .. .. .. .. ldr x16, pc+<on-stack replacement address> | 4877 // .. .. .. .. ldr x16, pc+<on-stack replacement address> |
4880 // .. .. .. .. blr x16 | 4878 // .. .. .. .. blr x16 |
4881 ASSERT(Instruction::Cast(branch_address)->IsCondBranchImm()); | |
4882 ASSERT(Instruction::Cast(branch_address)->ImmPCOffset() == | |
4883 6 * kInstructionSize); | |
Yang
2014/03/20 13:33:05
Those assertions are bogus. We want to be able to
ulan
2014/03/20 13:50:46
Let's fix the asserts instead of removing them. =)
| |
4884 patcher.nop(Assembler::INTERRUPT_CODE_NOP); | 4879 patcher.nop(Assembler::INTERRUPT_CODE_NOP); |
4885 break; | 4880 break; |
4886 } | 4881 } |
4887 | 4882 |
4888 // Replace the call address. | 4883 // Replace the call address. |
4889 Instruction* load = Instruction::Cast(pc)->preceding(2); | 4884 Instruction* load = Instruction::Cast(pc)->preceding(2); |
4890 Address interrupt_address_pointer = | 4885 Address interrupt_address_pointer = |
4891 reinterpret_cast<Address>(load) + load->ImmPCOffset(); | 4886 reinterpret_cast<Address>(load) + load->ImmPCOffset(); |
4892 ASSERT((Memory::uint64_at(interrupt_address_pointer) == | 4887 ASSERT((Memory::uint64_at(interrupt_address_pointer) == |
4893 reinterpret_cast<uint64_t>(unoptimized_code->GetIsolate() | 4888 reinterpret_cast<uint64_t>(unoptimized_code->GetIsolate() |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4972 return previous_; | 4967 return previous_; |
4973 } | 4968 } |
4974 | 4969 |
4975 | 4970 |
4976 #undef __ | 4971 #undef __ |
4977 | 4972 |
4978 | 4973 |
4979 } } // namespace v8::internal | 4974 } } // namespace v8::internal |
4980 | 4975 |
4981 #endif // V8_TARGET_ARCH_A64 | 4976 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |