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 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2826 } | 2826 } |
2827 | 2827 |
2828 | 2828 |
2829 void MacroAssembler::Move(Register dst, Register src) { | 2829 void MacroAssembler::Move(Register dst, Register src) { |
2830 if (!dst.is(src)) { | 2830 if (!dst.is(src)) { |
2831 mov(dst, src); | 2831 mov(dst, src); |
2832 } | 2832 } |
2833 } | 2833 } |
2834 | 2834 |
2835 | 2835 |
| 2836 void MacroAssembler::Move(Register dst, Immediate imm) { |
| 2837 if (imm.is_zero()) { |
| 2838 xor_(dst, dst); |
| 2839 } else { |
| 2840 mov(dst, imm); |
| 2841 } |
| 2842 } |
| 2843 |
| 2844 |
2836 void MacroAssembler::SetCounter(StatsCounter* counter, int value) { | 2845 void MacroAssembler::SetCounter(StatsCounter* counter, int value) { |
2837 if (FLAG_native_code_counters && counter->Enabled()) { | 2846 if (FLAG_native_code_counters && counter->Enabled()) { |
2838 mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value)); | 2847 mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value)); |
2839 } | 2848 } |
2840 } | 2849 } |
2841 | 2850 |
2842 | 2851 |
2843 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) { | 2852 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) { |
2844 ASSERT(value > 0); | 2853 ASSERT(value > 0); |
2845 if (FLAG_native_code_counters && counter->Enabled()) { | 2854 if (FLAG_native_code_counters && counter->Enabled()) { |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3599 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); | 3608 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); |
3600 j(equal, found); | 3609 j(equal, found); |
3601 mov(current, FieldOperand(current, Map::kPrototypeOffset)); | 3610 mov(current, FieldOperand(current, Map::kPrototypeOffset)); |
3602 cmp(current, Immediate(factory->null_value())); | 3611 cmp(current, Immediate(factory->null_value())); |
3603 j(not_equal, &loop_again); | 3612 j(not_equal, &loop_again); |
3604 } | 3613 } |
3605 | 3614 |
3606 } } // namespace v8::internal | 3615 } } // namespace v8::internal |
3607 | 3616 |
3608 #endif // V8_TARGET_ARCH_IA32 | 3617 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |