Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1390 break; | 1390 break; |
| 1391 case Token::SUB: | 1391 case Token::SUB: |
| 1392 __ vsub(left, left, right); | 1392 __ vsub(left, left, right); |
| 1393 break; | 1393 break; |
| 1394 case Token::MUL: | 1394 case Token::MUL: |
| 1395 __ vmul(left, left, right); | 1395 __ vmul(left, left, right); |
| 1396 break; | 1396 break; |
| 1397 case Token::DIV: | 1397 case Token::DIV: |
| 1398 __ vdiv(left, left, right); | 1398 __ vdiv(left, left, right); |
| 1399 break; | 1399 break; |
| 1400 case Token::MOD: { | 1400 case Token::MOD: { |
|
Søren Thygesen Gjesse
2011/02/03 09:00:23
Please use Push(r3, r2, r1, r0)
| |
| 1401 Abort("DoArithmeticD unimplemented for MOD."); | 1401 // Save r0-r3 on the stack. |
| 1402 __ stm(db_w, sp, r0.bit() | r1.bit() | r2.bit() | r3.bit()); | |
| 1403 | |
| 1404 __ PrepareCallCFunction(4, scratch0()); | |
| 1405 __ vmov(r0, r1, left); | |
| 1406 __ vmov(r2, r3, right); | |
| 1407 __ CallCFunction(ExternalReference::double_fp_operation(Token::MOD), 4); | |
| 1408 // Move the result in the double result register. | |
| 1409 __ vmov(ToDoubleRegister(instr->result()), r0, r1); | |
| 1410 | |
| 1411 // Restore r0-r3. | |
|
Søren Thygesen Gjesse
2011/02/03 09:00:23
We currently don't have a Pop(r0, r1, r2, r4), so
| |
| 1412 __ ldm(ia_w, sp, r0.bit() | r1.bit() | r2.bit() | r3.bit()); | |
| 1402 break; | 1413 break; |
| 1403 } | 1414 } |
| 1404 default: | 1415 default: |
| 1405 UNREACHABLE(); | 1416 UNREACHABLE(); |
| 1406 break; | 1417 break; |
| 1407 } | 1418 } |
| 1408 } | 1419 } |
| 1409 | 1420 |
| 1410 | 1421 |
| 1411 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1422 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
| (...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3682 | 3693 |
| 3683 | 3694 |
| 3684 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 3695 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
| 3685 Abort("DoOsrEntry unimplemented."); | 3696 Abort("DoOsrEntry unimplemented."); |
| 3686 } | 3697 } |
| 3687 | 3698 |
| 3688 | 3699 |
| 3689 #undef __ | 3700 #undef __ |
| 3690 | 3701 |
| 3691 } } // namespace v8::internal | 3702 } } // namespace v8::internal |
| OLD | NEW |