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

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

Issue 11428137: ARM: Make use of d16-d31 when available. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: The tests does not use fp Created 8 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 465
466 // If we have to call into C then we need to save and restore all caller- 466 // If we have to call into C then we need to save and restore all caller-
467 // saved registers that were not already preserved. The scratch registers 467 // saved registers that were not already preserved. The scratch registers
468 // will be restored by other means so we don't bother pushing them here. 468 // will be restored by other means so we don't bother pushing them here.
469 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { 469 void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) {
470 masm->stm(db_w, sp, (kCallerSaved | lr.bit()) & ~scratch1_.bit()); 470 masm->stm(db_w, sp, (kCallerSaved | lr.bit()) & ~scratch1_.bit());
471 if (mode == kSaveFPRegs) { 471 if (mode == kSaveFPRegs) {
472 CpuFeatures::Scope scope(VFP2); 472 CpuFeatures::Scope scope(VFP2);
473 masm->sub(sp, 473 masm->sub(sp,
474 sp, 474 sp,
475 Operand(kDoubleSize * (DwVfpRegister::kNumRegisters - 1))); 475 Operand(kDoubleSize *
476 (DwVfpRegister::NumAvailableRegisters() - 1)));
476 // Save all VFP registers except d0. 477 // Save all VFP registers except d0.
477 for (int i = DwVfpRegister::kNumRegisters - 1; i > 0; i--) { 478 // TODO(hans): We should probably save d0 too. And maybe use vstm.
479 for (int i = DwVfpRegister::NumAvailableRegisters() - 1; i > 0; i--) {
478 DwVfpRegister reg = DwVfpRegister::from_code(i); 480 DwVfpRegister reg = DwVfpRegister::from_code(i);
479 masm->vstr(reg, MemOperand(sp, (i - 1) * kDoubleSize)); 481 masm->vstr(reg, MemOperand(sp, (i - 1) * kDoubleSize));
480 } 482 }
481 } 483 }
482 } 484 }
483 485
484 inline void RestoreCallerSaveRegisters(MacroAssembler*masm, 486 inline void RestoreCallerSaveRegisters(MacroAssembler*masm,
485 SaveFPRegsMode mode) { 487 SaveFPRegsMode mode) {
486 if (mode == kSaveFPRegs) { 488 if (mode == kSaveFPRegs) {
487 CpuFeatures::Scope scope(VFP2); 489 CpuFeatures::Scope scope(VFP2);
488 // Restore all VFP registers except d0. 490 // Restore all VFP registers except d0.
489 for (int i = DwVfpRegister::kNumRegisters - 1; i > 0; i--) { 491 // TODO(hans): We should probably restore d0 too. And maybe use vldm.
492 for (int i = DwVfpRegister::NumAvailableRegisters() - 1; i > 0; i--) {
490 DwVfpRegister reg = DwVfpRegister::from_code(i); 493 DwVfpRegister reg = DwVfpRegister::from_code(i);
491 masm->vldr(reg, MemOperand(sp, (i - 1) * kDoubleSize)); 494 masm->vldr(reg, MemOperand(sp, (i - 1) * kDoubleSize));
492 } 495 }
493 masm->add(sp, 496 masm->add(sp,
494 sp, 497 sp,
495 Operand(kDoubleSize * (DwVfpRegister::kNumRegisters - 1))); 498 Operand(kDoubleSize *
499 (DwVfpRegister::NumAvailableRegisters() - 1)));
496 } 500 }
497 masm->ldm(ia_w, sp, (kCallerSaved | lr.bit()) & ~scratch1_.bit()); 501 masm->ldm(ia_w, sp, (kCallerSaved | lr.bit()) & ~scratch1_.bit());
498 } 502 }
499 503
500 inline Register object() { return object_; } 504 inline Register object() { return object_; }
501 inline Register address() { return address_; } 505 inline Register address() { return address_; }
502 inline Register scratch0() { return scratch0_; } 506 inline Register scratch0() { return scratch0_; }
503 inline Register scratch1() { return scratch1_; } 507 inline Register scratch1() { return scratch1_; }
504 508
505 private: 509 private:
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 789
786 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; 790 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
787 791
788 LookupMode mode_; 792 LookupMode mode_;
789 }; 793 };
790 794
791 795
792 } } // namespace v8::internal 796 } } // namespace v8::internal
793 797
794 #endif // V8_ARM_CODE_STUBS_ARM_H_ 798 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698