OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 } else if (destination().is(no_reg)) { | 159 } else if (destination().is(no_reg)) { |
160 // Result is not needed but do not clobber the operands in case of | 160 // Result is not needed but do not clobber the operands in case of |
161 // bailout. | 161 // bailout. |
162 __ movq(scratch0(), accumulator1()); | 162 __ movq(scratch0(), accumulator1()); |
163 __ or_(scratch0(), accumulator0()); | 163 __ or_(scratch0(), accumulator0()); |
164 __ JumpIfNotSmi(scratch0(), bailout()); | 164 __ JumpIfNotSmi(scratch0(), bailout()); |
165 } else { | 165 } else { |
166 // Preserve the destination operand in a scratch register in case of | 166 // Preserve the destination operand in a scratch register in case of |
167 // bailout. | 167 // bailout. |
168 Label done; | |
169 __ movq(scratch0(), destination()); | 168 __ movq(scratch0(), destination()); |
170 __ or_(destination(), other_accumulator(destination())); | 169 __ or_(destination(), other_accumulator(destination())); |
171 __ JumpIfSmi(destination(), &done); | 170 __ JumpIfNotSmi(destination(), bailout()); |
172 __ movq(destination(), scratch0()); | |
173 __ jmp(bailout()); | |
174 __ bind(&done); | |
175 } | 171 } |
176 | 172 |
177 | 173 |
178 // If we didn't bailout, the result (in fact, both inputs too) is known to | 174 // If we didn't bailout, the result (in fact, both inputs too) is known to |
179 // be a smi. | 175 // be a smi. |
180 set_as_smi(accumulator0()); | 176 set_as_smi(accumulator0()); |
181 set_as_smi(accumulator1()); | 177 set_as_smi(accumulator1()); |
182 } | 178 } |
183 | 179 |
184 | 180 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 __ ret((scope()->num_parameters() + 1) * kPointerSize); | 229 __ ret((scope()->num_parameters() + 1) * kPointerSize); |
234 | 230 |
235 __ bind(&bailout_); | 231 __ bind(&bailout_); |
236 } | 232 } |
237 | 233 |
238 | 234 |
239 #undef __ | 235 #undef __ |
240 | 236 |
241 | 237 |
242 } } // namespace v8::internal | 238 } } // namespace v8::internal |
OLD | NEW |