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

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

Issue 6879009: Support Float64Arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
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 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 LOperand* key = UseRegisterAtStart(instr->key()); 1883 LOperand* key = UseRegisterAtStart(instr->key());
1884 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1884 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1885 return AssignEnvironment(DefineSameAsFirst(result)); 1885 return AssignEnvironment(DefineSameAsFirst(result));
1886 } 1886 }
1887 1887
1888 1888
1889 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( 1889 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1890 HLoadKeyedSpecializedArrayElement* instr) { 1890 HLoadKeyedSpecializedArrayElement* instr) {
1891 ExternalArrayType array_type = instr->array_type(); 1891 ExternalArrayType array_type = instr->array_type();
1892 Representation representation(instr->representation()); 1892 Representation representation(instr->representation());
1893 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1893 ASSERT(
1894 (representation.IsDouble() && array_type == kExternalFloatArray)); 1894 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1895 array_type != kExternalDoubleArray)) ||
1896 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1897 array_type == kExternalDoubleArray)));
1895 ASSERT(instr->key()->representation().IsInteger32()); 1898 ASSERT(instr->key()->representation().IsInteger32());
1896 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1899 LOperand* external_pointer = UseRegister(instr->external_pointer());
1897 LOperand* key = UseRegister(instr->key()); 1900 LOperand* key = UseRegister(instr->key());
1898 LLoadKeyedSpecializedArrayElement* result = 1901 LLoadKeyedSpecializedArrayElement* result =
1899 new LLoadKeyedSpecializedArrayElement(external_pointer, 1902 new LLoadKeyedSpecializedArrayElement(external_pointer,
1900 key); 1903 key);
1901 LInstruction* load_instr = DefineAsRegister(result); 1904 LInstruction* load_instr = DefineAsRegister(result);
1902 // An unsigned int array load might overflow and cause a deopt, make sure it 1905 // An unsigned int array load might overflow and cause a deopt, make sure it
1903 // has an environment. 1906 // has an environment.
1904 return (array_type == kExternalUnsignedIntArray) 1907 return (array_type == kExternalUnsignedIntArray)
(...skipping 28 matching lines...) Expand all
1933 : UseRegisterOrConstantAtStart(instr->key()); 1936 : UseRegisterOrConstantAtStart(instr->key());
1934 1937
1935 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1938 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1936 } 1939 }
1937 1940
1938 1941
1939 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( 1942 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1940 HStoreKeyedSpecializedArrayElement* instr) { 1943 HStoreKeyedSpecializedArrayElement* instr) {
1941 Representation representation(instr->value()->representation()); 1944 Representation representation(instr->value()->representation());
1942 ExternalArrayType array_type = instr->array_type(); 1945 ExternalArrayType array_type = instr->array_type();
1943 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1946 ASSERT(
1944 (representation.IsDouble() && array_type == kExternalFloatArray)); 1947 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1948 array_type != kExternalDoubleArray)) ||
1949 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1950 array_type == kExternalDoubleArray)));
1945 ASSERT(instr->external_pointer()->representation().IsExternal()); 1951 ASSERT(instr->external_pointer()->representation().IsExternal());
1946 ASSERT(instr->key()->representation().IsInteger32()); 1952 ASSERT(instr->key()->representation().IsInteger32());
1947 1953
1948 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1954 LOperand* external_pointer = UseRegister(instr->external_pointer());
1949 LOperand* key = UseRegister(instr->key()); 1955 LOperand* key = UseRegister(instr->key());
1950 LOperand* temp = NULL; 1956 LOperand* temp = NULL;
1951 1957
1952 if (array_type == kExternalPixelArray) { 1958 if (array_type == kExternalPixelArray) {
1953 // The generated code for pixel array stores requires that the clamped value 1959 // The generated code for pixel array stores requires that the clamped value
1954 // is in a byte register. eax is an arbitrary choice to satisfy this 1960 // is in a byte register. eax is an arbitrary choice to satisfy this
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2203 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2198 HEnvironment* outer = current_block_->last_environment()->outer(); 2204 HEnvironment* outer = current_block_->last_environment()->outer();
2199 current_block_->UpdateEnvironment(outer); 2205 current_block_->UpdateEnvironment(outer);
2200 return NULL; 2206 return NULL;
2201 } 2207 }
2202 2208
2203 2209
2204 } } // namespace v8::internal 2210 } } // namespace v8::internal
2205 2211
2206 #endif // V8_TARGET_ARCH_IA32 2212 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698