search for: bufptr

Displaying 17 results from an estimated 17 matches for "bufptr".

2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...change, and still have the problem. I investigate more the source code of llvm. First, I change isRawBitcode function to print the content of the parameter like this: original: http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081 inline bool isRawBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd) { // These bytes sort of have a hidden message, but it's not in // little-endian this time, and it's a little redundant. errs()<< "isRawBitcode output:\n"; for (int i = 0; i < 4; i++) errs() &lt...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...em. > > I investigate more the source code of llvm. > > First, I change isRawBitcode function to print the content of the parameter like this: > original: http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081 > > inline bool isRawBitcode(const unsigned char *BufPtr, > const unsigned char *BufEnd) { > // These bytes sort of have a hidden message, but it's not in > // little-endian this time, and it's a little redundant. > errs()<< "isRawBitcode output:\n"; > for (int...
2014 Mar 13
2
[LLVMdev] load bytecode from string for jiting problem
...two step works. After, while the compiled program is running, I try to read and parse this global variable for jiting the function. 1) I read the global variable with StringRef sr (gv, gv_length); 2) I manually test this bytecode by (inspired by inline bool isRawBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd) at http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00067) if (sr.str()[0] == 'B') std::cout << "B ok\n"; if (sr.str()[1] == 'C') std::cout << "C ok\n"; if (sr.str()[2] == (char) 0xc0) std:...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...estigate more the source code of llvm. >> >> First, I change isRawBitcode function to print the content of the parameter like this: >> original: http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081 >> >> inline bool isRawBitcode(const unsigned char *BufPtr, >> const unsigned char *BufEnd) { >> // These bytes sort of have a hidden message, but it's not in >> // little-endian this time, and it's a little redundant. >> errs()<< "isRawBitcode output:\n"; >>...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...cs/doxygen/__html/ReaderWriter_8h_source._ >>>> _html#l00081 >>>> >>>> <http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source. >>>> html#l00081> >>>> >>>> inline bool isRawBitcode(const unsigned char *BufPtr, >>>> const unsigned char *BufEnd) { >>>> // These bytes sort of have a hidden message, but it's not >>>> in >>>> // little-endian this time, and it's a little redundant. >>>&...
2020 Aug 28
2
End-to-end -fembed-bitcode .llvmbc and .llvmcmd
...garbage, get the size of the actual // bitcode. This only works correctly with some kinds of garbage (in // particular, it will work if the bitcode file is followed by zeros, or if // it's followed by another bitcode file). size_t GetBitcodeSize(MemoryBufferRef Buffer) { const unsigned char *BufPtr = reinterpret_cast<const unsigned char *>(Buffer.getBufferStart()); const unsigned char *EndBufPtr = reinterpret_cast<const unsigned char *>(Buffer.getBufferEnd()); if (isBitcodeWrapper(BufPtr, EndBufPtr)) { const unsigned char *FixedBufPtr = BufPtr; if (SkipBitc...
2020 Aug 28
4
End-to-end -fembed-bitcode .llvmbc and .llvmcmd
...de. This only works correctly with some kinds of garbage (in >> // particular, it will work if the bitcode file is followed by zeros, or >> if >> // it's followed by another bitcode file). >> size_t GetBitcodeSize(MemoryBufferRef Buffer) { >> const unsigned char *BufPtr = >> reinterpret_cast<const unsigned char *>(Buffer.getBufferStart()); >> const unsigned char *EndBufPtr = >> reinterpret_cast<const unsigned char *>(Buffer.getBufferEnd()); >> if (isBitcodeWrapper(BufPtr, EndBufPtr)) { >> const unsigned...
2013 Apr 17
3
[LLVMdev] Patch to compile LLVM with MSVC 2010
...e why I shouldn't try to do it. Sincerely,Sergiy Index: include/llvm/ADT/StringExtras.h===================================================================--- include/llvm/ADT/StringExtras.h (revision 179701)+++ include/llvm/ADT/StringExtras.h (working copy)@@ -84,7 +84,7 @@ return std::string(BufPtr, Buffer+11); } -static inline std::string utostr(uint64_t X, bool isNeg = false) {+static __declspec(noinline) inline std::string utostr(uint64_t X, bool isNeg = false) { char Buffer[21]; char *BufPtr = Buffer+21; Index: lib/Support/Host.cpp======================================================...
2001 May 18
1
cdrw firmware update
Hello, I need to do a firmware update for my cdrw and because of a missing linux program for doing that I thought of using wine for trying it. I call the programm FlashTool.exe and no error messages occur. (The surface really looks great!) The programm detects correctly the flashable cdrw-drive even with ide-scsi and the non-flashable cdrom. But then when I click on "continue" nothing
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
Hi Rafael, Would you mind waiting for Derek to come back from vacation to discuss this? We do use this code and could improve how it's used and tested within LLVM. Derek is the best person to discuss this, he'll be back in mid-January. Thanks, JF On Fri, Dec 19, 2014 at 6:41 AM, Rafael EspĂ­ndola < rafael.espindola at gmail.com> wrote: > > > I CC'ed llvmdev to put a
2013 Apr 18
0
[LLVMdev] Patch to compile LLVM with MSVC 2010
...> Sergiy > > Index: include/llvm/ADT/StringExtras.h > =================================================================== > --- include/llvm/ADT/StringExtras.h (revision 179701) > +++ include/llvm/ADT/StringExtras.h (working copy) > @@ -84,7 +84,7 @@ > return std::string(BufPtr, Buffer+11); > } > > -static inline std::string utostr(uint64_t X, bool isNeg = false) { > +static __declspec(noinline) inline std::string utostr(uint64_t X, bool > isNeg = false) { > char Buffer[21]; > char *BufPtr = Buffer+21; > > Index: lib/Support/Host.cpp >...
2013 Apr 18
2
[LLVMdev] Patch to compile LLVM with MSVC 2010
...dex: include/llvm/ADT/StringExtras.h > > =================================================================== > > --- include/llvm/ADT/StringExtras.h (revision 179701) > > +++ include/llvm/ADT/StringExtras.h (working copy) > > @@ -84,7 +84,7 @@ > > return std::string(BufPtr, Buffer+11); > > } > > > > -static inline std::string utostr(uint64_t X, bool isNeg = false) { > > +static __declspec(noinline) inline std::string utostr(uint64_t X, bool > > isNeg = false) { > > char Buffer[21]; > > char *BufPtr = Buffer+21; > &g...
2005 May 18
2
Networking functionality?
Is there (if not, can we get) the functionality to query for workstations in the local workgroup or domain? Zach
2007 May 29
0
Fw: [RFC] makedumpfile: xen extraction
...edumpfile-1.1.3/makedumpfile.c,v retrieving revision 1.1 retrieving revision 1.14 diff -u -r1.1 -r1.14 --- makedumpfile.c 26 Apr 2007 02:32:30 -0000 1.1 +++ makedumpfile.c 27 May 2007 23:46:07 -0000 1.14 @@ -108,6 +108,36 @@ } int +readpmem(struct DumpInfo *info, unsigned long long paddr, void *bufptr, + size_t size) +{ + off_t offset; + const off_t failed = (off_t)-1; + + /* + * Convert Physical Address to File Offset. + */ + if (!(offset = paddr_to_offset(info, paddr))) { + ERRMSG("Can''t convert a physical address(%llx) to offset.\n", + paddr); + return FALSE; +...
2014 Dec 19
2
[LLVMdev] [Patches][RFC] What to do about bitcode streaming.
...s, the current bit is - // pointing to the END_BLOCK record after them. Now make sure the rest - // of the bits in the module have been read. - if (NextUnreadBit) - ParseModule(true); Hmm, didn't read too closely, but just looks different from what it used to do... + const uint8_t *OrigBufPtr = BufPtr; // If we have a wrapper header, parse it and ignore the non-bc file contents. // The magic number is 0x0B17C0DE stored in little endian. if (isBitcodeWrapper(BufPtr, BufEnd)) if (SkipBitcodeWrapperHeader(BufPtr, BufEnd, true)) return Error(BitcodeError::InvalidBitcode...
2013 Apr 18
0
[LLVMdev] Patch to compile LLVM with MSVC 2010
...Index: include/llvm/ADT/StringExtras.h > > =================================================================== > > --- include/llvm/ADT/StringExtras.h (revision 179701) > > +++ include/llvm/ADT/StringExtras.h (working copy) > > @@ -84,7 +84,7 @@ > > return std::string(BufPtr, Buffer+11); > > } > > > > -static inline std::string utostr(uint64_t X, bool isNeg = false) { > > +static __declspec(noinline) inline std::string utostr(uint64_t X, bool > > isNeg = false) { > > char Buffer[21]; > > char *BufPtr = Buffer+21; > > >...
2007 Jul 05
2
[LLVMdev] PATCH (rest of code changes) "bytecode" --> "bitcode"
Here is the bulk of the sanitizing. My residual doubts center around the question whether we still do/want to support (un)compressed *byte*code in 2.0/2.1. I need a definitive word on this to proceed. My understanding is that bytecode is already gone, but there are still some functions/enums that really deal with *byte*code (instead of *bit*code). I did not touch those areas, so the attached