Searched defs:alignment (Results 1 - 16 of 16) sorted by relevance

/art/libdexfile/dex/
H A Dcompact_dex_utils.h29 size_t alignment) {
30 while (!IsAlignedParam(dest->size(), alignment)) {
28 AlignmentPadVector(std::vector<T, Allocator<T>>* dest, size_t alignment) argument
H A Ddex_file_verifier.cc335 size_t alignment,
347 if (alignment != 0 && !IsAlignedParam(offset, alignment)) {
348 ErrorStringPrintf("Offset(%d) should be aligned by %zu for %s.", offset, alignment, label);
1618 // Get the right alignment mask for the type of section.
2673 // Get the right alignment mask for the type of section.
333 CheckValidOffsetAndSize(uint32_t offset, uint32_t size, size_t alignment, const char* label) argument
/art/libartbase/base/
H A Dlength_prefixed_array.h36 T& At(size_t index, size_t element_size = sizeof(T), size_t alignment = alignof(T)) {
38 return AtUnchecked(index, element_size, alignment);
41 const T& At(size_t index, size_t element_size = sizeof(T), size_t alignment = alignof(T)) const {
43 return AtUnchecked(index, element_size, alignment);
46 StrideIterator<T> begin(size_t element_size = sizeof(T), size_t alignment = alignof(T)) {
47 return StrideIterator<T>(&AtUnchecked(0, element_size, alignment), element_size);
51 size_t alignment = alignof(T)) const {
52 return StrideIterator<const T>(&AtUnchecked(0, element_size, alignment), element_size);
55 StrideIterator<T> end(size_t element_size = sizeof(T), size_t alignment = alignof(T)) {
56 return StrideIterator<T>(&AtUnchecked(size_, element_size, alignment), element_siz
96 AtUnchecked(size_t index, size_t element_size, size_t alignment) argument
[all...]
/art/tools/dexfuzz/src/dexfuzz/rawdex/
H A DDexRandomAccessFile.java28 * and also provides word-alignment functions.
296 * @param alignment N to align to.
298 public void alignForwards(int alignment) throws IOException { argument
300 long mask = alignment - 1;
302 int extra = alignment - (int) (offset & mask);
309 * @param alignment N to align to.
311 public void alignBackwards(int alignment) throws IOException { argument
313 long mask = alignment - 1;
/art/compiler/debug/dwarf/
H A Dwriter.h160 void Pad(int alignment) { argument
161 DCHECK_NE(alignment, 0);
162 data_->resize(RoundUp(data_->size(), alignment), 0);
/art/compiler/
H A Dexception_test.cc94 const size_t alignment = GetInstructionSetAlignment(kRuntimeISA); local
95 fake_header_code_and_maps_.reserve(fake_header_code_and_maps_.size() + alignment);
99 size_t padding = RoundUp(offset, alignment) - offset;
/art/dexlayout/
H A Ddex_writer.h130 ALWAYS_INLINE void AlignTo(const size_t alignment) { argument
131 position_ = RoundUp(position_, alignment);
H A Dcompact_dex_writer.cc110 size_t alignment,
114 alignment_(alignment),
125 // If we deduped, only use the deduped offset if the alignment matches the required alignment.
178 // Payload instructions possibly require special alignment for their data.
399 // We want offset 0 to be reserved for null, seek to the data section alignment or the end of the
108 ScopedDataSectionItem(Stream* stream, dex_ir::Item* item, size_t alignment, Deduper* deduper) argument
/art/compiler/linker/arm/
H A Drelative_patcher_arm_base.cc72 bool MakeSpaceBefore(const ThunkData& next_thunk, size_t alignment) { argument
75 DCHECK_ALIGNED_PARAM(MaxNextOffset(), alignment); local
76 DCHECK_ALIGNED_PARAM(next_thunk.MaxNextOffset(), alignment);
78 max_next_offset_ = RoundDown(next_thunk.MaxNextOffset() - CodeSize(), alignment);
205 // Write alignment bytes and code.
445 size_t alignment = GetInstructionSetAlignment(instruction_set_); local
448 data->MakeSpaceBefore(*unreserved_thunks_[index + 1u], alignment);
452 while (index != 0u && unreserved_thunks_[index - 1u]->MakeSpaceBefore(*data, alignment)) {
/art/compiler/optimizing/
H A Dnodes_vector.h26 // Memory alignment, represented as an offset relative to a base, where 0 <= offset < base,
258 // Abstraction of a vector operation that references memory, with an alignment.
259 // The Android runtime guarantees elements have at least natural alignment.
280 void SetAlignment(Alignment alignment) { alignment_ = alignment; } argument
H A Dloop_optimization.cc43 // Base alignment for arrays/strings guaranteed by the Android runtime.
744 // Prepare alignment analysis:
745 // (1) find desired alignment (SIMD vector size in bytes).
748 // (3) variable to record how many references share same alignment.
762 // The scan over references also prepares finding a suitable alignment strategy.
779 // Count the number of references that have the same alignment (since
801 // Update information for finding suitable alignment strategy:
804 Alignment alignment = ComputeAlignment(i->offset, i->type, i->is_string_char_at); local
805 if (alignment.Base() >= desired_alignment) {
806 // If the array/string object has a known, sufficient alignment, us
[all...]
/art/compiler/linker/
H A Delf_builder.h206 // It also ensures the alignment is sufficient to generate valid program headers,
207 // since that depends on the previous section. It returns the required alignment.
850 off_t AlignFileOffset(size_t alignment) { argument
851 return stream_.Seek(RoundUp(stream_.Seek(0, kSeekCurrent), alignment), kSeekSet);
/art/runtime/jit/
H A Djit_code_cache.cc447 size_t alignment = GetInstructionSetAlignment(kRuntimeISA); local
448 return reinterpret_cast<uintptr_t>(code) - RoundUp(sizeof(OatQuickMethodHeader), alignment);
743 size_t alignment = GetInstructionSetAlignment(kRuntimeISA); local
744 // Ensure the header ends up at expected instruction alignment.
745 size_t header_size = RoundUp(sizeof(OatQuickMethodHeader), alignment);
1826 size_t alignment = GetInstructionSetAlignment(kRuntimeISA); local
1828 mspace_memalign(code_mspace_, alignment, code_size));
1829 size_t header_size = RoundUp(sizeof(OatQuickMethodHeader), alignment);
1830 // Ensure the header ends up at expected instruction alignment.
1831 DCHECK_ALIGNED_PARAM(reinterpret_cast<uintptr_t>(result + header_size), alignment);
[all...]
/art/compiler/utils/x86/
H A Dassembler_x86.cc2706 void X86Assembler::Align(int alignment, int offset) { argument
2707 CHECK(IsPowerOfTwo(alignment));
2709 while (((offset + buffer_.GetPosition()) & (alignment-1)) != 0) {
/art/compiler/utils/x86_64/
H A Dassembler_x86_64.cc3343 void X86_64Assembler::Align(int alignment, int offset) { argument
3344 CHECK(IsPowerOfTwo(alignment));
3346 while (((offset + buffer_.GetPosition()) & (alignment-1)) != 0) {
/art/dex2oat/linker/
H A Dimage_writer.cc632 size_t offset_delta = RoundUp(object_size, kObjectAlignment); // 64-bit alignment
1672 image_objects_offset_begin_ = RoundUp(sizeof(ImageHeader), kObjectAlignment); // 64-bit-alignment
1819 // Normal alignment.
1909 // we load the boot image. This is more than sufficient for the string table alignment,
1911 static_assert(IsAligned<sizeof(uint64_t)>(kPageSize), "String table alignment check.");
1918 // Round up to the alignment the class table expects. See HashSet::WriteToMemory.
2083 size_t alignment = ArtMethod::Alignment(target_ptr_size_); local
2084 memcpy(dest, pair.first, LengthPrefixedArray<ArtMethod>::ComputeSize(0, size, alignment));
2086 reinterpret_cast<LengthPrefixedArray<ArtMethod>*>(dest)->ClearPadding(size, alignment);

Completed in 337 milliseconds