Lines Matching refs:Adj
355 /// struct { ptrdiff_t ptr; ptrdiff_t adj; } memptr;
359 /// - the this-adjustment is (memptr.adj)
363 /// - method pointers are virtual if (memptr.adj & 1) is nonzero
364 /// - the this-adjustment is (memptr.adj >> 1)
366 /// ARM uses 'adj' for the virtual flag because Thumb functions
394 // Extract memptr.adj, which is in the second field.
395 llvm::Value *RawAdj = Builder.CreateExtractValue(MemFnPtr, 1, "memptr.adj");
398 llvm::Value *Adj = RawAdj;
400 Adj = Builder.CreateAShr(Adj, ptrdiff_1, "memptr.adj.shifted");
405 Ptr = Builder.CreateInBoundsGEP(Ptr, Adj);
517 llvm::Constant *adj = getMemberPointerAdjustment(E);
518 if (!adj) return src;
531 dst = Builder.CreateNSWSub(src, adj, "adj");
533 dst = Builder.CreateNSWAdd(src, adj, "adj");
543 uint64_t offset = cast<llvm::ConstantInt>(adj)->getZExtValue();
545 adj = llvm::ConstantInt::get(adj->getType(), offset);
548 llvm::Value *srcAdj = Builder.CreateExtractValue(src, 1, "src.adj");
551 dstAdj = Builder.CreateNSWSub(srcAdj, adj, "adj");
553 dstAdj = Builder.CreateNSWAdd(srcAdj, adj, "adj");
569 llvm::Constant *adj = getMemberPointerAdjustment(E);
570 if (!adj) return src;
584 return llvm::ConstantExpr::getNSWSub(src, adj);
586 return llvm::ConstantExpr::getNSWAdd(src, adj);
591 uint64_t offset = cast<llvm::ConstantInt>(adj)->getZExtValue();
593 adj = llvm::ConstantInt::get(adj->getType(), offset);
599 dstAdj = llvm::ConstantExpr::getNSWSub(srcAdj, adj);
601 dstAdj = llvm::ConstantExpr::getNSWAdd(srcAdj, adj);
650 // This ABI specifies that adj contains twice the this
652 // least significant bit of adj then makes exactly the same
738 // (L == R) <==> (L.ptr == R.ptr && (L.ptr == 0 || L.adj == R.adj))
741 // (L.adj == R.adj ||
742 // (L.ptr == 0 && ((L.adj|R.adj) & 1) == 0)))
759 // This condition tests whether L.adj == R.adj. If this isn't
761 llvm::Value *LAdj = Builder.CreateExtractValue(L, 1, "lhs.memptr.adj");
762 llvm::Value *RAdj = Builder.CreateExtractValue(R, 1, "rhs.memptr.adj");
763 llvm::Value *AdjEq = Builder.CreateICmp(Eq, LAdj, RAdj, "cmp.adj");
765 // Null member function pointers on ARM clear the low bit of Adj,
770 // Compute (l.adj | r.adj) & 1 and test it against zero.
771 llvm::Value *OrAdj = Builder.CreateOr(LAdj, RAdj, "or.adj");
774 "cmp.or.adj");
805 // On ARM, a member function pointer is also non-null if the low bit of 'adj'
809 llvm::Value *Adj = Builder.CreateExtractValue(MemPtr, 1, "memptr.adj");
810 llvm::Value *VirtualBit = Builder.CreateAnd(Adj, One, "memptr.virtualbit");