| 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 | 5 |
| 6 #include "src/v8.h" | 6 #include "src/v8.h" |
| 7 | 7 |
| 8 #if V8_TARGET_ARCH_MIPS | 8 #if V8_TARGET_ARCH_MIPS |
| 9 | 9 |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 // andi at, rx, 0 | 954 // andi at, rx, 0 |
| 955 // Branch <target>, eq, at, Operand(zero_reg) | 955 // Branch <target>, eq, at, Operand(zero_reg) |
| 956 // to: | 956 // to: |
| 957 // andi at, rx, #kSmiTagMask | 957 // andi at, rx, #kSmiTagMask |
| 958 // Branch <target>, ne, at, Operand(zero_reg) | 958 // Branch <target>, ne, at, Operand(zero_reg) |
| 959 // and vice-versa to be disabled again. | 959 // and vice-versa to be disabled again. |
| 960 CodePatcher patcher(patch_address, 2); | 960 CodePatcher patcher(patch_address, 2); |
| 961 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 961 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
| 962 if (check == ENABLE_INLINED_SMI_CHECK) { | 962 if (check == ENABLE_INLINED_SMI_CHECK) { |
| 963 DCHECK(Assembler::IsAndImmediate(instr_at_patch)); | 963 DCHECK(Assembler::IsAndImmediate(instr_at_patch)); |
| 964 DCHECK_EQ(0, Assembler::GetImmediate16(instr_at_patch)); | 964 DCHECK_EQ(0u, Assembler::GetImmediate16(instr_at_patch)); |
| 965 patcher.masm()->andi(at, reg, kSmiTagMask); | 965 patcher.masm()->andi(at, reg, kSmiTagMask); |
| 966 } else { | 966 } else { |
| 967 DCHECK(check == DISABLE_INLINED_SMI_CHECK); | 967 DCHECK_EQ(check, DISABLE_INLINED_SMI_CHECK); |
| 968 DCHECK(Assembler::IsAndImmediate(instr_at_patch)); | 968 DCHECK(Assembler::IsAndImmediate(instr_at_patch)); |
| 969 patcher.masm()->andi(at, reg, 0); | 969 patcher.masm()->andi(at, reg, 0); |
| 970 } | 970 } |
| 971 DCHECK(Assembler::IsBranch(branch_instr)); | 971 DCHECK(Assembler::IsBranch(branch_instr)); |
| 972 if (Assembler::IsBeq(branch_instr)) { | 972 if (Assembler::IsBeq(branch_instr)) { |
| 973 patcher.ChangeBranchCondition(ne); | 973 patcher.ChangeBranchCondition(ne); |
| 974 } else { | 974 } else { |
| 975 DCHECK(Assembler::IsBne(branch_instr)); | 975 DCHECK(Assembler::IsBne(branch_instr)); |
| 976 patcher.ChangeBranchCondition(eq); | 976 patcher.ChangeBranchCondition(eq); |
| 977 } | 977 } |
| 978 } | 978 } |
| 979 } | 979 } |
| 980 } // namespace v8::internal | 980 } // namespace v8::internal |
| 981 | 981 |
| 982 #endif // V8_TARGET_ARCH_MIPS | 982 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |