search for: idxptr

Displaying 2 results from an estimated 2 matches for "idxptr".

2014 Oct 29
2
[LLVMdev] [PATCH] LangRef: va_arg doesn't work on X86_64; update example
...; 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) - + %idxptr = getelementptr inbounds %struct.__va_list_tag* %ap, i32 0, i32 0 + %idx = load i32* %idxptr + %tmp = getelementptr inbounds %struct.__va_list_tag* %ap, i32 0, i32 3 + %extract = load i8** %tmp + %rawel = getelementptr i8* %extract, i32 %idx + %elptr = bitcast i8* %rawel to...
2014 Aug 26
2
[LLVMdev] [BUG] Varargs example in LangRef segfaults
Hi, So the Variable Argument Handling Intrinsics section of the LangRef (http://llvm.org/docs/LangRef.html#variable-argument-handling-intrinsics) lists an example that segfaults. Try the following on 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