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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 Register scratch, | 688 Register scratch, |
689 Condition cc, | 689 Condition cc, |
690 LabelType* branch) { | 690 LabelType* branch) { |
691 ASSERT(cc == equal || cc == not_equal); | 691 ASSERT(cc == equal || cc == not_equal); |
692 if (Serializer::enabled()) { | 692 if (Serializer::enabled()) { |
693 // Can't do arithmetic on external references if it might get serialized. | 693 // Can't do arithmetic on external references if it might get serialized. |
694 mov(scratch, Operand(object)); | 694 mov(scratch, Operand(object)); |
695 // The mask isn't really an address. We load it as an external reference in | 695 // The mask isn't really an address. We load it as an external reference in |
696 // case the size of the new space is different between the snapshot maker | 696 // case the size of the new space is different between the snapshot maker |
697 // and the running system. | 697 // and the running system. |
698 and_(Operand(scratch), Immediate(ExternalReference::new_space_mask())); | 698 and_(Operand(scratch), |
699 cmp(Operand(scratch), Immediate(ExternalReference::new_space_start())); | 699 Immediate(ExternalReference::new_space_mask(isolate()))); |
| 700 cmp(Operand(scratch), |
| 701 Immediate(ExternalReference::new_space_start(isolate()))); |
700 j(cc, branch); | 702 j(cc, branch); |
701 } else { | 703 } else { |
702 int32_t new_space_start = reinterpret_cast<int32_t>( | 704 int32_t new_space_start = reinterpret_cast<int32_t>( |
703 ExternalReference::new_space_start().address()); | 705 ExternalReference::new_space_start(isolate()).address()); |
704 lea(scratch, Operand(object, -new_space_start)); | 706 lea(scratch, Operand(object, -new_space_start)); |
705 and_(scratch, HEAP->NewSpaceMask()); | 707 and_(scratch, isolate()->heap()->NewSpaceMask()); |
706 j(cc, branch); | 708 j(cc, branch); |
707 } | 709 } |
708 } | 710 } |
709 | 711 |
710 | 712 |
711 // The code patcher is used to patch (typically) small parts of code e.g. for | 713 // The code patcher is used to patch (typically) small parts of code e.g. for |
712 // debugging and other types of instrumentation. When using the code patcher | 714 // debugging and other types of instrumentation. When using the code patcher |
713 // the exact number of bytes specified must be emitted. Is not legal to emit | 715 // the exact number of bytes specified must be emitted. Is not legal to emit |
714 // relocation information. If any of these constraints are violated it causes | 716 // relocation information. If any of these constraints are violated it causes |
715 // an assertion. | 717 // an assertion. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 } \ | 791 } \ |
790 masm-> | 792 masm-> |
791 #else | 793 #else |
792 #define ACCESS_MASM(masm) masm-> | 794 #define ACCESS_MASM(masm) masm-> |
793 #endif | 795 #endif |
794 | 796 |
795 | 797 |
796 } } // namespace v8::internal | 798 } } // namespace v8::internal |
797 | 799 |
798 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 800 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |