OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 movp(scratch, ExternalOperand(store_buffer)); | 220 movp(scratch, ExternalOperand(store_buffer)); |
221 // Store pointer to buffer. | 221 // Store pointer to buffer. |
222 movp(Operand(scratch, 0), addr); | 222 movp(Operand(scratch, 0), addr); |
223 // Increment buffer top. | 223 // Increment buffer top. |
224 addp(scratch, Immediate(kPointerSize)); | 224 addp(scratch, Immediate(kPointerSize)); |
225 // Write back new top of buffer. | 225 // Write back new top of buffer. |
226 movp(ExternalOperand(store_buffer), scratch); | 226 movp(ExternalOperand(store_buffer), scratch); |
227 // Call stub on end of buffer. | 227 // Call stub on end of buffer. |
228 Label done; | 228 Label done; |
229 // Check for end of buffer. | 229 // Check for end of buffer. |
230 testp(scratch, Immediate(StoreBuffer::kStoreBufferOverflowBit)); | 230 testp(scratch, Immediate(StoreBuffer::kStoreBufferMask)); |
231 if (and_then == kReturnAtEnd) { | 231 if (and_then == kReturnAtEnd) { |
232 Label buffer_overflowed; | 232 Label buffer_overflowed; |
233 j(not_equal, &buffer_overflowed, Label::kNear); | 233 j(equal, &buffer_overflowed, Label::kNear); |
234 ret(0); | 234 ret(0); |
235 bind(&buffer_overflowed); | 235 bind(&buffer_overflowed); |
236 } else { | 236 } else { |
237 DCHECK(and_then == kFallThroughAtEnd); | 237 DCHECK(and_then == kFallThroughAtEnd); |
238 j(equal, &done, Label::kNear); | 238 j(not_equal, &done, Label::kNear); |
239 } | 239 } |
240 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); | 240 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); |
241 CallStub(&store_buffer_overflow); | 241 CallStub(&store_buffer_overflow); |
242 if (and_then == kReturnAtEnd) { | 242 if (and_then == kReturnAtEnd) { |
243 ret(0); | 243 ret(0); |
244 } else { | 244 } else { |
245 DCHECK(and_then == kFallThroughAtEnd); | 245 DCHECK(and_then == kFallThroughAtEnd); |
246 bind(&done); | 246 bind(&done); |
247 } | 247 } |
248 } | 248 } |
(...skipping 5454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5703 movl(rax, dividend); | 5703 movl(rax, dividend); |
5704 shrl(rax, Immediate(31)); | 5704 shrl(rax, Immediate(31)); |
5705 addl(rdx, rax); | 5705 addl(rdx, rax); |
5706 } | 5706 } |
5707 | 5707 |
5708 | 5708 |
5709 } // namespace internal | 5709 } // namespace internal |
5710 } // namespace v8 | 5710 } // namespace v8 |
5711 | 5711 |
5712 #endif // V8_TARGET_ARCH_X64 | 5712 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |