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

Side by Side Diff: src/a64/ic-a64.cc

Issue 164793003: A64: Use a scope utility to allocate scratch registers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 6 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/a64/full-codegen-a64.cc ('k') | src/a64/lithium-codegen-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 // Transition the array appropriately depending on the value type. 1067 // Transition the array appropriately depending on the value type.
1068 __ Ldr(x10, FieldMemOperand(value, HeapObject::kMapOffset)); 1068 __ Ldr(x10, FieldMemOperand(value, HeapObject::kMapOffset));
1069 __ JumpIfNotRoot(x10, Heap::kHeapNumberMapRootIndex, &non_double_value); 1069 __ JumpIfNotRoot(x10, Heap::kHeapNumberMapRootIndex, &non_double_value);
1070 1070
1071 // Value is a double. Transition FAST_SMI_ELEMENTS -> 1071 // Value is a double. Transition FAST_SMI_ELEMENTS ->
1072 // FAST_DOUBLE_ELEMENTS and complete the store. 1072 // FAST_DOUBLE_ELEMENTS and complete the store.
1073 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1073 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1074 FAST_DOUBLE_ELEMENTS, 1074 FAST_DOUBLE_ELEMENTS,
1075 receiver_map, 1075 receiver_map,
1076 x10, 1076 x10,
1077 x11,
1077 slow); 1078 slow);
1078 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3. 1079 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3.
1079 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, 1080 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
1080 FAST_DOUBLE_ELEMENTS); 1081 FAST_DOUBLE_ELEMENTS);
1081 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); 1082 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow);
1082 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1083 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1083 __ B(&fast_double_without_map_check); 1084 __ B(&fast_double_without_map_check);
1084 1085
1085 __ Bind(&non_double_value); 1086 __ Bind(&non_double_value);
1086 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS. 1087 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS.
1087 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1088 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1088 FAST_ELEMENTS, 1089 FAST_ELEMENTS,
1089 receiver_map, 1090 receiver_map,
1090 x10, 1091 x10,
1092 x11,
1091 slow); 1093 slow);
1092 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3. 1094 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3.
1093 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); 1095 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
1094 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, 1096 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode,
1095 slow); 1097 slow);
1096 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1098 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1097 __ B(&finish_store); 1099 __ B(&finish_store);
1098 1100
1099 __ Bind(&transition_double_elements); 1101 __ Bind(&transition_double_elements);
1100 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 1102 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
1101 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 1103 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
1102 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 1104 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
1103 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 1105 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
1104 FAST_ELEMENTS, 1106 FAST_ELEMENTS,
1105 receiver_map, 1107 receiver_map,
1106 x10, 1108 x10,
1109 x11,
1107 slow); 1110 slow);
1108 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3. 1111 ASSERT(receiver_map.Is(x3)); // Transition code expects map in x3.
1109 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 1112 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
1110 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); 1113 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow);
1111 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1114 __ Ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1112 __ B(&finish_store); 1115 __ B(&finish_store);
1113 } 1116 }
1114 1117
1115 1118
1116 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 1119 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ); 1407 ASSERT(to_patch->Mask(TestBranchMask) == TBNZ);
1405 // This is JumpIfSmi(smi_reg, branch_imm). 1408 // This is JumpIfSmi(smi_reg, branch_imm).
1406 patcher.tbz(smi_reg, 0, branch_imm); 1409 patcher.tbz(smi_reg, 0, branch_imm);
1407 } 1410 }
1408 } 1411 }
1409 1412
1410 1413
1411 } } // namespace v8::internal 1414 } } // namespace v8::internal
1412 1415
1413 #endif // V8_TARGET_ARCH_A64 1416 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/full-codegen-a64.cc ('k') | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698