Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 6197003: ARM: Always use the overflow flag to check for NaNs participating in a floati... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 vmrs(scratch, cond); 525 vmrs(scratch, cond);
526 bic(scratch, scratch, Operand(bits_to_clear), LeaveCC, cond); 526 bic(scratch, scratch, Operand(bits_to_clear), LeaveCC, cond);
527 vmsr(scratch, cond); 527 vmsr(scratch, cond);
528 } 528 }
529 529
530 530
531 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1, 531 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1,
532 const DwVfpRegister src2, 532 const DwVfpRegister src2,
533 const Condition cond) { 533 const Condition cond) {
534 // Compare and move FPSCR flags to the normal condition flags. 534 // Compare and move FPSCR flags to the normal condition flags.
535 vcmp(src1, src2, cond); 535 VFPCompareAndLoadFlags(src1, src2, pc, cond);
536 vmrs(pc, cond);
537 } 536 }
538 537
539 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1, 538 void MacroAssembler::VFPCompareAndSetFlags(const DwVfpRegister src1,
540 const double src2, 539 const double src2,
541 const Condition cond) { 540 const Condition cond) {
542 // Compare and move FPSCR flags to the normal condition flags. 541 // Compare and move FPSCR flags to the normal condition flags.
543 vcmp(src1, src2, cond); 542 VFPCompareAndLoadFlags(src1, src2, pc, cond);
544 vmrs(pc, cond);
545 } 543 }
546 544
547 545
548 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1, 546 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1,
549 const DwVfpRegister src2, 547 const DwVfpRegister src2,
550 const Register fpscr_flags, 548 const Register fpscr_flags,
551 const Condition cond) { 549 const Condition cond) {
552 // Clear the Invalid cumulative exception flags (use fpscr_flags as scratch).
553 ClearFPSCRBits(kVFPInvalidExceptionBit, fpscr_flags);
554
555 // Compare and load FPSCR. 550 // Compare and load FPSCR.
556 vcmp(src1, src2, cond); 551 vcmp(src1, src2, cond);
557 vmrs(fpscr_flags); 552 vmrs(fpscr_flags, cond);
558 } 553 }
559 554
560 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1, 555 void MacroAssembler::VFPCompareAndLoadFlags(const DwVfpRegister src1,
561 const double src2, 556 const double src2,
562 const Register fpscr_flags, 557 const Register fpscr_flags,
563 const Condition cond) { 558 const Condition cond) {
564 // Clear the Invalid cumulative exception flags (use fpscr_flags as scratch).
565 ClearFPSCRBits(kVFPInvalidExceptionBit, fpscr_flags);
566
567 // Compare and load FPSCR. 559 // Compare and load FPSCR.
568 vcmp(src1, src2, cond); 560 vcmp(src1, src2, cond);
569 vmrs(fpscr_flags); 561 vmrs(fpscr_flags, cond);
570 } 562 }
571 563
572 564
573 void MacroAssembler::EnterFrame(StackFrame::Type type) { 565 void MacroAssembler::EnterFrame(StackFrame::Type type) {
574 // r0-r3: preserved 566 // r0-r3: preserved
575 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); 567 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
576 mov(ip, Operand(Smi::FromInt(type))); 568 mov(ip, Operand(Smi::FromInt(type)));
577 push(ip); 569 push(ip);
578 mov(ip, Operand(CodeObject())); 570 mov(ip, Operand(CodeObject()));
579 push(ip); 571 push(ip);
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 2190
2199 void CodePatcher::Emit(Address addr) { 2191 void CodePatcher::Emit(Address addr) {
2200 masm()->emit(reinterpret_cast<Instr>(addr)); 2192 masm()->emit(reinterpret_cast<Instr>(addr));
2201 } 2193 }
2202 #endif // ENABLE_DEBUGGER_SUPPORT 2194 #endif // ENABLE_DEBUGGER_SUPPORT
2203 2195
2204 2196
2205 } } // namespace v8::internal 2197 } } // namespace v8::internal
2206 2198
2207 #endif // V8_TARGET_ARCH_ARM 2199 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698