Home
last modified time | relevance | path

Searched refs:BufPtr (Results 1 – 25 of 39) sorted by relevance

12

/external/swiftshader/third_party/LLVM/include/llvm/Bitcode/
DReaderWriter.h68 static inline bool isBitcodeWrapper(const unsigned char *BufPtr, in isBitcodeWrapper() argument
72 return BufPtr != BufEnd && in isBitcodeWrapper()
73 BufPtr[0] == 0xDE && in isBitcodeWrapper()
74 BufPtr[1] == 0xC0 && in isBitcodeWrapper()
75 BufPtr[2] == 0x17 && in isBitcodeWrapper()
76 BufPtr[3] == 0x0B; in isBitcodeWrapper()
82 static inline bool isRawBitcode(const unsigned char *BufPtr, in isRawBitcode() argument
86 return BufPtr != BufEnd && in isRawBitcode()
87 BufPtr[0] == 'B' && in isRawBitcode()
88 BufPtr[1] == 'C' && in isRawBitcode()
[all …]
/external/llvm/include/llvm/Bitcode/
DReaderWriter.h116 inline bool isBitcodeWrapper(const unsigned char *BufPtr, in isBitcodeWrapper() argument
120 return BufPtr != BufEnd && in isBitcodeWrapper()
121 BufPtr[0] == 0xDE && in isBitcodeWrapper()
122 BufPtr[1] == 0xC0 && in isBitcodeWrapper()
123 BufPtr[2] == 0x17 && in isBitcodeWrapper()
124 BufPtr[3] == 0x0B; in isBitcodeWrapper()
130 inline bool isRawBitcode(const unsigned char *BufPtr, in isRawBitcode() argument
134 return BufPtr != BufEnd && in isRawBitcode()
135 BufPtr[0] == 'B' && in isRawBitcode()
136 BufPtr[1] == 'C' && in isRawBitcode()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Bitcode/
DBitcodeReader.h191 inline bool isBitcodeWrapper(const unsigned char *BufPtr, in isBitcodeWrapper() argument
195 return BufPtr != BufEnd && in isBitcodeWrapper()
196 BufPtr[0] == 0xDE && in isBitcodeWrapper()
197 BufPtr[1] == 0xC0 && in isBitcodeWrapper()
198 BufPtr[2] == 0x17 && in isBitcodeWrapper()
199 BufPtr[3] == 0x0B; in isBitcodeWrapper()
204 inline bool isRawBitcode(const unsigned char *BufPtr, in isRawBitcode() argument
208 return BufPtr != BufEnd && in isRawBitcode()
209 BufPtr[0] == 'B' && in isRawBitcode()
210 BufPtr[1] == 'C' && in isRawBitcode()
[all …]
/external/swiftshader/third_party/LLVM/include/llvm/ADT/
DStringExtras.h45 char *BufPtr = BufferEnd; in utohex_buffer() local
46 *--BufPtr = 0; // Null terminate buffer. in utohex_buffer()
48 *--BufPtr = '0'; // Handle special case. in utohex_buffer()
49 return BufPtr; in utohex_buffer()
54 *--BufPtr = hexdigit(Mod); in utohex_buffer()
57 return BufPtr; in utohex_buffer()
67 char *BufPtr = Buffer+11; variable
69 if (X == 0) *--BufPtr = '0'; // Handle special case...
72 *--BufPtr = '0' + char(X % 10);
76 if (isNeg) *--BufPtr = '-'; // Add negative sign...
[all …]
/external/swiftshader/third_party/subzero/pnacl-llvm/
DNaClBitcodeHeader.cpp177 bool NaClBitcodeHeader::ReadPrefix(const unsigned char *BufPtr, in ReadPrefix() argument
181 if (!isNaClBitcode(BufPtr, BufEnd)) { in ReadPrefix()
183 if (isBitcode(BufPtr, BufEnd)) { in ReadPrefix()
189 BufPtr += WordSize; in ReadPrefix()
192 if (BufPtr + WordSize > BufEnd) in ReadPrefix()
194 NumFields = static_cast<unsigned>(BufPtr[0]) | in ReadPrefix()
195 (static_cast<unsigned>(BufPtr[1]) << 8); in ReadPrefix()
196 NumBytes = static_cast<unsigned>(BufPtr[2]) | in ReadPrefix()
197 (static_cast<unsigned>(BufPtr[3]) << 8); in ReadPrefix()
198 BufPtr += WordSize; in ReadPrefix()
[all …]
/external/llvm/include/llvm/ADT/
DStringExtras.h49 char *BufPtr = std::end(Buffer);
51 if (X == 0) *--BufPtr = '0';
55 *--BufPtr = hexdigit(Mod, LowerCase);
59 return std::string(BufPtr, std::end(Buffer));
80 char *BufPtr = std::end(Buffer);
82 if (X == 0) *--BufPtr = '0'; // Handle special case...
85 *--BufPtr = '0' + char(X % 10);
89 if (isNeg) *--BufPtr = '-'; // Add negative sign...
90 return std::string(BufPtr, std::end(Buffer));
/external/swiftshader/third_party/subzero/pnacl-llvm/include/llvm/Bitcode/NaCl/
DNaClReaderWriter.h117 inline bool isNaClBitcode(const unsigned char *BufPtr, in isNaClBitcode() argument
119 return BufPtr+4 <= BufEnd && in isNaClBitcode()
120 BufPtr[0] == 'P' && in isNaClBitcode()
121 BufPtr[1] == 'E' && in isNaClBitcode()
122 BufPtr[2] == 'X' && in isNaClBitcode()
123 BufPtr[3] == 'E'; in isNaClBitcode()
DNaClBitcodeHeader.h201 bool Read(const unsigned char *BufPtr, const unsigned char *BufEnd);
245 bool ReadPrefix(const unsigned char *BufPtr, const unsigned char *BufEnd,
250 bool ReadFields(const unsigned char *BufPtr, const unsigned char *BufEnd,
/external/swiftshader/third_party/llvm-subzero/include/llvm/ADT/
DStringExtras.h50 char *BufPtr = std::end(Buffer);
52 if (X == 0) *--BufPtr = '0';
56 *--BufPtr = hexdigit(Mod, LowerCase);
60 return std::string(BufPtr, std::end(Buffer));
81 char *BufPtr = std::end(Buffer);
83 if (X == 0) *--BufPtr = '0'; // Handle special case...
86 *--BufPtr = '0' + char(X % 10);
90 if (isNeg) *--BufPtr = '-'; // Add negative sign...
91 return std::string(BufPtr, std::end(Buffer));
/external/clang/unittests/libclang/
DLibclangTest.cpp61 char *BufPtr; in ~TestVFO() local
63 clang_VirtualFileOverlay_writeToBuffer(VFO, 0, &BufPtr, &BufSize); in ~TestVFO()
64 std::string BufStr(BufPtr, BufSize); in ~TestVFO()
66 clang_free(BufPtr); in ~TestVFO()
343 char *BufPtr; in TEST() local
345 clang_ModuleMapDescriptor_writeToBuffer(MMD, 0, &BufPtr, &BufSize); in TEST()
346 std::string BufStr(BufPtr, BufSize); in TEST()
348 clang_free(BufPtr); in TEST()
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/ADT/
DStringExtras.h127 char *BufPtr = std::end(Buffer);
129 if (X == 0) *--BufPtr = '0';
133 *--BufPtr = hexdigit(Mod, LowerCase);
137 return std::string(BufPtr, std::end(Buffer));
225 char *BufPtr = std::end(Buffer);
227 if (X == 0) *--BufPtr = '0'; // Handle special case...
230 *--BufPtr = '0' + char(X % 10);
234 if (isNeg) *--BufPtr = '-'; // Add negative sign...
235 return std::string(BufPtr, std::end(Buffer));
/external/swiftshader/third_party/LLVM/lib/Support/
DMemoryBuffer.cpp321 char *BufPtr = const_cast<char*>(SB->getBufferStart()); in getOpenFile() local
328 ssize_t NumRead = ::read(FD, BufPtr, BytesLeft); in getOpenFile()
336 Buf->BufferEnd = BufPtr; in getOpenFile()
337 *BufPtr = 0; in getOpenFile()
342 BufPtr += NumRead; in getOpenFile()
/external/llvm/include/llvm/Support/
DYAMLTraits.h891 : io(i_o), BufPtr(nullptr), Result(Obj) {
893 BufPtr = new (&Buffer) TNorm(io, Obj);
896 BufPtr = new (&Buffer) TNorm(io);
902 Result = BufPtr->denormalize(io);
904 BufPtr->~TNorm();
907 TNorm* operator->() { return BufPtr; }
914 TNorm *BufPtr;
924 : io(i_o), BufPtr(nullptr), Result(Obj) {
926 BufPtr = new (&Buffer) TNorm(io, Obj);
929 BufPtr = allocator->Allocate<TNorm>();
[all …]
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DYAMLTraits.h979 : io(i_o), BufPtr(nullptr), Result(Obj) {
981 BufPtr = new (&Buffer) TNorm(io, Obj);
984 BufPtr = new (&Buffer) TNorm(io);
990 Result = BufPtr->denormalize(io);
992 BufPtr->~TNorm();
995 TNorm* operator->() { return BufPtr; }
1002 TNorm *BufPtr;
1012 : io(i_o), BufPtr(nullptr), Result(Obj) {
1014 BufPtr = new (&Buffer) TNorm(io, Obj);
1017 BufPtr = allocator->Allocate<TNorm>();
[all …]
/external/clang/lib/Lex/
DMacroArgs.cpp236 const char *BufPtr = Result.data() + CurStrLen; in StringifyArgument() local
238 unsigned ActualTokLen = PP.getSpelling(Tok, BufPtr, &Invalid); in StringifyArgument()
243 if (ActualTokLen && BufPtr != &Result[CurStrLen]) in StringifyArgument()
244 memcpy(&Result[CurStrLen], BufPtr, ActualTokLen); in StringifyArgument()
DTokenLexer.cpp550 const char *BufPtr = &Buffer[0]; in PasteTokens() local
552 unsigned LHSLen = PP.getSpelling(Tok, BufPtr, &Invalid); in PasteTokens()
553 if (BufPtr != &Buffer[0]) // Really, we want the chars in Buffer! in PasteTokens()
554 memcpy(&Buffer[0], BufPtr, LHSLen); in PasteTokens()
558 BufPtr = Buffer.data() + LHSLen; in PasteTokens()
559 unsigned RHSLen = PP.getSpelling(RHS, BufPtr, &Invalid); in PasteTokens()
562 if (RHSLen && BufPtr != &Buffer[LHSLen]) in PasteTokens()
564 memcpy(&Buffer[LHSLen], BufPtr, RHSLen); in PasteTokens()
DLexer.cpp55 void Lexer::InitLexer(const char *BufStart, const char *BufPtr, in InitLexer() argument
58 BufferPtr = BufPtr; in InitLexer()
132 const char *BufStart, const char *BufPtr, const char *BufEnd) in Lexer() argument
135 InitLexer(BufStart, BufPtr, BufEnd); in Lexer()
231 static size_t getSpellingSlow(const Token &Tok, const char *BufPtr, in getSpellingSlow() argument
236 const char *BufEnd = BufPtr + Tok.getLength(); in getSpellingSlow()
240 while (BufPtr < BufEnd) { in getSpellingSlow()
242 Spelling[Length++] = Lexer::getCharAndSizeNoWarn(BufPtr, Size, LangOpts); in getSpellingSlow()
243 BufPtr += Size; in getSpellingSlow()
258 size_t RawLength = RawEnd - BufPtr + 1; in getSpellingSlow()
[all …]
/external/llvm/tools/llvm-bcanalyzer/
Dllvm-bcanalyzer.cpp710 const unsigned char *BufPtr = (const unsigned char *)MemBuf->getBufferStart(); in openBitcodeFile() local
711 const unsigned char *EndBufPtr = BufPtr + MemBuf->getBufferSize(); in openBitcodeFile()
715 if (isBitcodeWrapper(BufPtr, EndBufPtr)) { in openBitcodeFile()
720 unsigned Magic = support::endian::read32le(&BufPtr[BWH_MagicField]); in openBitcodeFile()
721 unsigned Version = support::endian::read32le(&BufPtr[BWH_VersionField]); in openBitcodeFile()
722 unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]); in openBitcodeFile()
723 unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]); in openBitcodeFile()
724 unsigned CPUType = support::endian::read32le(&BufPtr[BWH_CPUTypeField]); in openBitcodeFile()
734 if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr, true)) in openBitcodeFile()
738 StreamFile = BitstreamReader(BufPtr, EndBufPtr); in openBitcodeFile()
/external/llvm/lib/Support/
DMemoryBuffer.cpp385 char *BufPtr = const_cast<char *>(Buf->getBufferStart()); in getOpenFileImpl() local
395 ssize_t NumRead = ::pread(FD, BufPtr, BytesLeft, MapSize-BytesLeft+Offset); in getOpenFileImpl()
397 ssize_t NumRead = ::read(FD, BufPtr, BytesLeft); in getOpenFileImpl()
406 memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer. in getOpenFileImpl()
410 BufPtr += NumRead; in getOpenFileImpl()
/external/swiftshader/third_party/LLVM/tools/llvm-bcanalyzer/
Dllvm-bcanalyzer.cpp488 unsigned char *BufPtr = (unsigned char *)MemBuf->getBufferStart(); in AnalyzeBitcode() local
489 unsigned char *EndBufPtr = BufPtr+MemBuf->getBufferSize(); in AnalyzeBitcode()
493 if (isBitcodeWrapper(BufPtr, EndBufPtr)) in AnalyzeBitcode()
494 if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr)) in AnalyzeBitcode()
497 BitstreamReader StreamFile(BufPtr, EndBufPtr); in AnalyzeBitcode()
532 uint64_t BufferSizeBits = (EndBufPtr-BufPtr)*CHAR_BIT; in AnalyzeBitcode()
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/
DLowerInvoke.cpp541 Value *BufPtr; in insertExpensiveEHSupport() local
544 BufPtr = new LoadInst(OldJmpBufPtr, "oldjmpbufptr", UnwindHandler); in insertExpensiveEHSupport()
545 new StoreInst(BufPtr, JBListHead, UnwindHandler); in insertExpensiveEHSupport()
547 BufPtr = new LoadInst(JBListHead, "ehlist", UnwindHandler); in insertExpensiveEHSupport()
551 Value *NotNull = new ICmpInst(*UnwindHandler, ICmpInst::ICMP_NE, BufPtr, in insertExpensiveEHSupport()
552 Constant::getNullValue(BufPtr->getType()), in insertExpensiveEHSupport()
560 Idx[0] = GetElementPtrInst::Create(BufPtr, Idx, "JmpBuf", UnwindBlock); in insertExpensiveEHSupport()
/external/swiftshader/third_party/llvm-7.0/llvm/tools/llvm-bcanalyzer/
Dllvm-bcanalyzer.cpp794 const unsigned char *BufPtr = (const unsigned char *)MemBuf->getBufferStart(); in openBitcodeFile() local
795 const unsigned char *EndBufPtr = BufPtr + MemBuf->getBufferSize(); in openBitcodeFile()
799 if (isBitcodeWrapper(BufPtr, EndBufPtr)) { in openBitcodeFile()
804 unsigned Magic = support::endian::read32le(&BufPtr[BWH_MagicField]); in openBitcodeFile()
805 unsigned Version = support::endian::read32le(&BufPtr[BWH_VersionField]); in openBitcodeFile()
806 unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]); in openBitcodeFile()
807 unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]); in openBitcodeFile()
808 unsigned CPUType = support::endian::read32le(&BufPtr[BWH_CPUTypeField]); in openBitcodeFile()
818 if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr, true)) in openBitcodeFile()
822 Stream = BitstreamCursor(ArrayRef<uint8_t>(BufPtr, EndBufPtr)); in openBitcodeFile()
/external/swiftshader/third_party/llvm-subzero/lib/Support/
DMemoryBuffer.cpp385 char *BufPtr = const_cast<char *>(Buf->getBufferStart()); in getOpenFileImpl() local
395 ssize_t NumRead = ::pread(FD, BufPtr, BytesLeft, MapSize-BytesLeft+Offset); in getOpenFileImpl()
397 ssize_t NumRead = ::read(FD, BufPtr, BytesLeft); in getOpenFileImpl()
406 memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer. in getOpenFileImpl()
410 BufPtr += NumRead; in getOpenFileImpl()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/
DMemoryBuffer.cpp463 char *BufPtr = Buf.get()->getBufferStart(); in getOpenFileImpl() local
473 ssize_t NumRead = sys::RetryAfterSignal(-1, ::pread, FD, BufPtr, BytesLeft, in getOpenFileImpl()
476 ssize_t NumRead = sys::RetryAfterSignal(-1, ::read, FD, BufPtr, BytesLeft); in getOpenFileImpl()
483 memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer. in getOpenFileImpl()
487 BufPtr += NumRead; in getOpenFileImpl()
/external/capstone/arch/AArch64/
DAArch64BaseInfo.c84 char *BufPtr = Buffer+21; in utostr() local
88 if (X == 0) *--BufPtr = '0'; // Handle special case... in utostr()
91 *--BufPtr = X % 10 + '0'; in utostr()
95 if (isNeg) *--BufPtr = '-'; // Add negative sign... in utostr()
97 result = cs_strdup(BufPtr); in utostr()

12