OLD | NEW |
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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 Address constant_pool_entry, Code* code, Address target); | 811 Address constant_pool_entry, Code* code, Address target); |
812 | 812 |
813 // All addresses in the constant pool are the same size as pointers. | 813 // All addresses in the constant pool are the same size as pointers. |
814 static const int kSpecialTargetSize = kPointerSize; | 814 static const int kSpecialTargetSize = kPointerSize; |
815 | 815 |
816 // The sizes of the call sequences emitted by MacroAssembler::Call. | 816 // The sizes of the call sequences emitted by MacroAssembler::Call. |
817 // Wherever possible, use MacroAssembler::CallSize instead of these constants, | 817 // Wherever possible, use MacroAssembler::CallSize instead of these constants, |
818 // as it will choose the correct value for a given relocation mode. | 818 // as it will choose the correct value for a given relocation mode. |
819 // | 819 // |
820 // Without relocation: | 820 // Without relocation: |
821 // movz ip0, #(target & 0x000000000000ffff) | 821 // movz temp, #(target & 0x000000000000ffff) |
822 // movk ip0, #(target & 0x00000000ffff0000) | 822 // movk temp, #(target & 0x00000000ffff0000) |
823 // movk ip0, #(target & 0x0000ffff00000000) | 823 // movk temp, #(target & 0x0000ffff00000000) |
824 // movk ip0, #(target & 0xffff000000000000) | 824 // blr temp |
825 // blr ip0 | |
826 // | 825 // |
827 // With relocation: | 826 // With relocation: |
828 // ldr ip0, =target | 827 // ldr temp, =target |
829 // blr ip0 | 828 // blr temp |
830 static const int kCallSizeWithoutRelocation = 5 * kInstructionSize; | 829 static const int kMaxCallSizeWithoutRelocation = 4 * kInstructionSize; |
831 static const int kCallSizeWithRelocation = 2 * kInstructionSize; | 830 static const int kCallSizeWithRelocation = 2 * kInstructionSize; |
832 | 831 |
833 // Size of the generated code in bytes | 832 // Size of the generated code in bytes |
834 uint64_t SizeOfGeneratedCode() const { | 833 uint64_t SizeOfGeneratedCode() const { |
835 ASSERT((pc_ >= buffer_) && (pc_ < (buffer_ + buffer_size_))); | 834 ASSERT((pc_ >= buffer_) && (pc_ < (buffer_ + buffer_size_))); |
836 return pc_ - buffer_; | 835 return pc_ - buffer_; |
837 } | 836 } |
838 | 837 |
839 // Return the code size generated from label to the current position. | 838 // Return the code size generated from label to the current position. |
840 uint64_t SizeOfCodeGeneratedSince(const Label* label) { | 839 uint64_t SizeOfCodeGeneratedSince(const Label* label) { |
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 class EnsureSpace BASE_EMBEDDED { | 2213 class EnsureSpace BASE_EMBEDDED { |
2215 public: | 2214 public: |
2216 explicit EnsureSpace(Assembler* assembler) { | 2215 explicit EnsureSpace(Assembler* assembler) { |
2217 assembler->CheckBuffer(); | 2216 assembler->CheckBuffer(); |
2218 } | 2217 } |
2219 }; | 2218 }; |
2220 | 2219 |
2221 } } // namespace v8::internal | 2220 } } // namespace v8::internal |
2222 | 2221 |
2223 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2222 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
OLD | NEW |