Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2014)

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 10274008: Fix mistakes in r11472 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after
3396 __ movss(Operand(rbx, rdi, times_4, 0), xmm0); 3396 __ movss(Operand(rbx, rdi, times_4, 0), xmm0);
3397 __ ret(0); 3397 __ ret(0);
3398 } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { 3398 } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) {
3399 __ movsd(Operand(rbx, rdi, times_8, 0), xmm0); 3399 __ movsd(Operand(rbx, rdi, times_8, 0), xmm0);
3400 __ ret(0); 3400 __ ret(0);
3401 } else { 3401 } else {
3402 // Perform float-to-int conversion with truncation (round-to-zero) 3402 // Perform float-to-int conversion with truncation (round-to-zero)
3403 // behavior. 3403 // behavior.
3404 // Fast path: use machine instruction to convert to int64. If that 3404 // Fast path: use machine instruction to convert to int64. If that
3405 // fails (out-of-range), go into the runtime. 3405 // fails (out-of-range), go into the runtime.
3406 __ cvttsd2siq(rdx, xmm0); 3406 __ cvttsd2siq(r8, xmm0);
3407 __ Set(kScratchRegister, V8_UINT64_C(0x8000000000000000)); 3407 __ Set(kScratchRegister, V8_UINT64_C(0x8000000000000000));
3408 __ cmpq(rdx, kScratchRegister); 3408 __ cmpq(r8, kScratchRegister);
3409 __ j(equal, &slow); 3409 __ j(equal, &slow);
3410 3410
3411 // rdx: value (converted to an untagged integer) 3411 // rdx: value (converted to an untagged integer)
3412 // rdi: untagged index 3412 // rdi: untagged index
3413 // rbx: base pointer of external storage 3413 // rbx: base pointer of external storage
3414 switch (elements_kind) { 3414 switch (elements_kind) {
3415 case EXTERNAL_BYTE_ELEMENTS: 3415 case EXTERNAL_BYTE_ELEMENTS:
3416 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 3416 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
3417 __ movb(Operand(rbx, rdi, times_1, 0), rdx); 3417 __ movb(Operand(rbx, rdi, times_1, 0), r8);
3418 break; 3418 break;
3419 case EXTERNAL_SHORT_ELEMENTS: 3419 case EXTERNAL_SHORT_ELEMENTS:
3420 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 3420 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
3421 __ movw(Operand(rbx, rdi, times_2, 0), rdx); 3421 __ movw(Operand(rbx, rdi, times_2, 0), r8);
3422 break; 3422 break;
3423 case EXTERNAL_INT_ELEMENTS: 3423 case EXTERNAL_INT_ELEMENTS:
3424 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 3424 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
3425 __ movl(Operand(rbx, rdi, times_4, 0), rdx); 3425 __ movl(Operand(rbx, rdi, times_4, 0), r8);
3426 break; 3426 break;
3427 case EXTERNAL_PIXEL_ELEMENTS: 3427 case EXTERNAL_PIXEL_ELEMENTS:
3428 case EXTERNAL_FLOAT_ELEMENTS: 3428 case EXTERNAL_FLOAT_ELEMENTS:
3429 case EXTERNAL_DOUBLE_ELEMENTS: 3429 case EXTERNAL_DOUBLE_ELEMENTS:
3430 case FAST_ELEMENTS: 3430 case FAST_ELEMENTS:
3431 case FAST_SMI_ONLY_ELEMENTS: 3431 case FAST_SMI_ONLY_ELEMENTS:
3432 case FAST_DOUBLE_ELEMENTS: 3432 case FAST_DOUBLE_ELEMENTS:
3433 case DICTIONARY_ELEMENTS: 3433 case DICTIONARY_ELEMENTS:
3434 case NON_STRICT_ARGUMENTS_ELEMENTS: 3434 case NON_STRICT_ARGUMENTS_ELEMENTS:
3435 UNREACHABLE(); 3435 UNREACHABLE();
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
3823 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3823 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3824 } 3824 }
3825 } 3825 }
3826 3826
3827 3827
3828 #undef __ 3828 #undef __
3829 3829
3830 } } // namespace v8::internal 3830 } } // namespace v8::internal
3831 3831
3832 #endif // V8_TARGET_ARCH_X64 3832 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698