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

Unified Diff: src/ia32/ic-ia32.cc

Issue 246076: Change clamping 0..255 instruction sequence for pixel array code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/ic-ia32.cc
===================================================================
--- src/ia32/ic-ia32.cc (revision 3022)
+++ src/ia32/ic-ia32.cc (working copy)
@@ -298,7 +298,6 @@
__ shl(eax, kSmiTagSize);
__ ret(0);
-
// Slow case: Load name and receiver from stack and jump to runtime.
__ bind(&slow);
__ IncrementCounter(&Counters::keyed_load_generic_slow, 1);
@@ -427,11 +426,8 @@
Label done, is_negative;
Tobias Kaes 2009/10/08 07:42:43 is_negative isn't used anymore, is it?
Søren Thygesen Gjesse 2009/10/08 07:46:14 Absolutely right, I will get rid of it.
__ test(eax, Immediate(0xFFFFFF00));
__ j(zero, &done);
- __ j(negative, &is_negative);
- __ mov(eax, Immediate(255));
- __ jmp(&done);
- __ bind(&is_negative);
- __ xor_(eax, Operand(eax)); // Clear eax.
+ __ setcc(negative, eax); // 1 if negative, 0 if positive.
+ __ dec_b(eax); // 0 if negative, 255 if positive.
__ bind(&done);
}
__ mov(ecx, FieldOperand(ecx, PixelArray::kExternalPointerOffset));
@@ -458,7 +454,6 @@
__ sub(Operand(ebx), Immediate(1 << kSmiTagSize)); // decrement ebx again
__ jmp(&fast);
-
// Array case: Get the length and the elements array from the JS
// array. Check that the array is in fast mode; if it is the
// length is always a smi.
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698