OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 cmpq(with, Operand(r13, index << kPointerSizeLog2)); | 60 cmpq(with, Operand(r13, index << kPointerSizeLog2)); |
61 } | 61 } |
62 | 62 |
63 | 63 |
64 void MacroAssembler::CompareRoot(Operand with, Heap::RootListIndex index) { | 64 void MacroAssembler::CompareRoot(Operand with, Heap::RootListIndex index) { |
65 LoadRoot(kScratchRegister, index); | 65 LoadRoot(kScratchRegister, index); |
66 cmpq(with, kScratchRegister); | 66 cmpq(with, kScratchRegister); |
67 } | 67 } |
68 | 68 |
69 | 69 |
| 70 void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) { |
| 71 CompareRoot(rsp, Heap::kStackLimitRootIndex); |
| 72 j(below, on_stack_overflow); |
| 73 } |
| 74 |
| 75 |
70 static void RecordWriteHelper(MacroAssembler* masm, | 76 static void RecordWriteHelper(MacroAssembler* masm, |
71 Register object, | 77 Register object, |
72 Register addr, | 78 Register addr, |
73 Register scratch) { | 79 Register scratch) { |
74 Label fast; | 80 Label fast; |
75 | 81 |
76 // Compute the page start address from the heap object pointer, and reuse | 82 // Compute the page start address from the heap object pointer, and reuse |
77 // the 'object' register for it. | 83 // the 'object' register for it. |
78 ASSERT(is_int32(~Page::kPageAlignmentMask)); | 84 ASSERT(is_int32(~Page::kPageAlignmentMask)); |
79 masm->and_(object, | 85 masm->and_(object, |
(...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 CodePatcher::~CodePatcher() { | 2247 CodePatcher::~CodePatcher() { |
2242 // Indicate that code has changed. | 2248 // Indicate that code has changed. |
2243 CPU::FlushICache(address_, size_); | 2249 CPU::FlushICache(address_, size_); |
2244 | 2250 |
2245 // Check that the code was patched as expected. | 2251 // Check that the code was patched as expected. |
2246 ASSERT(masm_.pc_ == address_ + size_); | 2252 ASSERT(masm_.pc_ == address_ + size_); |
2247 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2253 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2248 } | 2254 } |
2249 | 2255 |
2250 } } // namespace v8::internal | 2256 } } // namespace v8::internal |
OLD | NEW |