| 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 Register address, | 512 Register address, |
| 513 EmitRememberedSet emit_remembered_set, | 513 EmitRememberedSet emit_remembered_set, |
| 514 SaveFPRegsMode fp_mode) | 514 SaveFPRegsMode fp_mode) |
| 515 : object_(object), | 515 : object_(object), |
| 516 value_(value), | 516 value_(value), |
| 517 address_(address), | 517 address_(address), |
| 518 emit_remembered_set_(emit_remembered_set), | 518 emit_remembered_set_(emit_remembered_set), |
| 519 save_fp_regs_mode_(fp_mode) { | 519 save_fp_regs_mode_(fp_mode) { |
| 520 } | 520 } |
| 521 | 521 |
| 522 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. | 522 static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8. |
| 523 static const byte kSkipIncrementalPartInstruction = 0xeb; // Jmp #imm8. | 523 static const byte kSkipNonIncrementalPartInstruction = 0xeb; // Jmp #imm8. |
| 524 | 524 |
| 525 static byte GetInstruction(bool enable) { | 525 static byte GetInstruction(bool enable) { |
| 526 // Can't use ternary operator here, because gcc makes an undefined | 526 // Can't use ternary operator here, because gcc makes an undefined |
| 527 // reference to a static const int. | 527 // reference to a static const int. |
| 528 if (enable) { | 528 if (enable) { |
| 529 return kSkipNonIncrementalPartInstruction; |
| 530 } else { |
| 529 return kTwoByteNopInstruction; | 531 return kTwoByteNopInstruction; |
| 530 } else { | |
| 531 return kSkipIncrementalPartInstruction; | |
| 532 } | 532 } |
| 533 } | 533 } |
| 534 | 534 |
| 535 static void Patch(Code* stub, bool enable) { | 535 static void Patch(Code* stub, bool enable) { |
| 536 ASSERT(*stub->instruction_start() == GetInstruction(!enable)); | 536 ASSERT(*stub->instruction_start() == GetInstruction(!enable)); |
| 537 *stub->instruction_start() = GetInstruction(enable); | 537 *stub->instruction_start() = GetInstruction(enable); |
| 538 } | 538 } |
| 539 | 539 |
| 540 private: | 540 private: |
| 541 void Generate(MacroAssembler* masm); | 541 void Generate(MacroAssembler* masm); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 Register scratch1, | 601 Register scratch1, |
| 602 bool load_elements_from_receiver, | 602 bool load_elements_from_receiver, |
| 603 Label* key_not_smi, | 603 Label* key_not_smi, |
| 604 Label* value_not_smi, | 604 Label* value_not_smi, |
| 605 Label* not_pixel_array, | 605 Label* not_pixel_array, |
| 606 Label* out_of_range); | 606 Label* out_of_range); |
| 607 | 607 |
| 608 } } // namespace v8::internal | 608 } } // namespace v8::internal |
| 609 | 609 |
| 610 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 610 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |