search for: uintptr_t

Displaying 20 results from an estimated 506 matches for "uintptr_t".

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...
2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_features, + VDPASIM_QUEUE_MAX, false, + (struct vring_desc *)(uintptr_t)vq->desc_addr, + (s...
2020 Apr 10
2
[PATCH -next] vdpasim: remove unused variable 'ret'
...to_sim(struct device *dev) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) { struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; - int ret; - ret = vringh_init_iotlb(&vq->vring, vdpasim_features, - VDPASIM_QUEUE_MAX, false, - (struct vring_desc *)(uintptr_t)vq->desc_addr, - (struct vring_avail *) - (uintptr_t)vq->driver_addr, - (struct vring_used *) - (uintptr_t)vq->device_addr); + vringh_init_iotlb(&vq->vring, vdpasim_features, + VDPASIM_QUEUE_MAX, false, + (struct vring_desc *)(uintptr_t)vq->desc_addr, + (s...
2006 Aug 08
9
Handling userland char ** pointers
I''ve been trying to get access to a userland string that''s behind a second level pointer using DTrace, but I can''t seem to get it to work. I started with the example on the Team DTrace Tips and Tricks slides: trace(copyinstr(*(uintptr_t *)copyin(arg0, curpsinfo->pr_dmodel == PR_MODEL_ILP32 ? 4 : 8))); And when I couldn''t get it to work, I started breaking it down into smaller pieces to see what was going on at each step. Here''s the "C" and "D" code: --- pt.c --- static int sz = sizeo...
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 --------------
2016 Dec 29
0
Definition of uintptr_t in Rinterface.h
The problem is elsewhere - Rinterface.h guards the ultima-ratio fallback with HAVE_UINTPTR_T but that config flag is not exported in Rconfig.h. Should be now fixed in R-devel - please check if that works for you. Thanks, Simon > On Dec 26, 2016, at 11:25 PM, Laurent Gautier <lgautier at gmail.com> wrote: > > Hi, > > I was recently pointed out that a definition in...
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...> + // Ensure the constant pool/jump table info is at least 4-byte >> aligned. >> + emitAlignment(16); >> + >> + initConstantPool(F.getConstantPool()); >> + initJumpTableInfo(F.getJumpTableInfo()); >> + >> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >> CurBufferPtr); >> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + >> CurBufferPtr); >> + } >> + >> + virtual bool finishFunction(MachineFunction &F) { >> + MCE->setCurrentPtr(CurBufferPtr); >> +...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...t; + Fn = &F; > + > + // Ensure the constant pool/jump table info is at least 4-byte > aligned. > + emitAlignment(16); > + > + initConstantPool(F.getConstantPool()); > + initJumpTableInfo(F.getJumpTableInfo()); > + > + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + > CurBufferPtr); > + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + > CurBufferPtr); > + } > + > + virtual bool finishFunction(MachineFunction &F) { > + MCE->setCurrentPtr(CurBufferPtr); > + return false; > + } > +...
2012 Jan 07
0
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
Hi Ruben, > I see I missed some curly braces. I also modified spacing a tiny bit. Doesn't seem so. E.g. you have: + if ( !VirtualQuery(addr, &b, sizeof(b)) ) + exit(1); + if( !VirtualProtect(b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, &b.Protect) ) Add space after "if". Do not put spaces after "(" and before ")". Same for other
2012 Jan 07
2
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...+} +#else #include <sys/mman.h> +extern void __clear_cache(void* start, void* end); +#endif -extern void __clear_cache(void* start, void* end); typedef int (*pfunc)(void); @@ -38,21 +47,29 @@ // make executable the page containing execution_buffer char* start = (char*)((uintptr_t)execution_buffer & (-4095)); char* end = (char*)((uintptr_t)(&execution_buffer[128+4096]) & (-4095)); - if ( mprotect(start, end-start, PROT_READ|PROT_WRITE|PROT_EXEC) != 0 ) +#if defined(_WIN32) + DWORD dummy_oldProt; + MEMORY_BASIC_INFORMATION b; + if (!VirtualQuery(s...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...nstant pool/jump table info is at least 4-byte >>> aligned. >>> + emitAlignment(16); >>> + >>> + initConstantPool(F.getConstantPool()); >>> + initJumpTableInfo(F.getJumpTableInfo()); >>> + >>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >>> CurBufferPtr); >>> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + >>> CurBufferPtr); >>> + } >>> + >>> + virtual bool finishFunction(MachineFunction &F) { >>> + MCE->setCurrentPtr(Cur...
2014 Mar 07
1
Using uintptr_t to simplify pointer handling in libFLAC
Hi list, I suppose we could use uintptr_t to simplify pointer handling in libFLAC/memory.c. The patch is attached. Passed build on gnu environment. Thanks. Regards yfw -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20140307/8c9605d2/attachment.htm -----...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...is at least 4-byte >>>> aligned. >>>> + emitAlignment(16); >>>> + >>>> + initConstantPool(F.getConstantPool()); >>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>> + >>>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >>>> CurBufferPtr); >>>> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + >>>> CurBufferPtr); >>>> + } >>>> + >>>> + virtual bool finishFunction(MachineFunction &F) { >>>> +...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...;>>>>> + emitAlignment(16); >>>>>> + >>>>>> + initConstantPool(F.getConstantPool()); >>>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>>> + >>>>>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >>>>>> CurBufferPtr); >>>>>> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + >>>>>> CurBufferPtr); >>>>>> + } >>>>>> + >>>>>> + virtual bool finishFuncti...
2017 Jan 01
3
Definition of uintptr_t in Rinterface.h
On 29/12/2016 15:55, Simon Urbanek wrote: > The problem is elsewhere - Rinterface.h guards the ultima-ratio fallback with HAVE_UINTPTR_T but that config flag is not exported in Rconfig.h. Should be now fixed in R-devel - please check if that works for you. Rconfig.h would be appropriate if Rinterface.h is being included from C code using the same compiler as used for R. But as Rinterface.h is intended for use by alternative fron...
2023 Mar 21
1
[PATCH v3 4/8] vringh: support VA with iotlb
...@ static int setup_cvq_vring(struct mlx5_vdpa_dev *mvdev) if (mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ)) err = vringh_init_iotlb(&cvq->vring, mvdev->actual_features, - MLX5_CVQ_MAX_ENT, false, + MLX5_CVQ_MAX_ENT, false, false, (struct vring_desc *)(uintptr_t)cvq->desc_addr, (struct vring_avail *)(uintptr_t)cvq->driver_addr, (struct vring_used *)(uintptr_t)cvq->device_addr); diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index eea23c630f7c..47cdf2a1f5b8 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...; + emitAlignment(16); >>>>>>> + >>>>>>> + initConstantPool(F.getConstantPool()); >>>>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>>>> + >>>>>>> + ConstantPoolBase = (void*)(((uintptr_t) >>>>>>> ConstantPoolBase) + >>>>>>> CurBufferPtr); >>>>>>> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + >>>>>>> CurBufferPtr); >>>>>>> + } >>>>>>> + &g...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt;>> aligned. >>>>> + emitAlignment(16); >>>>> + >>>>> + initConstantPool(F.getConstantPool()); >>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>> + >>>>> + ConstantPoolBase = (void*)(((uintptr_t) ConstantPoolBase) + >>>>> CurBufferPtr); >>>>> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + >>>>> CurBufferPtr); >>>>> + } >>>>> + >>>>> + virtual bool finishFunction(MachineFunction &...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...(16); >>>>>>>> + >>>>>>>> + initConstantPool(F.getConstantPool()); >>>>>>>> + initJumpTableInfo(F.getJumpTableInfo()); >>>>>>>> + >>>>>>>> + ConstantPoolBase = (void*)(((uintptr_t) >>>>>>>> ConstantPoolBase) + >>>>>>>> CurBufferPtr); >>>>>>>> + JumpTableBase = (void*)(((uintptr_t) JumpTableBase) + >>>>>>>> CurBufferPtr); >>>>>>>> + } >>>&...
2015 Jul 06
1
[PATCH RESEND] virtio: Fix typecast of pointer in vring_init()
...gt; > The virtio_ring.h header is used in userspace programs (ie. QEMU), > > > > too. Here we can not assume that sizeof(pointer) is the same as > > > > sizeof(long), e.g. when compiling for Windows, so the typecast in > > > > vring_init() should be done with (uintptr_t) instead of (unsigned long). > > > > > > > > Signed-off-by: Thomas Huth <thuth at redhat.com> > > > > > > This seems to break some userspace too: > > > > > > INSTALL usr/include/linux/ (413 files) > > > CHECK usr/in...