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

Side by Side Diff: src/a64/macro-assembler-a64.h

Issue 194473005: A64: Rename k<Y>RegSize to k<Y>RegSizeInBits, and k<Y>RegSizeInBytes to k<Y>RegSize. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/a64/lithium-codegen-a64.cc ('k') | src/a64/macro-assembler-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 const CPURegister& src2 = NoReg, const CPURegister& src3 = NoReg); 524 const CPURegister& src2 = NoReg, const CPURegister& src3 = NoReg);
525 void Pop(const CPURegister& dst0, const CPURegister& dst1 = NoReg, 525 void Pop(const CPURegister& dst0, const CPURegister& dst1 = NoReg,
526 const CPURegister& dst2 = NoReg, const CPURegister& dst3 = NoReg); 526 const CPURegister& dst2 = NoReg, const CPURegister& dst3 = NoReg);
527 527
528 // Alternative forms of Push and Pop, taking a RegList or CPURegList that 528 // Alternative forms of Push and Pop, taking a RegList or CPURegList that
529 // specifies the registers that are to be pushed or popped. Higher-numbered 529 // specifies the registers that are to be pushed or popped. Higher-numbered
530 // registers are associated with higher memory addresses (as in the A32 push 530 // registers are associated with higher memory addresses (as in the A32 push
531 // and pop instructions). 531 // and pop instructions).
532 // 532 //
533 // (Push|Pop)SizeRegList allow you to specify the register size as a 533 // (Push|Pop)SizeRegList allow you to specify the register size as a
534 // parameter. Only kXRegSize, kWRegSize, kDRegSize and kSRegSize are 534 // parameter. Only kXRegSizeInBits, kWRegSizeInBits, kDRegSizeInBits and
535 // supported. 535 // kSRegSizeInBits are supported.
536 // 536 //
537 // Otherwise, (Push|Pop)(CPU|X|W|D|S)RegList is preferred. 537 // Otherwise, (Push|Pop)(CPU|X|W|D|S)RegList is preferred.
538 void PushCPURegList(CPURegList registers); 538 void PushCPURegList(CPURegList registers);
539 void PopCPURegList(CPURegList registers); 539 void PopCPURegList(CPURegList registers);
540 540
541 inline void PushSizeRegList(RegList registers, unsigned reg_size, 541 inline void PushSizeRegList(RegList registers, unsigned reg_size,
542 CPURegister::RegisterType type = CPURegister::kRegister) { 542 CPURegister::RegisterType type = CPURegister::kRegister) {
543 PushCPURegList(CPURegList(type, reg_size, registers)); 543 PushCPURegList(CPURegList(type, reg_size, registers));
544 } 544 }
545 inline void PopSizeRegList(RegList registers, unsigned reg_size, 545 inline void PopSizeRegList(RegList registers, unsigned reg_size,
546 CPURegister::RegisterType type = CPURegister::kRegister) { 546 CPURegister::RegisterType type = CPURegister::kRegister) {
547 PopCPURegList(CPURegList(type, reg_size, registers)); 547 PopCPURegList(CPURegList(type, reg_size, registers));
548 } 548 }
549 inline void PushXRegList(RegList regs) { 549 inline void PushXRegList(RegList regs) {
550 PushSizeRegList(regs, kXRegSize); 550 PushSizeRegList(regs, kXRegSizeInBits);
551 } 551 }
552 inline void PopXRegList(RegList regs) { 552 inline void PopXRegList(RegList regs) {
553 PopSizeRegList(regs, kXRegSize); 553 PopSizeRegList(regs, kXRegSizeInBits);
554 } 554 }
555 inline void PushWRegList(RegList regs) { 555 inline void PushWRegList(RegList regs) {
556 PushSizeRegList(regs, kWRegSize); 556 PushSizeRegList(regs, kWRegSizeInBits);
557 } 557 }
558 inline void PopWRegList(RegList regs) { 558 inline void PopWRegList(RegList regs) {
559 PopSizeRegList(regs, kWRegSize); 559 PopSizeRegList(regs, kWRegSizeInBits);
560 } 560 }
561 inline void PushDRegList(RegList regs) { 561 inline void PushDRegList(RegList regs) {
562 PushSizeRegList(regs, kDRegSize, CPURegister::kFPRegister); 562 PushSizeRegList(regs, kDRegSizeInBits, CPURegister::kFPRegister);
563 } 563 }
564 inline void PopDRegList(RegList regs) { 564 inline void PopDRegList(RegList regs) {
565 PopSizeRegList(regs, kDRegSize, CPURegister::kFPRegister); 565 PopSizeRegList(regs, kDRegSizeInBits, CPURegister::kFPRegister);
566 } 566 }
567 inline void PushSRegList(RegList regs) { 567 inline void PushSRegList(RegList regs) {
568 PushSizeRegList(regs, kSRegSize, CPURegister::kFPRegister); 568 PushSizeRegList(regs, kSRegSizeInBits, CPURegister::kFPRegister);
569 } 569 }
570 inline void PopSRegList(RegList regs) { 570 inline void PopSRegList(RegList regs) {
571 PopSizeRegList(regs, kSRegSize, CPURegister::kFPRegister); 571 PopSizeRegList(regs, kSRegSizeInBits, CPURegister::kFPRegister);
572 } 572 }
573 573
574 // Push the specified register 'count' times. 574 // Push the specified register 'count' times.
575 void PushMultipleTimes(CPURegister src, Register count); 575 void PushMultipleTimes(CPURegister src, Register count);
576 void PushMultipleTimes(CPURegister src, int count); 576 void PushMultipleTimes(CPURegister src, int count);
577 577
578 // This is a convenience method for pushing a single Handle<Object>. 578 // This is a convenience method for pushing a single Handle<Object>.
579 inline void Push(Handle<Object> handle); 579 inline void Push(Handle<Object> handle);
580 void Push(Smi* smi) { Push(Handle<Smi>(smi, isolate())); } 580 void Push(Smi* smi) { Push(Handle<Smi>(smi, isolate())); }
581 581
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // 647 //
648 // In debug mode, both of these will write invalid data into the claimed or 648 // In debug mode, both of these will write invalid data into the claimed or
649 // dropped space. 649 // dropped space.
650 // 650 //
651 // If the current stack pointer (according to StackPointer()) is csp, then it 651 // If the current stack pointer (according to StackPointer()) is csp, then it
652 // must be aligned to 16 bytes and the size claimed or dropped must be a 652 // must be aligned to 16 bytes and the size claimed or dropped must be a
653 // multiple of 16 bytes. 653 // multiple of 16 bytes.
654 // 654 //
655 // Note that unit_size must be specified in bytes. For variants which take a 655 // Note that unit_size must be specified in bytes. For variants which take a
656 // Register count, the unit size must be a power of two. 656 // Register count, the unit size must be a power of two.
657 inline void Claim(uint64_t count, uint64_t unit_size = kXRegSizeInBytes); 657 inline void Claim(uint64_t count, uint64_t unit_size = kXRegSize);
658 inline void Claim(const Register& count, 658 inline void Claim(const Register& count,
659 uint64_t unit_size = kXRegSizeInBytes); 659 uint64_t unit_size = kXRegSize);
660 inline void Drop(uint64_t count, uint64_t unit_size = kXRegSizeInBytes); 660 inline void Drop(uint64_t count, uint64_t unit_size = kXRegSize);
661 inline void Drop(const Register& count, 661 inline void Drop(const Register& count,
662 uint64_t unit_size = kXRegSizeInBytes); 662 uint64_t unit_size = kXRegSize);
663 663
664 // Variants of Claim and Drop, where the 'count' parameter is a SMI held in a 664 // Variants of Claim and Drop, where the 'count' parameter is a SMI held in a
665 // register. 665 // register.
666 inline void ClaimBySMI(const Register& count_smi, 666 inline void ClaimBySMI(const Register& count_smi,
667 uint64_t unit_size = kXRegSizeInBytes); 667 uint64_t unit_size = kXRegSize);
668 inline void DropBySMI(const Register& count_smi, 668 inline void DropBySMI(const Register& count_smi,
669 uint64_t unit_size = kXRegSizeInBytes); 669 uint64_t unit_size = kXRegSize);
670 670
671 // Compare a register with an operand, and branch to label depending on the 671 // Compare a register with an operand, and branch to label depending on the
672 // condition. May corrupt the status flags. 672 // condition. May corrupt the status flags.
673 inline void CompareAndBranch(const Register& lhs, 673 inline void CompareAndBranch(const Register& lhs,
674 const Operand& rhs, 674 const Operand& rhs,
675 Condition cond, 675 Condition cond,
676 Label* label); 676 Label* label);
677 677
678 // Test the bits of register defined by bit_pattern, and branch if ANY of 678 // Test the bits of register defined by bit_pattern, and branch if ANY of
679 // those bits are set. May corrupt the status flags. 679 // those bits are set. May corrupt the status flags.
(...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 #error "Unsupported option" 2274 #error "Unsupported option"
2275 #define CODE_COVERAGE_STRINGIFY(x) #x 2275 #define CODE_COVERAGE_STRINGIFY(x) #x
2276 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2276 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2277 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2277 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2278 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2278 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2279 #else 2279 #else
2280 #define ACCESS_MASM(masm) masm-> 2280 #define ACCESS_MASM(masm) masm->
2281 #endif 2281 #endif
2282 2282
2283 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ 2283 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_
OLDNEW
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/a64/macro-assembler-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698