Home | History | Annotate | Download | only in AArch64

Lines Matching defs:Chunk

85 /// \brief Helper function which extracts the specified 16-bit chunk from a
88 assert(ChunkIdx < 4 && "Out of range chunk index specified!");
93 /// \brief Helper function which replicates a 16-bit chunk within a 64-bit
96 assert((FromIdx < 4) && (ToIdx < 4) && "Out of range chunk index specified!");
99 // Replicate the source chunk to the destination position.
100 const uint64_t Chunk = getChunk(Imm, FromIdx) << ShiftAmt;
101 // Clear the destination chunk.
103 // Insert the replicated chunk.
104 return Imm | Chunk;
113 assert(ChunkIdx < 4 && "Out of range chunk index specified!");
144 /// \brief Check whether the given 16-bit chunk replicated to full 64-bit width
146 static bool canUseOrr(uint64_t Chunk, uint64_t &Encoding) {
147 Chunk = (Chunk << 48) | (Chunk << 32) | (Chunk << 16) | Chunk;
149 return AArch64_AM::processLogicalImmediate(Chunk, 64, Encoding);
167 // Scan the constant and count how often every chunk occurs.
172 for (CountMap::const_iterator Chunk = Counts.begin(), End = Counts.end();
173 Chunk != End; ++Chunk) {
174 const uint64_t ChunkVal = Chunk->first;
175 const unsigned Count = Chunk->second;
197 // Find the first chunk not materialized with the ORR instruction.
222 // Find the remaining chunk which needs to be materialized.
246 /// \brief Check whether this chunk matches the pattern '1...0...'. This pattern
249 static bool isStartChunk(uint64_t Chunk) {
250 if (Chunk == 0 || Chunk == UINT64_MAX)
253 return isMask_64(~Chunk);
256 /// \brief Check whether this chunk matches the pattern '0...1...' This pattern
259 static bool isEndChunk(uint64_t Chunk) {
260 if (Chunk == 0 || Chunk == UINT64_MAX)
263 return isMask_64(Chunk);
266 /// \brief Clear or set all bits in the chunk at the given index.
271 // Clear chunk in the immediate.
274 // Set all bits in the immediate for the particular chunk.
286 /// Assuming S is a chunk which starts the sequence (1...0...), E is a chunk
288 /// contain at least one S and E chunk.
305 int64_t Chunk = getChunk(UImm, Idx);
306 // Sign extend the 16-bit chunk to 64-bit.
307 Chunk = (Chunk << 48) >> 48;
309 if (isStartChunk(Chunk))
311 else if (isEndChunk(Chunk))
315 // Early exit in case we can't find a start/end chunk.
321 // Chunks between the start and end chunk need to have all their bits set.
339 const uint64_t Chunk = getChunk(UImm, Idx);
341 // Check whether we are looking at a chunk which is not part of the
343 if ((Idx < StartIdx || EndIdx < Idx) && Chunk != Outside) {
352 // Check whether we are looking a chunk which is part of the contiguous
354 } else if (Idx > StartIdx && Idx < EndIdx && Chunk != Inside) {
447 const unsigned Chunk = (Imm >> Shift) & Mask;
448 if (Chunk == Mask)
450 else if (Chunk == 0)
475 // a single MOVZ/MOVN instruction (in case one chunk is all zero or all one).