| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 if (!ecx.is(scratch0_orig_) && | 546 if (!ecx.is(scratch0_orig_) && |
| 547 !ecx.is(object_orig_) && | 547 !ecx.is(object_orig_) && |
| 548 !ecx.is(address_orig_)) { | 548 !ecx.is(address_orig_)) { |
| 549 masm->pop(ecx); | 549 masm->pop(ecx); |
| 550 } | 550 } |
| 551 if (!scratch0_.is(scratch0_orig_)) masm->pop(scratch0_); | 551 if (!scratch0_.is(scratch0_orig_)) masm->pop(scratch0_); |
| 552 } | 552 } |
| 553 | 553 |
| 554 // If we have to call into C then we need to save and restore all caller- | 554 // If we have to call into C then we need to save and restore all caller- |
| 555 // saved registers that were not already preserved. The caller saved | 555 // saved registers that were not already preserved. The caller saved |
| 556 // registers are eax, ecx and adx. The three scratch registers (incl. ecx) | 556 // registers are eax, ecx and edx. The three scratch registers (incl. ecx) |
| 557 // will be restored by other means so we don't bother pushing them here. | 557 // will be restored by other means so we don't bother pushing them here. |
| 558 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { | 558 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { |
| 559 if (!scratch0_.is(eax) && !scratch1_.is(eax)) masm->push(eax); | 559 if (!scratch0_.is(eax) && !scratch1_.is(eax)) masm->push(eax); |
| 560 if (!scratch0_.is(edx) && !scratch1_.is(edx)) masm->push(edx); | 560 if (!scratch0_.is(edx) && !scratch1_.is(edx)) masm->push(edx); |
| 561 if (mode == kSaveFPRegs) { | 561 if (mode == kSaveFPRegs) { |
| 562 CpuFeatures::Scope scope(SSE2); | 562 CpuFeatures::Scope scope(SSE2); |
| 563 masm->sub(Operand(esp), | 563 masm->sub(Operand(esp), |
| 564 Immediate(kDoubleSize * (XMMRegister::kNumRegisters - 1))); | 564 Immediate(kDoubleSize * (XMMRegister::kNumRegisters - 1))); |
| 565 // Save all XMM registers except XMM0. | 565 // Save all XMM registers except XMM0. |
| 566 for (int i = XMMRegister::kNumRegisters - 1; i > 0; i--) { | 566 for (int i = XMMRegister::kNumRegisters - 1; i > 0; i--) { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 Register scratch1, | 691 Register scratch1, |
| 692 bool load_elements_from_receiver, | 692 bool load_elements_from_receiver, |
| 693 Label* key_not_smi, | 693 Label* key_not_smi, |
| 694 Label* value_not_smi, | 694 Label* value_not_smi, |
| 695 Label* not_pixel_array, | 695 Label* not_pixel_array, |
| 696 Label* out_of_range); | 696 Label* out_of_range); |
| 697 | 697 |
| 698 } } // namespace v8::internal | 698 } } // namespace v8::internal |
| 699 | 699 |
| 700 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 700 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |