diff options
Diffstat (limited to 'libartbase/arch/instruction_set.h')
-rw-r--r-- | libartbase/arch/instruction_set.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libartbase/arch/instruction_set.h b/libartbase/arch/instruction_set.h index 155b186a8e..1516df9417 100644 --- a/libartbase/arch/instruction_set.h +++ b/libartbase/arch/instruction_set.h @@ -55,20 +55,18 @@ static constexpr PointerSize kArm64PointerSize = PointerSize::k64; static constexpr PointerSize kX86PointerSize = PointerSize::k32; static constexpr PointerSize kX86_64PointerSize = PointerSize::k64; -// ARM instruction alignment. ARM processors require code to be 4-byte aligned, -// but ARM ELF requires 8.. -static constexpr size_t kArmAlignment = 8; - -// ARM64 instruction alignment. This is the recommended alignment for maximum performance. -static constexpr size_t kArm64Alignment = 16; - // ARM64 default SVE vector length. static constexpr size_t kArm64DefaultSVEVectorLength = 256; -// X86 instruction alignment. This is the recommended alignment for maximum performance. -static constexpr size_t kX86Alignment = 16; +// Code alignment (used for the first instruction of a subroutine, such as an entrypoint). +// This is the recommended alignment for maximum performance. +// ARM processors require code to be 4-byte aligned, but ARM ELF requires 8. +static constexpr size_t kArmCodeAlignment = 8; +static constexpr size_t kArm64CodeAlignment = 16; +static constexpr size_t kX86CodeAlignment = 16; -// Different than code alignment since code alignment is only first instruction of method. +// Instruction alignment (every instruction must be aligned at this boundary). This differs from +// code alignment, which applies only to the first instruction of a subroutine. static constexpr size_t kThumb2InstructionAlignment = 2; static constexpr size_t kArm64InstructionAlignment = 4; static constexpr size_t kX86InstructionAlignment = 1; |