Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:adj

222 ///   struct { ptrdiff_t ptr; ptrdiff_t adj; } memptr;
226 /// - the this-adjustment is (memptr.adj)
230 /// - method pointers are virtual if (memptr.adj & 1) is nonzero
231 /// - the this-adjustment is (memptr.adj >> 1)
233 /// ARM uses 'adj' for the virtual flag because Thumb functions
264 // Extract memptr.adj, which is in the second field.
265 llvm::Value *RawAdj = Builder.CreateExtractValue(MemFnPtr, 1, "memptr.adj");
268 llvm::Value *Adj = RawAdj;
270 Adj = Builder.CreateAShr(Adj, ptrdiff_1, "memptr.adj.shifted");
275 Ptr = Builder.CreateInBoundsGEP(Ptr, Adj);
388 llvm::Constant *adj = getMemberPointerAdjustment(E);
389 if (!adj) return src;
402 dst = Builder.CreateNSWSub(src, adj, "adj");
404 dst = Builder.CreateNSWAdd(src, adj, "adj");
414 uint64_t offset = cast<llvm::ConstantInt>(adj)->getZExtValue();
416 adj = llvm::ConstantInt::get(adj->getType(), offset);
419 llvm::Value *srcAdj = Builder.CreateExtractValue(src, 1, "src.adj");
422 dstAdj = Builder.CreateNSWSub(srcAdj, adj, "adj");
424 dstAdj = Builder.CreateNSWAdd(srcAdj, adj, "adj");
440 llvm::Constant *adj = getMemberPointerAdjustment(E);
441 if (!adj) return src;
455 return llvm::ConstantExpr::getNSWSub(src, adj);
457 return llvm::ConstantExpr::getNSWAdd(src, adj);
462 uint64_t offset = cast<llvm::ConstantInt>(adj)->getZExtValue();
464 adj = llvm::ConstantInt::get(adj->getType(), offset);
470 dstAdj = llvm::ConstantExpr::getNSWSub(srcAdj, adj);
472 dstAdj = llvm::ConstantExpr::getNSWAdd(srcAdj, adj);
524 // This ABI specifies that adj contains twice the this
526 // least significant bit of adj then makes exactly the same
626 // (L == R) <==> (L.ptr == R.ptr && (L.ptr == 0 || L.adj == R.adj))
629 // (L.adj == R.adj ||
630 // (L.ptr == 0 && ((L.adj|R.adj) & 1) == 0)))
647 // This condition tests whether L.adj == R.adj. If this isn't
649 llvm::Value *LAdj = Builder.CreateExtractValue(L, 1, "lhs.memptr.adj");
650 llvm::Value *RAdj = Builder.CreateExtractValue(R, 1, "rhs.memptr.adj");
651 llvm::Value *AdjEq = Builder.CreateICmp(Eq, LAdj, RAdj, "cmp.adj");
653 // Null member function pointers on ARM clear the low bit of Adj,
658 // Compute (l.adj | r.adj) & 1 and test it against zero.
659 llvm::Value *OrAdj = Builder.CreateOr(LAdj, RAdj, "or.adj");
662 "cmp.or.adj");
693 // On ARM, a member function pointer is also non-null if the low bit of 'adj'
697 llvm::Value *Adj = Builder.CreateExtractValue(MemPtr, 1, "memptr.adj");
698 llvm::Value *VirtualBit = Builder.CreateAnd(Adj, One, "memptr.virtualbit");