| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3384 // rdx: receiver (a JSObject) | 3384 // rdx: receiver (a JSObject) |
| 3385 // rbx: elements array | 3385 // rbx: elements array |
| 3386 // rdi: untagged key | 3386 // rdi: untagged key |
| 3387 __ CmpObjectType(rax, HEAP_NUMBER_TYPE, kScratchRegister); | 3387 __ CmpObjectType(rax, HEAP_NUMBER_TYPE, kScratchRegister); |
| 3388 __ j(not_equal, &slow); | 3388 __ j(not_equal, &slow); |
| 3389 // No more branches to slow case on this path. | 3389 // No more branches to slow case on this path. |
| 3390 | 3390 |
| 3391 // The WebGL specification leaves the behavior of storing NaN and | 3391 // The WebGL specification leaves the behavior of storing NaN and |
| 3392 // +/-Infinity into integer arrays basically undefined. For more | 3392 // +/-Infinity into integer arrays basically undefined. For more |
| 3393 // reproducible behavior, convert these to zero. | 3393 // reproducible behavior, convert these to zero. |
| 3394 __ movsd(xmm0, FieldOperand(rax, HeapNumber::kValueOffset)); | 3394 __ LoadDbl(xmm0, FieldOperand(rax, HeapNumber::kValueOffset)); |
| 3395 __ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset)); | 3395 __ movq(rbx, FieldOperand(rbx, ExternalArray::kExternalPointerOffset)); |
| 3396 // rdi: untagged index | 3396 // rdi: untagged index |
| 3397 // rbx: base pointer of external storage | 3397 // rbx: base pointer of external storage |
| 3398 // top of FPU stack: value | 3398 // top of FPU stack: value |
| 3399 if (array_type == kExternalFloatArray) { | 3399 if (array_type == kExternalFloatArray) { |
| 3400 __ cvtsd2ss(xmm0, xmm0); | 3400 __ cvtsd2ss(xmm0, xmm0); |
| 3401 __ movss(Operand(rbx, rdi, times_4, 0), xmm0); | 3401 __ movss(Operand(rbx, rdi, times_4, 0), xmm0); |
| 3402 __ ret(0); | 3402 __ ret(0); |
| 3403 } else if (array_type == kExternalDoubleArray) { | 3403 } else if (array_type == kExternalDoubleArray) { |
| 3404 __ movsd(Operand(rbx, rdi, times_8, 0), xmm0); | 3404 __ movsd(Operand(rbx, rdi, times_8, 0), xmm0); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3463 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); | 3463 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); |
| 3464 | 3464 |
| 3465 return GetCode(flags); | 3465 return GetCode(flags); |
| 3466 } | 3466 } |
| 3467 | 3467 |
| 3468 #undef __ | 3468 #undef __ |
| 3469 | 3469 |
| 3470 } } // namespace v8::internal | 3470 } } // namespace v8::internal |
| 3471 | 3471 |
| 3472 #endif // V8_TARGET_ARCH_X64 | 3472 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |