| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 Register reg, | 2479 Register reg, |
| 2480 Register scratch, | 2480 Register scratch, |
| 2481 Label* not_power_of_two_or_zero) { | 2481 Label* not_power_of_two_or_zero) { |
| 2482 sub(scratch, reg, Operand(1), SetCC); | 2482 sub(scratch, reg, Operand(1), SetCC); |
| 2483 b(mi, not_power_of_two_or_zero); | 2483 b(mi, not_power_of_two_or_zero); |
| 2484 tst(scratch, reg); | 2484 tst(scratch, reg); |
| 2485 b(ne, not_power_of_two_or_zero); | 2485 b(ne, not_power_of_two_or_zero); |
| 2486 } | 2486 } |
| 2487 | 2487 |
| 2488 | 2488 |
| 2489 void MacroAssembler::JumpIfNotPowerOfTwoOrZeroAndNeg( |
| 2490 Register reg, |
| 2491 Register scratch, |
| 2492 Label* zero_and_neg, |
| 2493 Label* not_power_of_two) { |
| 2494 sub(scratch, reg, Operand(1), SetCC); |
| 2495 b(mi, zero_and_neg); |
| 2496 tst(scratch, reg); |
| 2497 b(ne, not_power_of_two); |
| 2498 } |
| 2499 |
| 2500 |
| 2489 void MacroAssembler::JumpIfNotBothSmi(Register reg1, | 2501 void MacroAssembler::JumpIfNotBothSmi(Register reg1, |
| 2490 Register reg2, | 2502 Register reg2, |
| 2491 Label* on_not_both_smi) { | 2503 Label* on_not_both_smi) { |
| 2492 STATIC_ASSERT(kSmiTag == 0); | 2504 STATIC_ASSERT(kSmiTag == 0); |
| 2493 tst(reg1, Operand(kSmiTagMask)); | 2505 tst(reg1, Operand(kSmiTagMask)); |
| 2494 tst(reg2, Operand(kSmiTagMask), eq); | 2506 tst(reg2, Operand(kSmiTagMask), eq); |
| 2495 b(ne, on_not_both_smi); | 2507 b(ne, on_not_both_smi); |
| 2496 } | 2508 } |
| 2497 | 2509 |
| 2498 | 2510 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2886 void CodePatcher::EmitCondition(Condition cond) { | 2898 void CodePatcher::EmitCondition(Condition cond) { |
| 2887 Instr instr = Assembler::instr_at(masm_.pc_); | 2899 Instr instr = Assembler::instr_at(masm_.pc_); |
| 2888 instr = (instr & ~kCondMask) | cond; | 2900 instr = (instr & ~kCondMask) | cond; |
| 2889 masm_.emit(instr); | 2901 masm_.emit(instr); |
| 2890 } | 2902 } |
| 2891 | 2903 |
| 2892 | 2904 |
| 2893 } } // namespace v8::internal | 2905 } } // namespace v8::internal |
| 2894 | 2906 |
| 2895 #endif // V8_TARGET_ARCH_ARM | 2907 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |