Refactoring and small optimization of the smi code for binary op stubs
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 26 Jan 2010 14:43:40 +0000 (14:43 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 26 Jan 2010 14:43:40 +0000 (14:43 +0000)
commit97e3aae5ef4d9fc27d3b77ef8d87b024698f15ec
treec28d109d6b4813f5504b099c271b93eb4ccf53bf
parent400b62a1f77164eb5da6aa2171fa4a7b3d72be44
Refactoring and small optimization of the smi code for binary op stubs
on ia32.

1. Operate on the values in edx,eax when possible (all operations
except DIV and MOD).  This saves moving them on entry and when falling
out to the non-smi code.

2. Do not perform ADD and SUB before the smi check of their inputs.
This saves undoing the operation in the case that we fall through to
the non-smi case due to non-smi inputs (probably common?), and we can
avoid emitting the smi check code twice (code size reduction).

3. Don't perform OR twice (once to smi check the inputs and once to
smi check the result).

Review URL: http://codereview.chromium.org/556019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ia32/codegen-ia32.cc