search for: intptr_t

Displaying 20 results from an estimated 338 matches for "intptr_t".

Did you mean: uintptr_t
2015 May 07
2
[LLVMdev] Integer ID for LLVM::Instruction*?
David, As you suggested, I try to compile the following test code: *include "llvm/IR/Instruction.h"#include "stdint.h"extern void callback(intptr_t);void foo(){ llvm::Instruction* i; intptr_t zzzz=static_cast<intptr_t>(i); callback(zzzz);}* but got this compilation error: * 'intptr_t' (aka 'long') is not allowed intptr_t zzzz=static_cast<intptr_t>(i); ^~~~~~~~~~~~~~~~~~~~~~~~1 warning a...
2008 Oct 16
2
[LLVMdev] bug in the JIT global variable emitter
> + /// allocateSpace - reserves space in the current block if any, or > + /// allocate a new one of the given size + virtual void > *allocateSpace(intptr_t Size, unsigned Alignment); + > Please capitalize "reserves". ok. > + /// allocateSpace - general-purpose space allocator > Better comments please. :-) Also please end the sentence with a period > or Chris' head will explode. :-) ok, sure, I guess we don't want that...
2019 Jan 15
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...ule is the way that the FreeBSD kernel implements > per-CPU storage, but in a fairly ad-hoc analysis of existing C/C++ code > we found quite a few cases where subtraction occurred between objects. Hello David, If C programmer wants to get distance between two different objects, s/he can use (intptr_t)p - (intptr_t)q instead of p - q. I believe this situation is similar to one adopting optimizations/analyses that exploit signed overflow / TBAA / etc. Juneyoung Lee On Tue, Jan 15, 2019 at 11:59 AM David Chisnall via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On 14/01/2019 20:55,...
2013 Jan 31
0
[LLVMdev] intptr_t support in llvm
Hi all, I tried compiling an opencl kernel with intptr_t datatype. However it gives error by default using LLVM/Clang 3.2 for nvptx . To allow usage, I tried following typedefs ( by looking at tests in llvm sources ). typedef int intptr_t; and typedef __typeof( (int*) 0) intptr_t; Both definitions compiles the code, however gives following warning. war...
2004 Aug 04
1
[LLVMdev] Reader.cpp:464: error: `intptr_t' undeclared (first use this function)
Hi, I get this error: ------------------ Reader.cpp:464: error: `intptr_t' undeclared (first use this function) ------------------ It doesn't seem that you include <stddef.h>, where the intptr_t is declared, in the source file. When I included the header, it compiled without errors. The same error seems to be present for ReaderWrappers.cpp. /Henrik _...
2015 May 06
5
[LLVMdev] Integer ID for LLVM::Instruction*?
Hi, I wonder whether we can easily retrieve an LLVM instruction ID that uniquely identifies the instruction. In my case, I need to avoid using llvm::Instruction* directly. Given an 'inst' of type llvm::instruction*, is there some readily usable method as simple as "int id = inst->id( )"? Thanks. Zhoulai -------------- next part -------------- An HTML attachment was
2011 Jan 31
2
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
I have written a new pass, it compiles ok but crashes when i run it with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.). The pass is : using namespace llvm; namespace { struct Dfl : public FunctionPass { static char ID; Dfl() : FunctionPass(ID) { } virtual bool runOnFunction(Function &F) { bool modified=false; errs(...
2011 Jan 31
0
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
llvm/include/llvm/Pass.h:93: llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed. On Mon, Jan 31, 2011 at 3:55 PM, Surinder <surifilms at gmail.com> wrote: > I have written a new pass, it compiles ok but crashes when i run it > with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid...
2008 Oct 16
0
[LLVMdev] bug in the JIT global variable emitter
On Oct 16, 2008, at 11:29 AM, Nuno Lopes wrote: >> + /// allocateSpace - reserves space in the current block if any, or >> + /// allocate a new one of the given size + virtual void >> *allocateSpace(intptr_t Size, unsigned Alignment); + >> Please capitalize "reserves". > > ok. > > >> + /// allocateSpace - general-purpose space allocator >> Better comments please. :-) Also please end the sentence with a >> period >> or Chris' head will explode. :...
2010 Oct 01
2
trouble building 4.0.1
...CC i386-stubdom/xen_machine_pv.o CC i386-stubdom/xen_backend.o /usr/src/xen-4.0.1/stubdom/ioemu/hw/xen_backend.c: In function ‘xenstore_update’: /usr/src/xen-4.0.1/stubdom/ioemu/hw/xen_backend.c:592:16: warning: format ‘%llx’ expects type ‘long long unsigned int *’, but argument 3 has type ‘intptr_t *’ /usr/src/xen-4.0.1/stubdom/ioemu/hw/xen_backend.c:592:16: warning: format ‘%llx’ expects type ‘long long unsigned int *’, but argument 5 has type ‘intptr_t *’ /usr/src/xen-4.0.1/stubdom/ioemu/hw/xen_backend.c:592:16: warning: format ‘%llx’ expects type ‘long long unsigned int *’, but argument 3...
2008 Oct 16
0
[LLVMdev] bug in the JIT global variable emitter
Thanks Nuno and Dale. Some comments: + /// allocateSpace - reserves space in the current block if any, or + /// allocate a new one of the given size + virtual void *allocateSpace(intptr_t Size, unsigned Alignment); + Please capitalize "reserves". + /// allocateSpace - general-purpose space allocator Better comments please. :-) Also please end the sentence with a period or Chris' head will explode. :-) unsigned char *result = (unsigned char *)CurBlock+1; + + if (A...
2017 Mar 29
1
[PATCH] mllib: cast integer pointers to intptr_t as intermediate step
...b/visit-c.c b/mllib/visit-c.c index b46dd33..b1c1216 100644 --- a/mllib/visit-c.c +++ b/mllib/visit-c.c @@ -54,7 +54,7 @@ value guestfs_int_mllib_visit (value gv, value dirv, value fv) { CAMLparam3 (gv, dirv, fv); - guestfs_h *g = (guestfs_h *) Int64_val (gv); + guestfs_h *g = (guestfs_h *) (intptr_t) Int64_val (gv); struct visitor_function_wrapper_args args; /* The dir string could move around when we call the * visitor_function, so we have to take a full copy of it. -- 2.9.3
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...f course). > + void EmitAlignment(unsigned Alignment) { > +// printf(".align %x\n", 1 << Alignment); > + if (Alignment == 0) Alignment = 1; > + // Move the current buffer ptr up to the specified alignment. > + CurBufferPtr = > + (unsigned char*)(((intptr_t)CurBufferPtr+Alignment-1) & > + ~(intptr_t)(Alignment-1)); > + if (CurBufferPtr > BufferEnd) > + CurBufferPtr = BufferEnd; > + } Comment says "emitAlignment". Function definition is EmitAlignment. To be consistent with MachineModuleInfo...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone, Here's a patch that enables exception handling when jitting. I've copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need to factorize it, but the functionality is there and I'm very happy with it :) lli should now be able to execute the output from llvm-gcc when using exceptions (the UnwindInst instruction is not involved in this patch). Just add the
2008 Oct 16
2
[LLVMdev] bug in the JIT global variable emitter
>> Ok, thanks for the explanation. So my first patch doesn't work. >> Also, to be >> clear, this bug has nothing to do with overflowing the JIT memory >> buffer. >> I made another one that takes keeps the allocation of global >> variables in >> the JIT buffer, but it creates a new mem block if it doesn't exist >> (i.e. >> when dumping a
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
...st Function *F) = 0; > + > + /// startExceptionTable - When we finished JITing the function, > if exception > + /// handling is set, we emit the exception table. > + virtual unsigned char* startExceptionTable(const Function* F, > + uintptr_t &ActualSize) > = 0; > + > + /// endExceptionTable - This method is called when the JIT is > done emitting > + /// the exception table. > + virtual void endExceptionTable(const Function *F, unsigned char > *TableStart, > + unsigned...
2009 Oct 08
2
[LLVMdev] question on code in PointerIntPair.h
around line 45 a bitmask is computed as: PointerBitMask = ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1), my question is why is the shift performed on intptr_t? Wouldn't the following be ok? PointerBitMask = ~(((uintptr_t)1 << PtrTraits::NumLowBitsAvailable)-1), Thanks in advance, Maurizio
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all, Here's a new patch with Evan's comments (thx Evan!) and some cleanups. Now the (duplicated) exception handling code is in a new file: lib/ExecutionEngine/JIT/JITDwarfEmitter. This patch should work on linux/x86 and linux/ppc (tested). Nicolas -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jit-exceptions.patch URL:
2016 Dec 27
3
Definition of uintptr_t in Rinterface.h
Hi, I was recently pointed out that a definition in Rinterface.h can be conflicting with a definition in stdint.h: /usr/include/R/Rinterface.h has: typedef unsigned long uintptr_t; /usr/include/stdint.h has: typedef unsigned int uintptr_t; (when 32bit platform complete definition is: #if __WORDSIZE == 64 # ifndef __intptr_t_defined typedef long int intptr_t; # define __intptr_t_defined # endif typedef unsigned long int uintptr_t; #else # ifndef __in...
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------