Chromium Code Reviews| 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 512 strd(src1, src2, dst, cond); | 512 strd(src1, src2, dst, cond); |
| 513 } else { | 513 } else { |
| 514 MemOperand dst2(dst); | 514 MemOperand dst2(dst); |
| 515 dst2.set_offset(dst2.offset() + 4); | 515 dst2.set_offset(dst2.offset() + 4); |
| 516 str(src1, dst, cond); | 516 str(src1, dst, cond); |
| 517 str(src2, dst2, cond); | 517 str(src2, dst2, cond); |
| 518 } | 518 } |
| 519 } | 519 } |
| 520 | 520 |
| 521 | 521 |
| 522 void MacroAssembler::ClearFPSCRBits(uint32_t bits_to_clear, Register scratch) { | 522 void MacroAssembler::ClearFPSCRBits(const uint32_t bits_to_clear, |
| 523 vmrs(scratch); | 523 const Register scratch, |
| 524 bic(scratch, scratch, Operand(bits_to_clear)); | 524 const Condition cond) { |
| 525 vmsr(scratch); | 525 vmrs(scratch, cond); |
| 526 bic(scratch, scratch, Operand(bits_to_clear), LeaveCC, cond); | |
| 527 vmsr(scratch, cond); | |
| 528 } | |
| 529 | |
| 530 | |
| 531 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1, | |
|
Rodolph Perfetta
2011/01/10 14:59:36
If the flags are cleared the intent is to read the
Søren Thygesen Gjesse
2011/01/11 12:41:52
Done.
| |
| 532 const DwVfpRegister src2, | |
| 533 const Register scratch, | |
| 534 const Condition cond) { | |
| 535 // Clear the Invalid cumulative exception flags if a scratch register is | |
| 536 // supplied. | |
| 537 if (!scratch.is(no_reg)) { | |
| 538 ClearFPSCRBits(kVFPInvalidExceptionBit, scratch, cond); | |
| 539 } | |
| 540 | |
| 541 // Compare and move FPSCR flags to the normal condition flags. | |
| 542 vcmp(src1, src2, cond); | |
| 543 vmrs(pc, cond); | |
| 544 } | |
| 545 | |
| 546 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1, | |
|
Rodolph Perfetta
2011/01/10 14:59:36
Ditto.
Søren Thygesen Gjesse
2011/01/11 12:41:52
Done.
| |
| 547 const double src2, | |
| 548 const Register scratch, | |
| 549 const Condition cond) { | |
| 550 // Clear the Invalid cumulative exception flags if a scratch register is | |
| 551 // supplied. | |
| 552 if (!scratch.is(no_reg)) { | |
| 553 ClearFPSCRBits(kVFPInvalidExceptionBit, scratch, cond); | |
| 554 } | |
| 555 | |
| 556 // Compare and move FPSCR flags to the normal condition flags. | |
| 557 vcmp(src1, src2, cond); | |
| 558 vmrs(pc, cond); | |
| 559 } | |
| 560 | |
| 561 | |
| 562 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1, | |
| 563 const DwVfpRegister src2, | |
| 564 const Register fpscr_flags, | |
| 565 const Condition cond) { | |
| 566 // Clear the Invalid cumulative exception flags (use fpscr_flags as scratch). | |
| 567 ClearFPSCRBits(kVFPInvalidExceptionBit, fpscr_flags); | |
| 568 | |
| 569 // Compare and load FPSCR. | |
| 570 vcmp(src1, src2, cond); | |
| 571 vmrs(fpscr_flags); | |
| 572 } | |
| 573 | |
| 574 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1, | |
| 575 const double src2, | |
| 576 const Register fpscr_flags, | |
| 577 const Condition cond) { | |
| 578 // Clear the Invalid cumulative exception flags (use fpscr_flags as scratch). | |
| 579 ClearFPSCRBits(kVFPInvalidExceptionBit, fpscr_flags); | |
| 580 | |
| 581 // Compare and load FPSCR. | |
| 582 vcmp(src1, src2, cond); | |
| 583 vmrs(fpscr_flags); | |
| 526 } | 584 } |
| 527 | 585 |
| 528 | 586 |
| 529 void MacroAssembler::EnterFrame(StackFrame::Type type) { | 587 void MacroAssembler::EnterFrame(StackFrame::Type type) { |
| 530 // r0-r3: preserved | 588 // r0-r3: preserved |
| 531 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); | 589 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); |
| 532 mov(ip, Operand(Smi::FromInt(type))); | 590 mov(ip, Operand(Smi::FromInt(type))); |
| 533 push(ip); | 591 push(ip); |
| 534 mov(ip, Operand(CodeObject())); | 592 mov(ip, Operand(CodeObject())); |
| 535 push(ip); | 593 push(ip); |
| (...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2152 | 2210 |
| 2153 void CodePatcher::Emit(Address addr) { | 2211 void CodePatcher::Emit(Address addr) { |
| 2154 masm()->emit(reinterpret_cast<Instr>(addr)); | 2212 masm()->emit(reinterpret_cast<Instr>(addr)); |
| 2155 } | 2213 } |
| 2156 #endif // ENABLE_DEBUGGER_SUPPORT | 2214 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2157 | 2215 |
| 2158 | 2216 |
| 2159 } } // namespace v8::internal | 2217 } } // namespace v8::internal |
| 2160 | 2218 |
| 2161 #endif // V8_TARGET_ARCH_ARM | 2219 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |