Chromium Code Reviews| Index: src/x64/code-stubs-x64.cc |
| =================================================================== |
| --- src/x64/code-stubs-x64.cc (revision 5989) |
| +++ src/x64/code-stubs-x64.cc (working copy) |
| @@ -1069,25 +1069,37 @@ |
| char* elem_in0 = reinterpret_cast<char*>(&(test_elem[0].in[0])); |
| char* elem_in1 = reinterpret_cast<char*>(&(test_elem[0].in[1])); |
| char* elem_out = reinterpret_cast<char*>(&(test_elem[0].output)); |
| + char* elem_uout = reinterpret_cast<char*>(&(test_elem[0].untagged_output)); |
| // Two uint_32's and a pointer per element. |
|
Erik Corry
2010/12/13 20:26:13
Wrong type name and out of date comment.
|
| - CHECK_EQ(16, static_cast<int>(elem2_start - elem_start)); |
| + CHECK_EQ(24, static_cast<int>(elem2_start - elem_start)); |
| CHECK_EQ(0, static_cast<int>(elem_in0 - elem_start)); |
| CHECK_EQ(kIntSize, static_cast<int>(elem_in1 - elem_start)); |
| CHECK_EQ(2 * kIntSize, static_cast<int>(elem_out - elem_start)); |
| + CHECK_EQ(4 * kIntSize, static_cast<int>(elem_uout - elem_start)); |
| } |
| #endif |
| // Find the address of the rcx'th entry in the cache, i.e., &rax[rcx*16]. |
|
Erik Corry
2010/12/13 20:26:13
Out of date comment.
|
| - __ addl(rcx, rcx); |
| + __ lea(rcx, Operand(rcx, rcx, times_2, 0)); |
| __ lea(rcx, Operand(rax, rcx, times_8, 0)); |
| // Check if cache matches: Double value is stored in uint32_t[2] array. |
| - NearLabel cache_miss; |
| + Label cache_miss; |
|
Erik Corry
2010/12/13 20:26:13
Surely this is still within range of a NearLabel.
|
| + NearLabel allocate_cached_answer; |
| __ cmpq(rbx, Operand(rcx, 0)); |
| __ j(not_equal, &cache_miss); |
| // Cache hit! |
| __ movq(rax, Operand(rcx, 2 * kIntSize)); |
| __ fstp(0); // Clear FPU stack. |
| + __ testq(rax, rax); |
| + __ j(zero, &allocate_cached_answer); // The answer is cached as untagged. |
|
Erik Corry
2010/12/13 20:26:13
Comment could be clearer again.
|
| __ ret(kPointerSize); |
| + __ bind(&allocate_cached_answer); |
| + __ AllocateHeapNumber(rax, rdi, &runtime_call_clear_stack); |
| + __ movq(rdi, Operand(rcx, 4 * kIntSize)); |
| + __ movq(FieldOperand(rax, HeapNumber::kValueOffset), rdi); |
| + __ movq(Operand(rcx, 2 * kIntSize), rax); |
| + __ ret(kPointerSize); |
| + |
| __ bind(&cache_miss); |
| // Update cache with new value. |
| Label nan_result; |