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

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

Issue 6541019: x64: Implement the missing generic load and store operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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 | « no previous file | src/x64/lithium-x64.h » ('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 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 Register key = ToRegister(instr->key()); 1919 Register key = ToRegister(instr->key());
1920 Register result = ToRegister(instr->result()); 1920 Register result = ToRegister(instr->result());
1921 ASSERT(result.is(external_elements)); 1921 ASSERT(result.is(external_elements));
1922 1922
1923 // Load the result. 1923 // Load the result.
1924 __ movzxbq(result, Operand(external_elements, key, times_1, 0)); 1924 __ movzxbq(result, Operand(external_elements, key, times_1, 0));
1925 } 1925 }
1926 1926
1927 1927
1928 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 1928 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
1929 Abort("Unimplemented: %s", "DoLoadKeyedGeneric"); 1929 ASSERT(ToRegister(instr->object()).is(rdx));
1930 ASSERT(ToRegister(instr->key()).is(rax));
1931
1932 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
1933 CallCode(ic, RelocInfo::CODE_TARGET, instr);
1930 } 1934 }
1931 1935
1932 1936
1933 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 1937 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
1934 Register result = ToRegister(instr->result()); 1938 Register result = ToRegister(instr->result());
1935 1939
1936 // Check for arguments adapter frame. 1940 // Check for arguments adapter frame.
1937 NearLabel done, adapted; 1941 NearLabel done, adapted;
1938 __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); 1942 __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
1939 __ SmiCompare(Operand(result, StandardFrameConstants::kContextOffset), 1943 __ SmiCompare(Operand(result, StandardFrameConstants::kContextOffset),
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 if (instr->needs_write_barrier()) { 2212 if (instr->needs_write_barrier()) {
2209 // Update the write barrier for the properties array. 2213 // Update the write barrier for the properties array.
2210 // object is used as a scratch register. 2214 // object is used as a scratch register.
2211 __ RecordWrite(temp, offset, value, object); 2215 __ RecordWrite(temp, offset, value, object);
2212 } 2216 }
2213 } 2217 }
2214 } 2218 }
2215 2219
2216 2220
2217 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 2221 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
2218 Abort("Unimplemented: %s", "DoStoreNamedGeneric"); 2222 ASSERT(ToRegister(instr->object()).is(rdx));
2223 ASSERT(ToRegister(instr->value()).is(rax));
2224
2225 __ Move(rcx, instr->hydrogen()->name());
2226 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
2227 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2219 } 2228 }
2220 2229
2221 2230
2222 void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) { 2231 void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) {
2223 Register external_pointer = ToRegister(instr->external_pointer()); 2232 Register external_pointer = ToRegister(instr->external_pointer());
2224 Register key = ToRegister(instr->key()); 2233 Register key = ToRegister(instr->key());
2225 Register value = ToRegister(instr->value()); 2234 Register value = ToRegister(instr->value());
2226 2235
2227 { // Clamp the value to [0..255]. 2236 { // Clamp the value to [0..255].
2228 NearLabel done; 2237 NearLabel done;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 __ lea(key, FieldOperand(elements, 2281 __ lea(key, FieldOperand(elements,
2273 key, 2282 key,
2274 times_pointer_size, 2283 times_pointer_size,
2275 FixedArray::kHeaderSize)); 2284 FixedArray::kHeaderSize));
2276 __ RecordWrite(elements, key, value); 2285 __ RecordWrite(elements, key, value);
2277 } 2286 }
2278 } 2287 }
2279 2288
2280 2289
2281 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 2290 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
2282 Abort("Unimplemented: %s", "DoStoreKeyedGeneric"); 2291 ASSERT(ToRegister(instr->object()).is(rdx));
2292 ASSERT(ToRegister(instr->key()).is(rcx));
2293 ASSERT(ToRegister(instr->value()).is(rax));
2294
2295 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
2296 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2283 } 2297 }
2284 2298
2285 2299
2286 void LCodeGen::DoStringLength(LStringLength* instr) { 2300 void LCodeGen::DoStringLength(LStringLength* instr) {
2287 Register string = ToRegister(instr->string()); 2301 Register string = ToRegister(instr->string());
2288 Register result = ToRegister(instr->result()); 2302 Register result = ToRegister(instr->result());
2289 __ movq(result, FieldOperand(string, String::kLengthOffset)); 2303 __ movq(result, FieldOperand(string, String::kLengthOffset));
2290 } 2304 }
2291 2305
2292 2306
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2843 RegisterEnvironmentForDeoptimization(environment); 2857 RegisterEnvironmentForDeoptimization(environment);
2844 ASSERT(osr_pc_offset_ == -1); 2858 ASSERT(osr_pc_offset_ == -1);
2845 osr_pc_offset_ = masm()->pc_offset(); 2859 osr_pc_offset_ = masm()->pc_offset();
2846 } 2860 }
2847 2861
2848 #undef __ 2862 #undef __
2849 2863
2850 } } // namespace v8::internal 2864 } } // namespace v8::internal
2851 2865
2852 #endif // V8_TARGET_ARCH_X64 2866 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698