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

Side by Side Diff: src/mips/code-stubs-mips.h

Issue 14113011: MIPS: Remove soft-float support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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/mips/assembler-mips-inl.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 Major MajorKey() { return TranscendentalCache; } 56 Major MajorKey() { return TranscendentalCache; }
57 int MinorKey() { return type_ | argument_type_; } 57 int MinorKey() { return type_ | argument_type_; }
58 Runtime::FunctionId RuntimeFunction(); 58 Runtime::FunctionId RuntimeFunction();
59 }; 59 };
60 60
61 61
62 class StoreBufferOverflowStub: public PlatformCodeStub { 62 class StoreBufferOverflowStub: public PlatformCodeStub {
63 public: 63 public:
64 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp) 64 explicit StoreBufferOverflowStub(SaveFPRegsMode save_fp)
65 : save_doubles_(save_fp) { 65 : save_doubles_(save_fp) {}
66 ASSERT(CpuFeatures::IsSafeForSnapshot(FPU) || save_fp == kDontSaveFPRegs);
67 }
68 66
69 void Generate(MacroAssembler* masm); 67 void Generate(MacroAssembler* masm);
70 68
71 virtual bool IsPregenerated() { return true; } 69 virtual bool IsPregenerated() { return true; }
72 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate); 70 static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
73 virtual bool SometimesSetsUpAFrame() { return false; } 71 virtual bool SometimesSetsUpAFrame() { return false; }
74 72
75 private: 73 private:
76 SaveFPRegsMode save_doubles_; 74 SaveFPRegsMode save_doubles_;
77 75
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 void Restore(MacroAssembler* masm) { 477 void Restore(MacroAssembler* masm) {
480 masm->pop(scratch1_); 478 masm->pop(scratch1_);
481 } 479 }
482 480
483 // If we have to call into C then we need to save and restore all caller- 481 // If we have to call into C then we need to save and restore all caller-
484 // saved registers that were not already preserved. The scratch registers 482 // saved registers that were not already preserved. The scratch registers
485 // will be restored by other means so we don't bother pushing them here. 483 // will be restored by other means so we don't bother pushing them here.
486 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { 484 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) {
487 masm->MultiPush((kJSCallerSaved | ra.bit()) & ~scratch1_.bit()); 485 masm->MultiPush((kJSCallerSaved | ra.bit()) & ~scratch1_.bit());
488 if (mode == kSaveFPRegs) { 486 if (mode == kSaveFPRegs) {
489 CpuFeatureScope scope(masm, FPU);
490 masm->MultiPushFPU(kCallerSavedFPU); 487 masm->MultiPushFPU(kCallerSavedFPU);
491 } 488 }
492 } 489 }
493 490
494 inline void RestoreCallerSaveRegisters(MacroAssembler*masm, 491 inline void RestoreCallerSaveRegisters(MacroAssembler*masm,
495 SaveFPRegsMode mode) { 492 SaveFPRegsMode mode) {
496 if (mode == kSaveFPRegs) { 493 if (mode == kSaveFPRegs) {
497 CpuFeatureScope scope(masm, FPU);
498 masm->MultiPopFPU(kCallerSavedFPU); 494 masm->MultiPopFPU(kCallerSavedFPU);
499 } 495 }
500 masm->MultiPop((kJSCallerSaved | ra.bit()) & ~scratch1_.bit()); 496 masm->MultiPop((kJSCallerSaved | ra.bit()) & ~scratch1_.bit());
501 } 497 }
502 498
503 inline Register object() { return object_; } 499 inline Register object() { return object_; }
504 inline Register address() { return address_; } 500 inline Register address() { return address_; }
505 inline Register scratch0() { return scratch0_; } 501 inline Register scratch0() { return scratch0_; }
506 inline Register scratch1() { return scratch1_; } 502 inline Register scratch1() { return scratch1_; }
507 503
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 Register object, 674 Register object,
679 Register dst, 675 Register dst,
680 Register heap_number_map, 676 Register heap_number_map,
681 Register scratch1, 677 Register scratch1,
682 Register scratch2, 678 Register scratch2,
683 Register scratch3, 679 Register scratch3,
684 FPURegister double_scratch0, 680 FPURegister double_scratch0,
685 FPURegister double_scratch1, 681 FPURegister double_scratch1,
686 Label* not_int32); 682 Label* not_int32);
687 683
688 // Generate non FPU code to check if a double can be exactly represented by a
689 // 32-bit integer. This does not check for 0 or -0, which need
690 // to be checked for separately.
691 // Control jumps to not_int32 if the value is not a 32-bit integer, and falls
692 // through otherwise.
693 // src1 and src2 will be cloberred.
694 //
695 // Expected input:
696 // - src1: higher (exponent) part of the double value.
697 // - src2: lower (mantissa) part of the double value.
698 // Output status:
699 // - dst: 32 higher bits of the mantissa. (mantissa[51:20])
700 // - src2: contains 1.
701 // - other registers are clobbered.
702 static void DoubleIs32BitInteger(MacroAssembler* masm,
703 Register src1,
704 Register src2,
705 Register dst,
706 Register scratch,
707 Label* not_int32);
708
709 // Generates code to call a C function to do a double operation using core 684 // Generates code to call a C function to do a double operation using core
710 // registers. (Used when FPU is not supported.) 685 // registers. (Used when FPU is not supported.)
711 // This code never falls through, but returns with a heap number containing 686 // This code never falls through, but returns with a heap number containing
712 // the result in v0. 687 // the result in v0.
713 // Register heapnumber_result must be a heap number in which the 688 // Register heapnumber_result must be a heap number in which the
714 // result of the operation will be stored. 689 // result of the operation will be stored.
715 // Requires the following layout on entry: 690 // Requires the following layout on entry:
716 // a0: Left value (least significant part of mantissa). 691 // a0: Left value (least significant part of mantissa).
717 // a1: Left value (sign, exponent, top of mantissa). 692 // a1: Left value (sign, exponent, top of mantissa).
718 // a2: Right value (least significant part of mantissa). 693 // a2: Right value (least significant part of mantissa).
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 762
788 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; 763 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
789 764
790 LookupMode mode_; 765 LookupMode mode_;
791 }; 766 };
792 767
793 768
794 } } // namespace v8::internal 769 } } // namespace v8::internal
795 770
796 #endif // V8_MIPS_CODE_STUBS_ARM_H_ 771 #endif // V8_MIPS_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « src/mips/assembler-mips-inl.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698