Home | History | Annotate | Download | only in AArch64

Lines Matching refs:Chunk

75 /// \brief Helper function which extracts the specified 16-bit chunk from a
78 assert(ChunkIdx < 4 && "Out of range chunk index specified!");
83 /// \brief Helper function which replicates a 16-bit chunk within a 64-bit
86 assert((FromIdx < 4) && (ToIdx < 4) && "Out of range chunk index specified!");
89 // Replicate the source chunk to the destination position.
90 const uint64_t Chunk = getChunk(Imm, FromIdx) << ShiftAmt;
91 // Clear the destination chunk.
93 // Insert the replicated chunk.
94 return Imm | Chunk;
103 assert(ChunkIdx < 4 && "Out of range chunk index specified!");
134 /// \brief Check whether the given 16-bit chunk replicated to full 64-bit width
136 static bool canUseOrr(uint64_t Chunk, uint64_t &Encoding) {
137 Chunk = (Chunk << 48) | (Chunk << 32) | (Chunk << 16) | Chunk;
139 return AArch64_AM::processLogicalImmediate(Chunk, 64, Encoding);
157 // Scan the constant and count how often every chunk occurs.
162 for (CountMap::const_iterator Chunk = Counts.begin(), End = Counts.end();
163 Chunk != End; ++Chunk) {
164 const uint64_t ChunkVal = Chunk->first;
165 const unsigned Count = Chunk->second;
187 // Find the first chunk not materialized with the ORR instruction.
212 // Find the remaining chunk which needs to be materialized.
236 /// \brief Check whether this chunk matches the pattern '1...0...'. This pattern
239 static bool isStartChunk(uint64_t Chunk) {
240 if (Chunk == 0 || Chunk == UINT64_MAX)
243 return isMask_64(~Chunk);
246 /// \brief Check whether this chunk matches the pattern '0...1...' This pattern
249 static bool isEndChunk(uint64_t Chunk) {
250 if (Chunk == 0 || Chunk == UINT64_MAX)
253 return isMask_64(Chunk);
256 /// \brief Clear or set all bits in the chunk at the given index.
261 // Clear chunk in the immediate.
264 // Set all bits in the immediate for the particular chunk.
276 /// Assuming S is a chunk which starts the sequence (1...0...), E is a chunk
278 /// contain at least one S and E chunk.
295 int64_t Chunk = getChunk(UImm, Idx);
296 // Sign extend the 16-bit chunk to 64-bit.
297 Chunk = (Chunk << 48) >> 48;
299 if (isStartChunk(Chunk))
301 else if (isEndChunk(Chunk))
305 // Early exit in case we can't find a start/end chunk.
311 // Chunks between the start and end chunk need to have all their bits set.
329 const uint64_t Chunk = getChunk(UImm, Idx);
331 // Check whether we are looking at a chunk which is not part of the
333 if ((Idx < StartIdx || EndIdx < Idx) && Chunk != Outside) {
342 // Check whether we are looking a chunk which is part of the contiguous
344 } else if (Idx > StartIdx && Idx < EndIdx && Chunk != Inside) {
429 const unsigned Chunk = (Imm >> Shift) & Mask;
430 if (Chunk == Mask)
432 else if (Chunk == 0)
457 // a single MOVZ/MOVN instruction (in case one chunk is all zero or all one).