OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 // condition code uses at the patched jump. | 832 // condition code uses at the patched jump. |
833 int delta = Assembler::GetImmediate16(instr); | 833 int delta = Assembler::GetImmediate16(instr); |
834 delta += Assembler::GetRs(instr) * kImm16Mask; | 834 delta += Assembler::GetRs(instr) * kImm16Mask; |
835 // If the delta is 0 the instruction is andi at, zero_reg, #0 which also | 835 // If the delta is 0 the instruction is andi at, zero_reg, #0 which also |
836 // signals that nothing was inlined. | 836 // signals that nothing was inlined. |
837 if (delta == 0) { | 837 if (delta == 0) { |
838 return; | 838 return; |
839 } | 839 } |
840 | 840 |
841 if (FLAG_trace_ic) { | 841 if (FLAG_trace_ic) { |
842 PrintF("[ patching ic at %p, andi=%p, delta=%d\n", address, | 842 PrintF("[ patching ic at %p, andi=%p, delta=%d\n", |
843 andi_instruction_address, delta); | 843 static_cast<void*>(address), |
| 844 static_cast<void*>(andi_instruction_address), delta); |
844 } | 845 } |
845 | 846 |
846 Address patch_address = | 847 Address patch_address = |
847 andi_instruction_address - delta * Instruction::kInstrSize; | 848 andi_instruction_address - delta * Instruction::kInstrSize; |
848 Instr instr_at_patch = Assembler::instr_at(patch_address); | 849 Instr instr_at_patch = Assembler::instr_at(patch_address); |
849 // This is patching a conditional "jump if not smi/jump if smi" site. | 850 // This is patching a conditional "jump if not smi/jump if smi" site. |
850 // Enabling by changing from | 851 // Enabling by changing from |
851 // andi at, rx, 0 | 852 // andi at, rx, 0 |
852 // Branch <target>, eq, at, Operand(zero_reg) | 853 // Branch <target>, eq, at, Operand(zero_reg) |
853 // to: | 854 // to: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 break; | 902 break; |
902 default: | 903 default: |
903 UNIMPLEMENTED(); | 904 UNIMPLEMENTED(); |
904 } | 905 } |
905 patcher.ChangeBranchCondition(branch_instr, opcode); | 906 patcher.ChangeBranchCondition(branch_instr, opcode); |
906 } | 907 } |
907 } // namespace internal | 908 } // namespace internal |
908 } // namespace v8 | 909 } // namespace v8 |
909 | 910 |
910 #endif // V8_TARGET_ARCH_MIPS | 911 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |