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

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

Issue 7067028: Ensure that external pixel arrays use a byte register in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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 | no next file » | 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 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 array_type != kExternalDoubleArray)) || 1997 array_type != kExternalDoubleArray)) ||
1998 (representation.IsDouble() && (array_type == kExternalFloatArray || 1998 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1999 array_type == kExternalDoubleArray))); 1999 array_type == kExternalDoubleArray)));
2000 ASSERT(instr->external_pointer()->representation().IsExternal()); 2000 ASSERT(instr->external_pointer()->representation().IsExternal());
2001 ASSERT(instr->key()->representation().IsInteger32()); 2001 ASSERT(instr->key()->representation().IsInteger32());
2002 2002
2003 LOperand* external_pointer = UseRegister(instr->external_pointer()); 2003 LOperand* external_pointer = UseRegister(instr->external_pointer());
2004 LOperand* key = UseRegisterOrConstant(instr->key()); 2004 LOperand* key = UseRegisterOrConstant(instr->key());
2005 LOperand* val = NULL; 2005 LOperand* val = NULL;
2006 if (array_type == kExternalByteArray || 2006 if (array_type == kExternalByteArray ||
2007 array_type == kExternalUnsignedByteArray) { 2007 array_type == kExternalUnsignedByteArray ||
2008 array_type == kExternalPixelArray) {
2008 // We need a byte register in this case for the value. 2009 // We need a byte register in this case for the value.
2009 val = UseFixed(instr->value(), eax); 2010 val = UseFixed(instr->value(), eax);
2010 } else { 2011 } else {
2011 val = UseRegister(instr->value()); 2012 val = UseRegister(instr->value());
2012 } 2013 }
2013 2014
2014 return new LStoreKeyedSpecializedArrayElement(external_pointer, 2015 return new LStoreKeyedSpecializedArrayElement(external_pointer,
2015 key, 2016 key,
2016 val); 2017 val);
2017 } 2018 }
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 LOperand* key = UseOrConstantAtStart(instr->key()); 2252 LOperand* key = UseOrConstantAtStart(instr->key());
2252 LOperand* object = UseOrConstantAtStart(instr->object()); 2253 LOperand* object = UseOrConstantAtStart(instr->object());
2253 LIn* result = new LIn(key, object); 2254 LIn* result = new LIn(key, object);
2254 return MarkAsCall(DefineFixed(result, eax), instr); 2255 return MarkAsCall(DefineFixed(result, eax), instr);
2255 } 2256 }
2256 2257
2257 2258
2258 } } // namespace v8::internal 2259 } } // namespace v8::internal
2259 2260
2260 #endif // V8_TARGET_ARCH_IA32 2261 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698