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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 ExternalReference::store_buffer_top(isolate()); | 189 ExternalReference::store_buffer_top(isolate()); |
190 mov(scratch, Operand::StaticVariable(store_buffer)); | 190 mov(scratch, Operand::StaticVariable(store_buffer)); |
191 // Store pointer to buffer. | 191 // Store pointer to buffer. |
192 mov(Operand(scratch, 0), addr); | 192 mov(Operand(scratch, 0), addr); |
193 // Increment buffer top. | 193 // Increment buffer top. |
194 add(scratch, Immediate(kPointerSize)); | 194 add(scratch, Immediate(kPointerSize)); |
195 // Write back new top of buffer. | 195 // Write back new top of buffer. |
196 mov(Operand::StaticVariable(store_buffer), scratch); | 196 mov(Operand::StaticVariable(store_buffer), scratch); |
197 // Call stub on end of buffer. | 197 // Call stub on end of buffer. |
198 // Check for end of buffer. | 198 // Check for end of buffer. |
199 test(scratch, Immediate(StoreBuffer::kStoreBufferOverflowBit)); | 199 test(scratch, Immediate(StoreBuffer::kStoreBufferMask)); |
200 if (and_then == kReturnAtEnd) { | 200 if (and_then == kReturnAtEnd) { |
201 Label buffer_overflowed; | 201 Label buffer_overflowed; |
202 j(not_equal, &buffer_overflowed, Label::kNear); | 202 j(equal, &buffer_overflowed, Label::kNear); |
203 ret(0); | 203 ret(0); |
204 bind(&buffer_overflowed); | 204 bind(&buffer_overflowed); |
205 } else { | 205 } else { |
206 DCHECK(and_then == kFallThroughAtEnd); | 206 DCHECK(and_then == kFallThroughAtEnd); |
207 j(equal, &done, Label::kNear); | 207 j(not_equal, &done, Label::kNear); |
208 } | 208 } |
209 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); | 209 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); |
210 CallStub(&store_buffer_overflow); | 210 CallStub(&store_buffer_overflow); |
211 if (and_then == kReturnAtEnd) { | 211 if (and_then == kReturnAtEnd) { |
212 ret(0); | 212 ret(0); |
213 } else { | 213 } else { |
214 DCHECK(and_then == kFallThroughAtEnd); | 214 DCHECK(and_then == kFallThroughAtEnd); |
215 bind(&done); | 215 bind(&done); |
216 } | 216 } |
217 } | 217 } |
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3261 mov(eax, dividend); | 3261 mov(eax, dividend); |
3262 shr(eax, 31); | 3262 shr(eax, 31); |
3263 add(edx, eax); | 3263 add(edx, eax); |
3264 } | 3264 } |
3265 | 3265 |
3266 | 3266 |
3267 } // namespace internal | 3267 } // namespace internal |
3268 } // namespace v8 | 3268 } // namespace v8 |
3269 | 3269 |
3270 #endif // V8_TARGET_ARCH_X87 | 3270 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |