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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 Label* slow, | 1359 Label* slow, |
1360 SmiCodeGenerateHeapNumberResults allow_heapnumber_results) { | 1360 SmiCodeGenerateHeapNumberResults allow_heapnumber_results) { |
1361 // 1. Move arguments into edx, eax except for DIV and MOD, which need the | 1361 // 1. Move arguments into edx, eax except for DIV and MOD, which need the |
1362 // dividend in eax and edx free for the division. Use eax, ebx for those. | 1362 // dividend in eax and edx free for the division. Use eax, ebx for those. |
1363 Comment load_comment(masm, "-- Load arguments"); | 1363 Comment load_comment(masm, "-- Load arguments"); |
1364 Register left = edx; | 1364 Register left = edx; |
1365 Register right = eax; | 1365 Register right = eax; |
1366 if (op_ == Token::DIV || op_ == Token::MOD) { | 1366 if (op_ == Token::DIV || op_ == Token::MOD) { |
1367 left = eax; | 1367 left = eax; |
1368 right = ebx; | 1368 right = ebx; |
1369 __ mov(ebx, eax); | 1369 __ mov(ebx, eax); |
1370 __ mov(eax, edx); | 1370 __ mov(eax, edx); |
1371 } | 1371 } |
1372 | 1372 |
1373 | 1373 |
1374 // 2. Prepare the smi check of both operands by oring them together. | 1374 // 2. Prepare the smi check of both operands by oring them together. |
1375 Comment smi_check_comment(masm, "-- Smi check arguments"); | 1375 Comment smi_check_comment(masm, "-- Smi check arguments"); |
1376 Label not_smis; | 1376 Label not_smis; |
1377 Register combined = ecx; | 1377 Register combined = ecx; |
1378 ASSERT(!left.is(combined) && !right.is(combined)); | 1378 ASSERT(!left.is(combined) && !right.is(combined)); |
1379 switch (op_) { | 1379 switch (op_) { |
1380 case Token::BIT_OR: | 1380 case Token::BIT_OR: |
(...skipping 5039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6420 // Do a tail call to the rewritten stub. | 6420 // Do a tail call to the rewritten stub. |
6421 __ jmp(Operand(edi)); | 6421 __ jmp(Operand(edi)); |
6422 } | 6422 } |
6423 | 6423 |
6424 | 6424 |
6425 #undef __ | 6425 #undef __ |
6426 | 6426 |
6427 } } // namespace v8::internal | 6427 } } // namespace v8::internal |
6428 | 6428 |
6429 #endif // V8_TARGET_ARCH_IA32 | 6429 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |