/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | TargetLibraryInfo.def | 47 TLI_DEFINE_SIG_INTERNAL(Ptr, Int) 52 TLI_DEFINE_SIG_INTERNAL(Ptr, Int, Ptr) 57 TLI_DEFINE_SIG_INTERNAL(Ptr, LLong) 62 TLI_DEFINE_SIG_INTERNAL(Ptr, LLong, Ptr) 67 TLI_DEFINE_SIG_INTERNAL(Void, Ptr) 72 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Ptr) 77 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Int) 82 TLI_DEFINE_SIG_INTERNAL(Void, Ptr) 87 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Ptr) 92 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, LLong) [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
H A D | memtag.h | 37 inline uptr untagPointer(uptr Ptr) { return Ptr & ((1ULL << 56) - 1); } in untagPointer() argument 39 inline uint8_t extractTag(uptr Ptr) { return (Ptr >> 56) & 0xf; } in extractTag() argument 49 inline NORETURN uptr untagPointer(uptr Ptr) { 50 (void)Ptr; 54 inline NORETURN uint8_t extractTag(uptr Ptr) { 55 (void)Ptr; 148 inline uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) { in selectRandomTag() argument 157 : [Ptr] "r"(Ptr), [ExcludeMask] "r"(ExcludeMask)); in selectRandomTag() 161 inline uptr addFixedTag(uptr Ptr, uptr Tag) { in addFixedTag() argument 163 DCHECK_EQ(untagPointer(Ptr), Ptr); in addFixedTag() [all …]
|
H A D | chunk.h | 91 inline AtomicPackedHeader *getAtomicHeader(void *Ptr) { in getAtomicHeader() argument 92 return reinterpret_cast<AtomicPackedHeader *>(reinterpret_cast<uptr>(Ptr) - in getAtomicHeader() 96 inline const AtomicPackedHeader *getConstAtomicHeader(const void *Ptr) { in getConstAtomicHeader() argument 98 reinterpret_cast<uptr>(Ptr) - getHeaderSize()); in getConstAtomicHeader() 104 static inline u16 computeHeaderChecksum(u32 Cookie, const void *Ptr, in computeHeaderChecksum() argument 110 return computeChecksum(Cookie, reinterpret_cast<uptr>(Ptr), HeaderHolder, in computeHeaderChecksum() 114 inline void storeHeader(u32 Cookie, void *Ptr, in storeHeader() argument 117 computeHeaderChecksum(Cookie, Ptr, NewUnpackedHeader); in storeHeader() 119 atomic_store_relaxed(getAtomicHeader(Ptr), NewPackedHeader); in storeHeader() 122 inline void loadHeader(u32 Cookie, const void *Ptr, in loadHeader() argument 131 compareExchangeHeader(u32 Cookie,void * Ptr,UnpackedHeader * NewUnpackedHeader,UnpackedHeader * OldUnpackedHeader) compareExchangeHeader() argument 144 isValid(u32 Cookie,const void * Ptr,UnpackedHeader * NewUnpackedHeader) isValid() argument [all...] |
H A D | combined.h | 71 void recycle(void *Ptr) { in recycle() 73 Chunk::loadHeader(Allocator.Cookie, Ptr, &Header); in recycle() 75 reportInvalidChunkState(AllocatorAction::Recycling, Ptr); in recycle() 78 Chunk::storeHeader(Allocator.Cookie, Ptr, &Header); in recycle() 81 Ptr = untagPointer(Ptr); in recycle() 82 void *BlockBegin = Allocator::getBlockBegin(Ptr, &Header); in recycle() 92 void *Ptr = Cache.allocate(QuarantineClassId); in allocate() local 94 if (UNLIKELY(!Ptr)) in allocate() 97 Ptr = reinterpret_cast<void *>(reinterpret_cast<uptr>(Ptr) + in allocate() 103 Chunk::storeHeader(Allocator.Cookie, Ptr, &Header); in allocate() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | Twine.cpp | 59 void Twine::printOneChild(raw_ostream &OS, Child Ptr, in printOneChild() 65 Ptr.twine->print(OS); in printOneChild() 68 OS << Ptr.cString; in printOneChild() 71 OS << *Ptr.stdString; in printOneChild() 75 OS << StringRef(Ptr.ptrAndLength.ptr, Ptr.ptrAndLength.length); in printOneChild() 78 OS << *Ptr.formatvObject; in printOneChild() 81 OS << Ptr.character; in printOneChild() 84 OS << Ptr.decUI; in printOneChild() 87 OS << Ptr in printOneChild() 57 printOneChild(raw_ostream & OS,Child Ptr,NodeKind Kind) const printOneChild() argument 104 printOneChildRepr(raw_ostream & OS,Child Ptr,NodeKind Kind) const printOneChildRepr() argument [all...] |
H A D | FormattedStream.cpp | 26 void formatted_raw_ostream::UpdatePosition(const char *Ptr, size_t Size) { in UpdatePosition() argument 61 PartialUTF8Char.append(StringRef(Ptr, Size)); in UpdatePosition() 67 PartialUTF8Char.append(StringRef(Ptr, BytesFromBuffer)); in UpdatePosition() 70 Ptr += BytesFromBuffer; in UpdatePosition() 77 for (const char *End = Ptr + Size; Ptr < End; Ptr += NumBytes) { in UpdatePosition() 78 NumBytes = getNumBytesForUTF8(*Ptr); in UpdatePosition() 85 if ((unsigned)(End - Ptr) < NumBytes) { in UpdatePosition() 86 PartialUTF8Char = StringRef(Ptr, En in UpdatePosition() 96 ComputePosition(const char * Ptr,size_t Size) ComputePosition() argument 124 write_impl(const char * Ptr,size_t Size) write_impl() argument [all...] |
/freebsd/contrib/llvm-project/compiler-rt/lib/memprof/ |
H A D | memprof_rawprofile.cpp | 63 char *Ptr = Buffer; in SerializeSegmentsToBuffer() local 65 Ptr += sizeof(u64); in SerializeSegmentsToBuffer() 76 memcpy(Ptr, &Entry, sizeof(SegmentEntry)); in SerializeSegmentsToBuffer() 77 Ptr += sizeof(SegmentEntry); in SerializeSegmentsToBuffer() 84 CHECK(ExpectedNumBytes >= static_cast<u64>(Ptr - Buffer) && in SerializeSegmentsToBuffer() 119 char *Ptr = Buffer; in SerializeStackToBuffer() local 120 Ptr = WriteBytes(static_cast<u64>(NumIds), Ptr); in SerializeStackToBuffer() 124 Ptr = WriteBytes(Id, Ptr); in SerializeStackToBuffer() 125 Ptr += sizeof(u64); // Bump it by u64, we will fill this in later. in SerializeStackToBuffer() 132 Ptr = WriteBytes(static_cast<u64>(pc), Ptr); in SerializeStackToBuffer() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/ |
H A D | Interp.cpp | 125 static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckActive() argument 127 if (Ptr.isActive()) in CheckActive() 131 const FieldDecl *InactiveField = Ptr.getField(); in CheckActive() 134 Pointer U = Ptr.getBase(); in CheckActive() 157 static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckTemporary() argument 159 if (auto ID = Ptr.getDeclID()) { in CheckTemporary() 160 if (!Ptr.isStaticTemporary()) in CheckTemporary() 163 if (Ptr.getDeclDesc()->getType().isConstQualified()) in CheckTemporary() 171 S.Note(Ptr.getDeclLoc(), diag::note_constexpr_temporary_here); in CheckTemporary() 177 static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckGlobal() argument [all …]
|
H A D | Pointer.cpp | 162 Pointer Ptr = *this; in toAPValue() local 163 while (Ptr.isField() || Ptr.isArrayElement()) { in toAPValue() 164 if (Ptr.isArrayRoot()) { in toAPValue() 166 {Ptr.getFieldDesc()->asDecl(), /*IsVirtual=*/false})); in toAPValue() 168 if (const auto *FD = dyn_cast<FieldDecl>(Ptr.getFieldDesc()->asDecl())) in toAPValue() 171 Ptr = Ptr.getBase(); in toAPValue() 172 } else if (Ptr.isArrayElement()) { in toAPValue() 174 if (Ptr.isOnePastEnd()) in toAPValue() 175 Index = Ptr.getArray().getNumElems(); in toAPValue() 177 Index = Ptr.getIndex(); in toAPValue() [all …]
|
H A D | Interp.h | 49 bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 52 bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 55 bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 59 bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 63 bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 67 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 71 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 75 bool CheckSubobject(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 80 bool CheckDowncast(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 84 bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr); [all …]
|
H A D | Descriptor.cpp | 23 static void ctorTy(Block *, std::byte *Ptr, bool, bool, bool, in ctorTy() argument 25 new (Ptr) T(); in ctorTy() 29 static void dtorTy(Block *, std::byte *Ptr, const Descriptor *) { in dtorTy() argument 30 reinterpret_cast<T *>(Ptr)->~T(); in dtorTy() 42 static void ctorArrayTy(Block *, std::byte *Ptr, bool, bool, bool, in ctorArrayTy() argument 44 new (Ptr) InitMapPtr(std::nullopt); in ctorArrayTy() 46 Ptr += sizeof(InitMapPtr); in ctorArrayTy() 48 new (&reinterpret_cast<T *>(Ptr)[I]) T(); in ctorArrayTy() 53 static void dtorArrayTy(Block *, std::byte *Ptr, const Descriptor *D) { in dtorArrayTy() argument 54 InitMapPtr &IMP = *reinterpret_cast<InitMapPtr *>(Ptr); in dtorArrayTy() [all …]
|
H A D | EvaluationResult.cpp | 149 const Pointer &Ptr) const { in checkFullyInitialized() 153 if (Ptr.isZero()) in checkFullyInitialized() 158 if (!Ptr.isLive()) in checkFullyInitialized() 167 if (const Record *R = Ptr.getRecord()) in checkFullyInitialized() 168 return CheckFieldsInitialized(S, InitLoc, Ptr, R); in checkFullyInitialized() 171 Ptr.getType()->getAsArrayTypeUnsafe())) in checkFullyInitialized() 172 return CheckArrayInitialized(S, InitLoc, Ptr, CAT); in checkFullyInitialized() 177 static void collectBlocks(const Pointer &Ptr, in collectBlocks() argument 184 if (!isUsefulPtr(Ptr)) in collectBlocks() 187 Blocks.insert(Ptr.block()); in collectBlocks() [all …]
|
H A D | EvalEmitter.cpp | 156 const Pointer &Ptr = S.Stk.pop<Pointer>(); in emitRet() local 158 if (!EvalResult.checkReturnValue(S, Ctx, Ptr, Info)) in emitRet() 160 if (CheckFullyInitialized && !EvalResult.checkFullyInitialized(S, Ptr)) in emitRet() 168 if (!Ptr.isZero() && !Ptr.isDereferencable()) in emitRet() 172 if (!Ptr.isZero() && Ptr.isBlockPointer() && in emitRet() 173 Ptr.block()->getEvalID() != Ctx.getEvalID() && in emitRet() 174 (!CheckLoad(S, OpPC, Ptr, AK_Read) || !Ptr.isConst())) in emitRet() 178 Ptr.toRValue(Ctx, EvalResult.getSourceType())) { in emitRet() 184 EvalResult.setValue(Ptr.toAPValue(Ctx.getASTContext())); in emitRet() 208 const auto &Ptr = S.Stk.pop<Pointer>(); in emitRetValue() local [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/platform_specific/ |
H A D | guarded_pool_allocator_posix.cpp | 47 void *Ptr = mmap(nullptr, Size, PROT_READ | PROT_WRITE, in map() local 49 check(Ptr != MAP_FAILED, "Failed to map guarded pool allocator memory"); in map() 50 MaybeSetMappingName(Ptr, Size, Name); in map() 51 return Ptr; in map() 54 void GuardedPoolAllocator::unmap(void *Ptr, size_t Size) const { in unmap() argument 55 assert((reinterpret_cast<uintptr_t>(Ptr) % State.PageSize) == 0); in unmap() 57 check(munmap(Ptr, Size) == 0, in unmap() 63 void *Ptr = in reserveGuardedPool() local 65 check(Ptr != MAP_FAILED, "Failed to reserve guarded pool allocator memory"); in reserveGuardedPool() 66 MaybeSetMappingName(Ptr, Size, kGwpAsanGuardPageName); in reserveGuardedPool() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/Lex/ |
H A D | ExternalPreprocessorSource.h | 53 mutable uint64_t Ptr = 0; variable 58 explicit LazyIdentifierInfoPtr(const IdentifierInfo *Ptr) in LazyIdentifierInfoPtr() argument 59 : Ptr(reinterpret_cast<uint64_t>(Ptr)) {} in LazyIdentifierInfoPtr() 61 explicit LazyIdentifierInfoPtr(uint64_t ID) : Ptr((ID << 1) | 0x01) { in LazyIdentifierInfoPtr() 64 Ptr = 0; in LazyIdentifierInfoPtr() 67 LazyIdentifierInfoPtr &operator=(const IdentifierInfo *Ptr) { 68 this->Ptr = reinterpret_cast<uint64_t>(Ptr); 75 Ptr = 0; 77 Ptr = (ID << 1) | 0x01; 85 bool isValid() const { return Ptr != 0; } in isValid() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/XCOFF/ |
H A D | XCOFFWriter.cpp | 56 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()); in writeHeaders() local 57 memcpy(Ptr, &Obj.FileHeader, sizeof(XCOFFFileHeader32)); in writeHeaders() 58 Ptr += sizeof(XCOFFFileHeader32); in writeHeaders() 62 memcpy(Ptr, &Obj.OptionalFileHeader, Obj.FileHeader.AuxHeaderSize); in writeHeaders() 63 Ptr += Obj.FileHeader.AuxHeaderSize; in writeHeaders() 68 memcpy(Ptr, &Sec.SectionHeader, sizeof(XCOFFSectionHeader32)); in writeHeaders() 69 Ptr += sizeof(XCOFFSectionHeader32); in writeHeaders() 76 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + in writeSections() local 78 Ptr = std::copy(Sec.Contents.begin(), Sec.Contents.end(), Ptr); in writeSections() 83 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + in writeSections() local [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/COFF/ |
H A D | COFFWriter.cpp | 255 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()); in writeHeaders() local 257 memcpy(Ptr, &Obj.DosHeader, sizeof(Obj.DosHeader)); in writeHeaders() 258 Ptr += sizeof(Obj.DosHeader); in writeHeaders() 259 memcpy(Ptr, Obj.DosStub.data(), Obj.DosStub.size()); in writeHeaders() 260 Ptr += Obj.DosStub.size(); in writeHeaders() 261 memcpy(Ptr, PEMagic, sizeof(PEMagic)); in writeHeaders() 262 Ptr += sizeof(PEMagic); in writeHeaders() 265 memcpy(Ptr, &Obj.CoffFileHeader, sizeof(Obj.CoffFileHeader)); in writeHeaders() 266 Ptr += sizeof(Obj.CoffFileHeader); in writeHeaders() 288 memcpy(Ptr, &BigObjHeader, sizeof(BigObjHeader)); in writeHeaders() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/ |
H A D | common.cpp | 81 bool AllocatorState::isGuardPage(uintptr_t Ptr) const { in isGuardPage() 82 assert(pointerIsMine(reinterpret_cast<void *>(Ptr))); in isGuardPage() 83 size_t PageOffsetFromPoolStart = (Ptr - GuardedPagePool) / PageSize; in isGuardPage() 88 static size_t addrToSlot(const AllocatorState *State, uintptr_t Ptr) { in addrToSlot() argument 89 size_t ByteOffsetFromPoolStart = Ptr - State->GuardedPagePool; in addrToSlot() 94 size_t AllocatorState::getNearestSlot(uintptr_t Ptr) const { in getNearestSlot() 95 if (Ptr <= GuardedPagePool + PageSize) in getNearestSlot() 97 if (Ptr > GuardedPagePoolEnd - PageSize) in getNearestSlot() 100 if (!isGuardPage(Ptr)) in getNearestSlot() 101 return addrToSlot(this, Ptr); in getNearestSlot() [all …]
|
H A D | guarded_pool_allocator.cpp | 34 uintptr_t getPageAddr(uintptr_t Ptr, uintptr_t PageSize) { in getPageAddr() argument 35 return Ptr & ~(PageSize - 1); in getPageAddr() 184 uintptr_t GuardedPoolAllocator::alignUp(uintptr_t Ptr, size_t Alignment) { in alignUp() argument 187 if ((Ptr & (Alignment - 1)) == 0) in alignUp() 188 return Ptr; in alignUp() 190 Ptr += Alignment - (Ptr & (Alignment - 1)); in alignUp() 191 return Ptr; in alignUp() 194 uintptr_t GuardedPoolAllocator::alignDown(uintptr_t Ptr, size_t Alignment) { in alignDown() argument 197 if ((Ptr & (Alignment - 1)) == 0) in alignDown() 198 return Ptr; in alignDown() [all …]
|
H A D | guarded_pool_allocator.h | 97 GWP_ASAN_ALWAYS_INLINE bool pointerIsMine(const void *Ptr) const { 98 return State.pointerIsMine(Ptr); 111 void deallocate(void *Ptr); in getAllocatorState() 113 // Returns the size of the allocation at Ptr. 114 size_t getSize(const void *Ptr); 125 void preCrashReport(void *Ptr); 126 void postCrashReportRecoverableOnly(void *Ptr); 137 static uintptr_t alignUp(uintptr_t Ptr, size_t Alignment); 138 static uintptr_t alignDown(uintptr_t Ptr, size_t Alignment); 161 void unmap(void *Ptr, size_ 88 pointerIsMine(const void * Ptr) pointerIsMine() argument [all...] |
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
H A D | SmallPtrSet.h | 127 std::pair<const void *const *, bool> insert_imp(const void *Ptr) { in insert_imp() argument 133 if (Value == Ptr) in insert_imp() 139 SmallArray[NumNonEmpty++] = Ptr; in insert_imp() 145 return insert_imp_big(Ptr); in insert_imp() 152 bool erase_imp(const void * Ptr) { in erase_imp() argument 156 if (*APtr == Ptr) { in erase_imp() 165 auto *Bucket = FindBucketFor(Ptr); in erase_imp() 166 if (*Bucket != Ptr) in erase_imp() 180 const void *const * find_imp(const void * Ptr) const { in find_imp() argument 185 if (*APtr == Ptr) in find_imp() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | SMLoc.h | 24 const char *Ptr = nullptr; variable 29 constexpr bool isValid() const { return Ptr != nullptr; } in isValid() 31 constexpr bool operator==(const SMLoc &RHS) const { return RHS.Ptr == Ptr; } 32 constexpr bool operator!=(const SMLoc &RHS) const { return RHS.Ptr != Ptr; } 34 constexpr const char *getPointer() const { return Ptr; } in getPointer() 36 static SMLoc getFromPointer(const char *Ptr) { in getFromPointer() argument 38 L.Ptr = Ptr; in getFromPointer()
|
H A D | ManagedStatic.h | 29 static void call(void *Ptr) { delete (T *)Ptr; } in call() 32 static void call(void *Ptr) { delete[](T *)Ptr; } 52 mutable std::atomic<void *> Ptr{}; 58 mutable std::atomic<void *> Ptr; 71 bool isConstructed() const { return Ptr != nullptr; } 87 void *Tmp = Ptr.load(std::memory_order_acquire); 91 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed)); 97 void *Tmp = Ptr.load(std::memory_order_acquire); 101 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed)); 109 return static_cast<C *>(Ptr.exchange(nullptr));
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPUPromoteKernelArguments.cpp | 41 void enqueueUsers(Value *Ptr); 43 bool promotePointer(Value *Ptr); 65 void AMDGPUPromoteKernelArguments::enqueueUsers(Value *Ptr) { in enqueueUsers() argument 66 SmallVector<User *> PtrUsers(Ptr->users()); in enqueueUsers() 78 if (LD->getPointerOperand()->stripInBoundsOffsets() == Ptr && in enqueueUsers() 87 if (U->getOperand(0)->stripInBoundsOffsets() == Ptr) in enqueueUsers() 94 bool AMDGPUPromoteKernelArguments::promotePointer(Value *Ptr) { in promotePointer() argument 97 LoadInst *LI = dyn_cast<LoadInst>(Ptr); in promotePointer() 101 PointerType *PT = dyn_cast<PointerType>(Ptr->getType()); in promotePointer() 108 enqueueUsers(Ptr); in promotePointer() [all …]
|
/freebsd/sys/contrib/dev/acpica/os_specific/service_layers/ |
H A D | osgendbg.c | 191 char *Ptr = BatchBuffer; in AcpiDbRunRemoteDebugger() local 192 char *Cmd = Ptr; in AcpiDbRunRemoteDebugger() 199 if (*Ptr) in AcpiDbRunRemoteDebugger() 201 while (*Ptr) in AcpiDbRunRemoteDebugger() 203 if (*Ptr == ',') in AcpiDbRunRemoteDebugger() 206 *Ptr = ' '; in AcpiDbRunRemoteDebugger() 208 else if (*Ptr == ';') in AcpiDbRunRemoteDebugger() 210 *Ptr = '\0'; in AcpiDbRunRemoteDebugger() 214 Ptr++; in AcpiDbRunRemoteDebugger() 218 Ptr++; in AcpiDbRunRemoteDebugger() [all …]
|