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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 6800012: Version 3.2.8... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 8 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/x64/lithium-x64.h ('k') | src/x64/macro-assembler-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 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 if (from.IsTagged()) { 1606 if (from.IsTagged()) {
1607 if (to.IsDouble()) { 1607 if (to.IsDouble()) {
1608 LOperand* value = UseRegister(instr->value()); 1608 LOperand* value = UseRegister(instr->value());
1609 LNumberUntagD* res = new LNumberUntagD(value); 1609 LNumberUntagD* res = new LNumberUntagD(value);
1610 return AssignEnvironment(DefineAsRegister(res)); 1610 return AssignEnvironment(DefineAsRegister(res));
1611 } else { 1611 } else {
1612 ASSERT(to.IsInteger32()); 1612 ASSERT(to.IsInteger32());
1613 LOperand* value = UseRegister(instr->value()); 1613 LOperand* value = UseRegister(instr->value());
1614 bool needs_check = !instr->value()->type().IsSmi(); 1614 bool needs_check = !instr->value()->type().IsSmi();
1615 if (needs_check) { 1615 if (needs_check) {
1616 LOperand* xmm_temp = 1616 LOperand* xmm_temp = instr->CanTruncateToInt32() ? NULL
1617 (instr->CanTruncateToInt32() && CpuFeatures::IsSupported(SSE3)) 1617 : FixedTemp(xmm1);
1618 ? NULL
1619 : FixedTemp(xmm1);
1620 LTaggedToI* res = new LTaggedToI(value, xmm_temp); 1618 LTaggedToI* res = new LTaggedToI(value, xmm_temp);
1621 return AssignEnvironment(DefineSameAsFirst(res)); 1619 return AssignEnvironment(DefineSameAsFirst(res));
1622 } else { 1620 } else {
1623 return DefineSameAsFirst(new LSmiUntag(value, needs_check)); 1621 return DefineSameAsFirst(new LSmiUntag(value, needs_check));
1624 } 1622 }
1625 } 1623 }
1626 } else if (from.IsDouble()) { 1624 } else if (from.IsDouble()) {
1627 if (to.IsTagged()) { 1625 if (to.IsTagged()) {
1628 LOperand* value = UseRegister(instr->value()); 1626 LOperand* value = UseRegister(instr->value());
1629 LOperand* temp = TempRegister(); 1627 LOperand* temp = TempRegister();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 } 1723 }
1726 1724
1727 1725
1728 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 1726 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
1729 LOperand* global_object = UseFixed(instr->global_object(), rax); 1727 LOperand* global_object = UseFixed(instr->global_object(), rax);
1730 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object); 1728 LLoadGlobalGeneric* result = new LLoadGlobalGeneric(global_object);
1731 return MarkAsCall(DefineFixed(result, rax), instr); 1729 return MarkAsCall(DefineFixed(result, rax), instr);
1732 } 1730 }
1733 1731
1734 1732
1735 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { 1733 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
1736 LStoreGlobal* result = new LStoreGlobal(UseRegister(instr->value()), 1734 LStoreGlobalCell* result =
1737 TempRegister()); 1735 new LStoreGlobalCell(UseRegister(instr->value()), TempRegister());
1738 return instr->check_hole_value() ? AssignEnvironment(result) : result; 1736 return instr->check_hole_value() ? AssignEnvironment(result) : result;
1739 } 1737 }
1740 1738
1741 1739
1740 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) {
1741 LOperand* global_object = UseFixed(instr->global_object(), rdx);
1742 LOperand* value = UseFixed(instr->value(), rax);
1743 LStoreGlobalGeneric* result = new LStoreGlobalGeneric(global_object, value);
1744 return MarkAsCall(result, instr);
1745 }
1746
1747
1742 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 1748 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
1743 LOperand* context = UseRegisterAtStart(instr->value()); 1749 LOperand* context = UseRegisterAtStart(instr->value());
1744 return DefineAsRegister(new LLoadContextSlot(context)); 1750 return DefineAsRegister(new LLoadContextSlot(context));
1745 } 1751 }
1746 1752
1747 1753
1748 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { 1754 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
1749 LOperand* context; 1755 LOperand* context;
1750 LOperand* value; 1756 LOperand* value;
1751 LOperand* temp; 1757 LOperand* temp;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1882 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) ||
1877 (representation.IsDouble() && array_type == kExternalFloatArray)); 1883 (representation.IsDouble() && array_type == kExternalFloatArray));
1878 ASSERT(instr->external_pointer()->representation().IsExternal()); 1884 ASSERT(instr->external_pointer()->representation().IsExternal());
1879 ASSERT(instr->key()->representation().IsInteger32()); 1885 ASSERT(instr->key()->representation().IsInteger32());
1880 1886
1881 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1887 LOperand* external_pointer = UseRegister(instr->external_pointer());
1882 bool val_is_temp_register = array_type == kExternalPixelArray || 1888 bool val_is_temp_register = array_type == kExternalPixelArray ||
1883 array_type == kExternalFloatArray; 1889 array_type == kExternalFloatArray;
1884 LOperand* val = val_is_temp_register 1890 LOperand* val = val_is_temp_register
1885 ? UseTempRegister(instr->value()) 1891 ? UseTempRegister(instr->value())
1886 : UseRegister(instr->key()); 1892 : UseRegister(instr->value());
1887 LOperand* key = UseRegister(instr->key()); 1893 LOperand* key = UseRegister(instr->key());
1888 1894
1889 return new LStoreKeyedSpecializedArrayElement(external_pointer, 1895 return new LStoreKeyedSpecializedArrayElement(external_pointer,
1890 key, 1896 key,
1891 val); 1897 val);
1892 } 1898 }
1893 1899
1894 1900
1895 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 1901 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
1896 LOperand* object = UseFixed(instr->object(), rdx); 1902 LOperand* object = UseFixed(instr->object(), rdx);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 2063
2058 env->Drop(instr->pop_count()); 2064 env->Drop(instr->pop_count());
2059 for (int i = 0; i < instr->values()->length(); ++i) { 2065 for (int i = 0; i < instr->values()->length(); ++i) {
2060 HValue* value = instr->values()->at(i); 2066 HValue* value = instr->values()->at(i);
2061 if (instr->HasAssignedIndexAt(i)) { 2067 if (instr->HasAssignedIndexAt(i)) {
2062 env->Bind(instr->GetAssignedIndexAt(i), value); 2068 env->Bind(instr->GetAssignedIndexAt(i), value);
2063 } else { 2069 } else {
2064 env->Push(value); 2070 env->Push(value);
2065 } 2071 }
2066 } 2072 }
2067 ASSERT(env->length() == instr->environment_length());
2068 2073
2069 // If there is an instruction pending deoptimization environment create a 2074 // If there is an instruction pending deoptimization environment create a
2070 // lazy bailout instruction to capture the environment. 2075 // lazy bailout instruction to capture the environment.
2071 if (pending_deoptimization_ast_id_ == instr->ast_id()) { 2076 if (pending_deoptimization_ast_id_ == instr->ast_id()) {
2072 LLazyBailout* lazy_bailout = new LLazyBailout; 2077 LLazyBailout* lazy_bailout = new LLazyBailout;
2073 LInstruction* result = AssignEnvironment(lazy_bailout); 2078 LInstruction* result = AssignEnvironment(lazy_bailout);
2074 instruction_pending_deoptimization_environment_-> 2079 instruction_pending_deoptimization_environment_->
2075 set_deoptimization_environment(result->environment()); 2080 set_deoptimization_environment(result->environment());
2076 ClearInstructionPendingDeoptimizationEnvironment(); 2081 ClearInstructionPendingDeoptimizationEnvironment();
2077 return result; 2082 return result;
(...skipping 23 matching lines...) Expand all
2101 2106
2102 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2107 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2103 HEnvironment* outer = current_block_->last_environment()->outer(); 2108 HEnvironment* outer = current_block_->last_environment()->outer();
2104 current_block_->UpdateEnvironment(outer); 2109 current_block_->UpdateEnvironment(outer);
2105 return NULL; 2110 return NULL;
2106 } 2111 }
2107 2112
2108 } } // namespace v8::internal 2113 } } // namespace v8::internal
2109 2114
2110 #endif // V8_TARGET_ARCH_X64 2115 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698