search for: va_end

Displaying 20 results from an estimated 376 matches for "va_end".

2020 Aug 27
2
[PATCH] nouveau: fix the start/end range for migration
...truct drm_device *dev, void *data, struct nouveau_cli *cli = nouveau_cli(file_priv); struct drm_nouveau_svm_bind *args = data; unsigned target, cmd, priority; - unsigned long addr, end, size; + unsigned long addr, end; struct mm_struct *mm; args->va_start &= PAGE_MASK; - args->va_end &= PAGE_MASK; + args->va_end = ALIGN(args->va_end, PAGE_SIZE); + /* If no end address is given, assume a single page. */ + if (args->va_end == 0) + args->va_end = args->va_start + PAGE_SIZE; /* Sanity check arguments */ if (args->reserved0 || args->reserved1) @@ -118...
2020 Aug 31
1
[PATCH v2] nouveau: fix the start/end range for migration
...truct drm_device *dev, void *data, struct nouveau_cli *cli = nouveau_cli(file_priv); struct drm_nouveau_svm_bind *args = data; unsigned target, cmd, priority; - unsigned long addr, end, size; + unsigned long addr, end; struct mm_struct *mm; args->va_start &= PAGE_MASK; - args->va_end &= PAGE_MASK; + args->va_end = ALIGN(args->va_end, PAGE_SIZE); /* Sanity check arguments */ if (args->reserved0 || args->reserved1) @@ -118,8 +118,6 @@ nouveau_svmm_bind(struct drm_device *dev, void *data, return -EINVAL; if (args->va_start >= args->va_end) re...
2020 Aug 31
2
[PATCH] nouveau: fix the start/end range for migration
...le_priv); >> struct drm_nouveau_svm_bind *args = data; >> unsigned target, cmd, priority; >> - unsigned long addr, end, size; >> + unsigned long addr, end; >> struct mm_struct *mm; >> >> args->va_start &= PAGE_MASK; >> - args->va_end &= PAGE_MASK; >> + args->va_end = ALIGN(args->va_end, PAGE_SIZE); >> + /* If no end address is given, assume a single page. */ >> + if (args->va_end == 0) >> + args->va_end = args->va_start + PAGE_SIZE; > > That is really weird, how is it useful fo...
2006 Oct 05
3
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
Hi, Chris Lattner wrote: > All the non-vastart calls can be anywhere. va_end in particular codegens > to a noop on all targets llvm currently supports, fwiw. > Things go well, except for the following (pathological?) C program: int va_double_sum(int count,...){ int i,sum=0; va_list ap; va_start(ap,count); for(i=0;i<count;i++){ sum+=va_arg(ap,int);...
2011 Aug 15
2
[LLVMdev] llc with -march=mips failed to compile va_start()/va_end()/va_arg()
Hi, I am using llc (llvm 2.9) to generate the MIPS assembly, but failed when compile any codes with va_start()/va_end()/va_arg(). Here is the minimal step to reproduce the failure: llvm-gcc-4.2 -emit-llvm hello.c -c -o hello.bc llc -march=mips hello.bc -o hello.s llc show this erroe message: LLVM ERROR: Cannot select: 0xa1873a0: ch = vaend 0xa187290:1, 0xa185ae0, 0xa187318 [ID=38] 0xa185ae0: i32 = FrameIndex&l...
2014 Aug 26
2
[LLVMdev] [BUG] Varargs example in LangRef segfaults
...x86_64: -- 8< -- define i32 @test(i32 %X, ...) { ; Initialize variable argument processing %ap = alloca i8* %ap2 = bitcast i8** %ap to i8* call void @llvm.va_start(i8* %ap2) ; Read a single integer argument %tmp = va_arg i8** %ap, i32 ; Demonstrate usage of llvm.va_copy and llvm.va_end %aq = alloca i8* %aq2 = bitcast i8** %aq to i8* call void @llvm.va_copy(i8* %aq2, i8* %ap2) call void @llvm.va_end(i8* %aq2) ; Stop processing of arguments. call void @llvm.va_end(i8* %ap2) ret i32 %tmp } define i32 @main() { %call = call i32 (i32, ...)* @test(i32 1, i32 3) ret...
2011 Aug 15
0
[LLVMdev] llc with -march=mips failed to compile va_start()/va_end()/va_arg()
...AM, Leo Chen. <leo.q.chen at gmail.com> wrote: > Hi, > > I am using llc (llvm 2.9) to generate the MIPS assembly I would suggest trying trunk; there have been a lot of improvements recently to the MIPS backend. -Eli > but failed > when compile any codes > with va_start()/va_end()/va_arg(). > > Here is the minimal step to reproduce the failure: > llvm-gcc-4.2 -emit-llvm hello.c -c -o hello.bc > llc -march=mips hello.bc -o hello.s > > llc show this erroe message: > LLVM ERROR: Cannot select: 0xa1873a0: ch = vaend 0xa187290:1, > 0xa185ae0, 0xa187318 [...
2006 Oct 03
2
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
...; void foo(int X, ...) { > P = va_start(); > bar(X, P); > } > > void bar(int X, valist P) { > use(P); > } Can the other va_...-intrinsics be used in bar as were the "P = va_start" in bar? The va_start probably is unnecessary now in bar, but where dus the va_end need to be: at the end of foo or of bar or doesn't it matter? Thanks for the remark, Bram Adams GH-SEL, INTEC, Ghent University (Belgium)
2011 Aug 15
1
[LLVMdev] llc with -march=mips failed to compile va_start()/va_end()/va_arg()
...llvm-gcc build. It's unclear from your usage example how llvm-gcc was configured. You can't reliably use an x86 llvm-gcc to generate bitcode and pass that to llc targeting a difference arch. -Jim > -Eli > >> but failed >> when compile any codes >> with va_start()/va_end()/va_arg(). >> >> Here is the minimal step to reproduce the failure: >> llvm-gcc-4.2 -emit-llvm hello.c -c -o hello.bc >> llc -march=mips hello.bc -o hello.s >> >> llc show this erroe message: >> LLVM ERROR: Cannot select: 0xa1873a0: ch = vaend 0xa187290:...
2006 Oct 03
0
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
..._start(); >> bar(X, P); >> } >> >> void bar(int X, valist P) { >> use(P); >> } > > Can the other va_...-intrinsics be used in bar as were the "P = > va_start" in bar? The va_start probably is unnecessary now in bar, > but where dus the va_end need to be: at the end of foo or of bar or > doesn't it matter? All the non-vastart calls can be anywhere. va_end in particular codegens to a noop on all targets llvm currently supports, fwiw. -Chris -- http://nondot.org/sabre/ http://llvm.org/
2011 Aug 16
0
[LLVMdev] llc with -march=mips failed to compile va_start()/va_end()/va_arg() (RESOLVED)
...vm-gcc was configured. You can't reliably use an x86 llvm-gcc to generate bitcode and pass that to llc targeting a difference arch. >> >> -Jim >> >>> -Eli >>> >>>> but failed >>>> when compile any codes >>>> with va_start()/va_end()/va_arg(). >>>> >>>> Here is the minimal step to reproduce the failure: >>>> llvm-gcc-4.2 -emit-llvm hello.c -c -o hello.bc >>>> llc -march=mips hello.bc -o hello.s >>>> >>>> llc show this erroe message: >>>> LLVM...
2006 Jun 13
1
R-2.3.1 does not install on FreeBSD 4.11-RELEASE (PR#8971)
...4.x) and make the compilation stops at src/main/printutils.c as: printutils.c: In function `Rvprintf': printutils.c:582: `va_start' used in function with fixed args printutils.c:591: syntax error before `}' the following patch includes two fixes: 1) removing unnecessary va_start() and va_end() macro for Rvprintf() in src/main/printutils.c 2) fixing error by adding {} around calling error() in src/main/printutils.c --- src/main/printutils.c.FCS Mon Apr 10 07:19:28 2006 +++ src/main/printutils.c Tue Jun 13 12:07:05 2006 @@ -579,14 +579,15 @@ (con->vfprintf)(con, for...
2020 Nov 03
0
[PATCH AUTOSEL 5.9 33/35] drm/nouveau/nouveau: fix the start/end range for migration
...truct drm_device *dev, void *data, struct nouveau_cli *cli = nouveau_cli(file_priv); struct drm_nouveau_svm_bind *args = data; unsigned target, cmd, priority; - unsigned long addr, end, size; + unsigned long addr, end; struct mm_struct *mm; args->va_start &= PAGE_MASK; - args->va_end &= PAGE_MASK; + args->va_end = ALIGN(args->va_end, PAGE_SIZE); /* Sanity check arguments */ if (args->reserved0 || args->reserved1) @@ -118,8 +118,6 @@ nouveau_svmm_bind(struct drm_device *dev, void *data, return -EINVAL; if (args->va_start >= args->va_end) re...
2020 Nov 03
0
[PATCH AUTOSEL 5.8 27/29] drm/nouveau/nouveau: fix the start/end range for migration
...truct drm_device *dev, void *data, struct nouveau_cli *cli = nouveau_cli(file_priv); struct drm_nouveau_svm_bind *args = data; unsigned target, cmd, priority; - unsigned long addr, end, size; + unsigned long addr, end; struct mm_struct *mm; args->va_start &= PAGE_MASK; - args->va_end &= PAGE_MASK; + args->va_end = ALIGN(args->va_end, PAGE_SIZE); /* Sanity check arguments */ if (args->reserved0 || args->reserved1) @@ -129,8 +129,6 @@ nouveau_svmm_bind(struct drm_device *dev, void *data, return -EINVAL; if (args->va_start >= args->va_end) re...
2020 Nov 03
0
[PATCH AUTOSEL 5.4 22/24] drm/nouveau/nouveau: fix the start/end range for migration
...truct drm_device *dev, void *data, struct nouveau_cli *cli = nouveau_cli(file_priv); struct drm_nouveau_svm_bind *args = data; unsigned target, cmd, priority; - unsigned long addr, end, size; + unsigned long addr, end; struct mm_struct *mm; args->va_start &= PAGE_MASK; - args->va_end &= PAGE_MASK; + args->va_end = ALIGN(args->va_end, PAGE_SIZE); /* Sanity check arguments */ if (args->reserved0 || args->reserved1) @@ -125,8 +125,6 @@ nouveau_svmm_bind(struct drm_device *dev, void *data, return -EINVAL; if (args->va_start >= args->va_end) re...
2020 Oct 26
0
[PATCH v2] nouveau: fix the start/end range for migration
...truct drm_device *dev, void *data, struct nouveau_cli *cli = nouveau_cli(file_priv); struct drm_nouveau_svm_bind *args = data; unsigned target, cmd, priority; - unsigned long addr, end, size; + unsigned long addr, end; struct mm_struct *mm; args->va_start &= PAGE_MASK; - args->va_end &= PAGE_MASK; + args->va_end = ALIGN(args->va_end, PAGE_SIZE); /* Sanity check arguments */ if (args->reserved0 || args->reserved1) @@ -118,8 +118,6 @@ nouveau_svmm_bind(struct drm_device *dev, void *data, return -EINVAL; if (args->va_start >= args->va_end) re...
2020 Aug 31
0
[PATCH] nouveau: fix the start/end range for migration
...uct nouveau_cli *cli = nouveau_cli(file_priv); > struct drm_nouveau_svm_bind *args = data; > unsigned target, cmd, priority; > - unsigned long addr, end, size; > + unsigned long addr, end; > struct mm_struct *mm; > > args->va_start &= PAGE_MASK; > - args->va_end &= PAGE_MASK; > + args->va_end = ALIGN(args->va_end, PAGE_SIZE); > + /* If no end address is given, assume a single page. */ > + if (args->va_end == 0) > + args->va_end = args->va_start + PAGE_SIZE; That is really weird, how is it useful for the kernel to map a regi...
2020 Aug 31
0
[PATCH] nouveau: fix the start/end range for migration
...ruct drm_nouveau_svm_bind *args = data; > > > unsigned target, cmd, priority; > > > - unsigned long addr, end, size; > > > + unsigned long addr, end; > > > struct mm_struct *mm; > > > args->va_start &= PAGE_MASK; > > > - args->va_end &= PAGE_MASK; > > > + args->va_end = ALIGN(args->va_end, PAGE_SIZE); > > > + /* If no end address is given, assume a single page. */ > > > + if (args->va_end == 0) > > > + args->va_end = args->va_start + PAGE_SIZE; > > > > That is...
2017 Oct 10
2
[PATCH] Support for Channel Mapping 253.
Hi Drew, On 10/10/17 02:29 PM, Drew Allen wrote: > 2) Someone on this list might know better than I do on that one, but for > the new _ctl_va_list() calls, I believe the convention is for va_start() > and va_end() to appear in the caller rather than in in the va_list() > function itself. > > *My understanding is that it's impossible to pass ellipsis to another > function.* Basically, what I mean is that I *think* you should remove the calls to va_end() from _ctl_va_list() calls and instea...
2017 Nov 05
2
calling va_arg functions on win32 seems to require explicit stack alignment?
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" target triple = "i686-pc-windows-msvc" declare void @llvm.va_start(i8**) declare void @llvm.va_end(i8**) define i64 @foo(...) { %va = alloca i8*, i32 16 ; 4 words should be enough? call void @llvm.va_start(i8** %va) %x = va_arg i8** %va, i64 call void @llvm.va_end(i8** %va) ret i64 %x } ;; should return 123 define i32 @main() { %val0 = call i64(...) @foo(i64 123) %r...