OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2958 void MacroAssembler::JumpIfNotBothSmi(Register reg1, | 2958 void MacroAssembler::JumpIfNotBothSmi(Register reg1, |
2959 Register reg2, | 2959 Register reg2, |
2960 Label* on_not_both_smi) { | 2960 Label* on_not_both_smi) { |
2961 STATIC_ASSERT(kSmiTag == 0); | 2961 STATIC_ASSERT(kSmiTag == 0); |
2962 tst(reg1, Operand(kSmiTagMask)); | 2962 tst(reg1, Operand(kSmiTagMask)); |
2963 tst(reg2, Operand(kSmiTagMask), eq); | 2963 tst(reg2, Operand(kSmiTagMask), eq); |
2964 b(ne, on_not_both_smi); | 2964 b(ne, on_not_both_smi); |
2965 } | 2965 } |
2966 | 2966 |
2967 | 2967 |
2968 void MacroAssembler::UntagAndJumpIfSmi( | |
2969 Register dst, Register src, Label* smi_case) { | |
2970 STATIC_ASSERT(kSmiTag == 0); | |
2971 mov(dst, Operand(src, ASR, kSmiTagSize), SetCC); | |
2972 b(cc, smi_case); // Shifter carry is not set for a smi. | |
2973 } | |
2974 | |
2975 | |
2976 void MacroAssembler::UntagAndJumpIfNotSmi( | |
2977 Register dst, Register src, Label* smi_case) { | |
ulan
2012/01/27 15:24:35
smi_case should be non_smi_case
| |
2978 STATIC_ASSERT(kSmiTag == 0); | |
2979 mov(dst, Operand(src, ASR, kSmiTagSize), SetCC); | |
2980 b(cs, smi_case); // Shifter carry is set for a non-smi. | |
2981 } | |
2982 | |
2983 | |
2968 void MacroAssembler::JumpIfEitherSmi(Register reg1, | 2984 void MacroAssembler::JumpIfEitherSmi(Register reg1, |
2969 Register reg2, | 2985 Register reg2, |
2970 Label* on_either_smi) { | 2986 Label* on_either_smi) { |
2971 STATIC_ASSERT(kSmiTag == 0); | 2987 STATIC_ASSERT(kSmiTag == 0); |
2972 tst(reg1, Operand(kSmiTagMask)); | 2988 tst(reg1, Operand(kSmiTagMask)); |
2973 tst(reg2, Operand(kSmiTagMask), ne); | 2989 tst(reg2, Operand(kSmiTagMask), ne); |
2974 b(eq, on_either_smi); | 2990 b(eq, on_either_smi); |
2975 } | 2991 } |
2976 | 2992 |
2977 | 2993 |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3704 void CodePatcher::EmitCondition(Condition cond) { | 3720 void CodePatcher::EmitCondition(Condition cond) { |
3705 Instr instr = Assembler::instr_at(masm_.pc_); | 3721 Instr instr = Assembler::instr_at(masm_.pc_); |
3706 instr = (instr & ~kCondMask) | cond; | 3722 instr = (instr & ~kCondMask) | cond; |
3707 masm_.emit(instr); | 3723 masm_.emit(instr); |
3708 } | 3724 } |
3709 | 3725 |
3710 | 3726 |
3711 } } // namespace v8::internal | 3727 } } // namespace v8::internal |
3712 | 3728 |
3713 #endif // V8_TARGET_ARCH_ARM | 3729 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |