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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 6594115: Optimize loads from root-array in X64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reordered the root-array slightly. Should have no effect on ia32, but help slightly on x64. Created 9 years, 9 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/heap.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after
3554 // TODO(X64): On Win64, if we ever use XMM6-XMM15, the low low 64 bits are 3554 // TODO(X64): On Win64, if we ever use XMM6-XMM15, the low low 64 bits are
3555 // callee save as well. 3555 // callee save as well.
3556 3556
3557 // Save copies of the top frame descriptor on the stack. 3557 // Save copies of the top frame descriptor on the stack.
3558 ExternalReference c_entry_fp(Top::k_c_entry_fp_address); 3558 ExternalReference c_entry_fp(Top::k_c_entry_fp_address);
3559 __ load_rax(c_entry_fp); 3559 __ load_rax(c_entry_fp);
3560 __ push(rax); 3560 __ push(rax);
3561 3561
3562 // Set up the roots and smi constant registers. 3562 // Set up the roots and smi constant registers.
3563 // Needs to be done before any further smi loads. 3563 // Needs to be done before any further smi loads.
3564 ExternalReference roots_address = ExternalReference::roots_address(); 3564 __ InitializeRootRegister();
3565 __ movq(kRootRegister, roots_address);
3566 __ InitializeSmiConstantRegister(); 3565 __ InitializeSmiConstantRegister();
3567 3566
3568 #ifdef ENABLE_LOGGING_AND_PROFILING 3567 #ifdef ENABLE_LOGGING_AND_PROFILING
3569 // If this is the outermost JS call, set js_entry_sp value. 3568 // If this is the outermost JS call, set js_entry_sp value.
3570 ExternalReference js_entry_sp(Top::k_js_entry_sp_address); 3569 ExternalReference js_entry_sp(Top::k_js_entry_sp_address);
3571 __ load_rax(js_entry_sp); 3570 __ load_rax(js_entry_sp);
3572 __ testq(rax, rax); 3571 __ testq(rax, rax);
3573 __ j(not_zero, &not_outermost_js); 3572 __ j(not_zero, &not_outermost_js);
3574 __ movq(rax, rbp); 3573 __ movq(rax, rbp);
3575 __ store_rax(js_entry_sp); 3574 __ store_rax(js_entry_sp);
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
5141 FieldOperand(elements, PixelArray::kExternalPointerOffset)); 5140 FieldOperand(elements, PixelArray::kExternalPointerOffset));
5142 __ movb(Operand(external_pointer, untagged_key, times_1, 0), untagged_value); 5141 __ movb(Operand(external_pointer, untagged_key, times_1, 0), untagged_value);
5143 __ ret(0); // Return value in eax. 5142 __ ret(0); // Return value in eax.
5144 } 5143 }
5145 5144
5146 #undef __ 5145 #undef __
5147 5146
5148 } } // namespace v8::internal 5147 } } // namespace v8::internal
5149 5148
5150 #endif // V8_TARGET_ARCH_X64 5149 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698