| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); | 2266 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); |
| 2267 patch_site.EmitPatchInfo(); | 2267 patch_site.EmitPatchInfo(); |
| 2268 __ jmp(&done, Label::kNear); | 2268 __ jmp(&done, Label::kNear); |
| 2269 | 2269 |
| 2270 // Smi case. | 2270 // Smi case. |
| 2271 __ bind(&smi_case); | 2271 __ bind(&smi_case); |
| 2272 __ mov(eax, edx); // Copy left operand in case of a stub call. | 2272 __ mov(eax, edx); // Copy left operand in case of a stub call. |
| 2273 | 2273 |
| 2274 switch (op) { | 2274 switch (op) { |
| 2275 case Token::SAR: | 2275 case Token::SAR: |
| 2276 __ SmiUntag(eax); | |
| 2277 __ SmiUntag(ecx); | 2276 __ SmiUntag(ecx); |
| 2278 __ sar_cl(eax); // No checks of result necessary | 2277 __ sar_cl(eax); // No checks of result necessary |
| 2279 __ SmiTag(eax); | 2278 __ and_(eax, Immediate(~kSmiTagMask)); |
| 2280 break; | 2279 break; |
| 2281 case Token::SHL: { | 2280 case Token::SHL: { |
| 2282 Label result_ok; | 2281 Label result_ok; |
| 2283 __ SmiUntag(eax); | 2282 __ SmiUntag(eax); |
| 2284 __ SmiUntag(ecx); | 2283 __ SmiUntag(ecx); |
| 2285 __ shl_cl(eax); | 2284 __ shl_cl(eax); |
| 2286 // Check that the *signed* result fits in a smi. | 2285 // Check that the *signed* result fits in a smi. |
| 2287 __ cmp(eax, 0xc0000000); | 2286 __ cmp(eax, 0xc0000000); |
| 2288 __ j(positive, &result_ok); | 2287 __ j(positive, &result_ok); |
| 2289 __ SmiTag(ecx); | 2288 __ SmiTag(ecx); |
| (...skipping 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4911 | 4910 |
| 4912 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4911 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4913 Assembler::target_address_at(call_target_address)); | 4912 Assembler::target_address_at(call_target_address)); |
| 4914 return OSR_AFTER_STACK_CHECK; | 4913 return OSR_AFTER_STACK_CHECK; |
| 4915 } | 4914 } |
| 4916 | 4915 |
| 4917 | 4916 |
| 4918 } } // namespace v8::internal | 4917 } } // namespace v8::internal |
| 4919 | 4918 |
| 4920 #endif // V8_TARGET_ARCH_IA32 | 4919 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |